Skip to contentSkip to conversation

ASoC: Intel: sof_sdw: minor corrections

PATCH In review Pierre-Louis Bossart 2 participants 6 messages Oct 2, 2020 – Oct 5, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover 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(+)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/4 ASoC: Intel: sof_sdw_rt1308: add extra check on init

Apply same test as for other amplifiers - in case we enable feedback one day.

---
 sound/soc/intel/boards/sof_sdw_rt1308.c | 4 ++++
 1 file changed, 4 insertions(+)
sound/soc/intel/boards/sof_sdw_rt1308.c +4 -0
index dba2fd28d77f..0d476f6f6313 100644
@@ -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;
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/4 ASoC: Intel: sof_sdw_rt1316: add missing component string

In reply to Pierre-Louis Bossart

Without this string UCM cannot fetch the relevant configurations.

Fixes b75bea4b8834c ('ASoC: intel: sof_sdw: add rt711 rt1316 rt714 SDCA codec support')
---
 sound/soc/intel/boards/sof_sdw_rt1316.c | 6 ++++++
 1 file changed, 6 insertions(+)
sound/soc/intel/boards/sof_sdw_rt1316.c +6 -0
index 2c566330f236..d6e1ebf18d57 100644
@@ -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) {
Signature · 1 line
2.25.1
#3 lore raw

PATCH 3/4 ASoC: rt715-sdw: probe with RT714 Device ID

In reply to Pierre-Louis Bossart

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.

---
 sound/soc/codecs/rt715-sdw.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/codecs/rt715-sdw.c +1 -0
index f3f5da512b59..8f0aa1e8a273 100644
@@ -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),
 	{},
 };
Signature · 1 line
2.25.1
#4 lore raw

PATCH 4/4 ASoC: Intel: sof_sdw: add version_id to avoid rt714/rt715 confusion

In reply to Pierre-Louis Bossart

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.

---
 sound/soc/intel/boards/sof_sdw.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
sound/soc/intel/boards/sof_sdw.c +16 -0
index b56df04775c2..b29946eb4355 100644
@@ -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,
Signature · 1 line
2.25.1
maintainer
#5 lore raw
In reply to Pierre-Louis Bossart
Quoted 10 lines · Pierre-Louis Bossart

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