[PATCH 0/4] ASoC: Intel: sof_sdw: minor corrections
This small patchset adds a missing component string needed by UCM and corrects a confusion on Realtek part numbers.
Pierre-Louis Bossart (4): ASoC: Intel: sof_sdw_rt1308: add extra check on init ASoC: Intel: sof_sdw_rt1316: add missing component string ASoC: rt715-sdw: probe with RT714 Device ID ASoC: Intel: sof_sdw: add version_id to avoid rt714/rt715 confusion
sound/soc/codecs/rt715-sdw.c | 1 + sound/soc/intel/boards/sof_sdw.c | 16 ++++++++++++++++ sound/soc/intel/boards/sof_sdw_rt1308.c | 4 ++++ sound/soc/intel/boards/sof_sdw_rt1316.c | 6 ++++++ 4 files changed, 27 insertions(+)
Apply same test as for other amplifiers - in case we enable feedback one day.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Reviewed-by: Bard Liao yung-chuan.liao@linux.intel.com --- sound/soc/intel/boards/sof_sdw_rt1308.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/sound/soc/intel/boards/sof_sdw_rt1308.c b/sound/soc/intel/boards/sof_sdw_rt1308.c index dba2fd28d77f..0d476f6f6313 100644 --- a/sound/soc/intel/boards/sof_sdw_rt1308.c +++ b/sound/soc/intel/boards/sof_sdw_rt1308.c @@ -132,6 +132,10 @@ int sof_sdw_rt1308_init(const struct snd_soc_acpi_link_adr *link, struct sof_sdw_codec_info *info, bool playback) { + /* Count amp number and do init on playback link only. */ + if (!playback) + return 0; + info->amp_num++; if (info->amp_num == 1) dai_links->init = first_spk_init;
Without this string UCM cannot fetch the relevant configurations.
Fixes: b75bea4b8834c ('ASoC: intel: sof_sdw: add rt711 rt1316 rt714 SDCA codec support') Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Reviewed-by: Bard Liao yung-chuan.liao@linux.intel.com --- sound/soc/intel/boards/sof_sdw_rt1316.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/sound/soc/intel/boards/sof_sdw_rt1316.c b/sound/soc/intel/boards/sof_sdw_rt1316.c index 2c566330f236..d6e1ebf18d57 100644 --- a/sound/soc/intel/boards/sof_sdw_rt1316.c +++ b/sound/soc/intel/boards/sof_sdw_rt1316.c @@ -39,6 +39,12 @@ static int first_spk_init(struct snd_soc_pcm_runtime *rtd) struct snd_soc_card *card = rtd->card; int ret;
+ card->components = devm_kasprintf(card->dev, GFP_KERNEL, + "%s spk:rt1316", + card->components); + if (!card->components) + return -ENOMEM; + ret = snd_soc_add_card_controls(card, rt1316_controls, ARRAY_SIZE(rt1316_controls)); if (ret) {
RT715 and RT714 are essentially the same chips but with different SoundWire Dev_ID registers, make sure we can probe the same driver if RT714 is used.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Reviewed-by: Bard Liao yung-chuan.liao@linux.intel.com Reviewed-by: Jack Yu jack.yu@realtek.com Reviewed-by: Guennadi Liakhovetski guennadi.liakhovetski@linux.intel.com --- sound/soc/codecs/rt715-sdw.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/sound/soc/codecs/rt715-sdw.c b/sound/soc/codecs/rt715-sdw.c index f3f5da512b59..8f0aa1e8a273 100644 --- a/sound/soc/codecs/rt715-sdw.c +++ b/sound/soc/codecs/rt715-sdw.c @@ -515,6 +515,7 @@ static int rt715_sdw_probe(struct sdw_slave *slave, }
static const struct sdw_device_id rt715_id[] = { + SDW_SLAVE_ENTRY_EXT(0x025d, 0x714, 0x2, 0, 0), SDW_SLAVE_ENTRY_EXT(0x025d, 0x715, 0x2, 0, 0), {}, };
RT715 and RT714 are essentially the same chip. In addition, there are two versions, one supporting SoundWire 1.1 and one supporting SoundWire 1.2 (SDCA).
The previous configurations assumed that RT714 was SDCA-only, which isn't correct. Add support for the 4 possible combinations to avoid confusions.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Reviewed-by: Bard Liao yung-chuan.liao@linux.intel.com Reviewed-by: Jack Yu jack.yu@realtek.com Reviewed-by: Guennadi Liakhovetski guennadi.liakhovetski@linux.intel.com --- sound/soc/intel/boards/sof_sdw.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/sound/soc/intel/boards/sof_sdw.c b/sound/soc/intel/boards/sof_sdw.c index b56df04775c2..b29946eb4355 100644 --- a/sound/soc/intel/boards/sof_sdw.c +++ b/sound/soc/intel/boards/sof_sdw.c @@ -295,12 +295,28 @@ static struct sof_sdw_codec_info codec_info_list[] = { }, { .part_id = 0x714, + .version_id = 3, + .direction = {false, true}, + .dai_name = "rt715-aif2", + .init = sof_sdw_rt715_sdca_init, + }, + { + .part_id = 0x715, + .version_id = 3, .direction = {false, true}, .dai_name = "rt715-aif2", .init = sof_sdw_rt715_sdca_init, }, + { + .part_id = 0x714, + .version_id = 2, + .direction = {false, true}, + .dai_name = "rt715-aif2", + .init = sof_sdw_rt715_init, + }, { .part_id = 0x715, + .version_id = 2, .direction = {false, true}, .dai_name = "rt715-aif2", .init = sof_sdw_rt715_init,
On Fri, 2 Oct 2020 16:18:58 -0500, Pierre-Louis Bossart wrote:
This small patchset adds a missing component string needed by UCM and corrects a confusion on Realtek part numbers.
Pierre-Louis Bossart (4): ASoC: Intel: sof_sdw_rt1308: add extra check on init ASoC: Intel: sof_sdw_rt1316: add missing component string ASoC: rt715-sdw: probe with RT714 Device ID ASoC: Intel: sof_sdw: add version_id to avoid rt714/rt715 confusion
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/4] ASoC: Intel: sof_sdw_rt1308: add extra check on init commit: 044eb2d13a2147a7ac15a400c2a4f020a7857c36 [2/4] ASoC: Intel: sof_sdw_rt1316: add missing component string commit: 8cc8945da74284809c8a4a575e55e91d5557b651 [3/4] ASoC: rt715-sdw: probe with RT714 Device ID commit: 4c652df83ba42fadc884541bfec856c836822302 [4/4] ASoC: Intel: sof_sdw: add version_id to avoid rt714/rt715 confusion commit: df64b9882b35671c4916574a783b614c6164980b
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
participants (2)
-
Mark Brown
-
Pierre-Louis Bossart