[PATCH] ASoC: sdw_utils: Add RT721 speaker component tag

Marco Griep posted 1 patch 6 hours ago
sound/soc/sdw_utils/soc_sdw_rt_mf_sdca.c | 6 ++++++
1 file changed, 6 insertions(+)
[PATCH] ASoC: sdw_utils: Add RT721 speaker component tag
Posted by Marco Griep 6 hours ago
The RT721 multifunction SDCA speaker helper adds the DAPM routes for
its internal speaker path, but it does not add the corresponding
spk:rt721 token to card->components.

UCM uses that token to include the RT721 speaker device. Without it,
systems with standalone RT721 expose the ALSA SmartAmp PCM but PipeWire
only sees the headset devices.

Append the speaker codec token from the RT721 multifunction SDCA speaker
runtime init path so UCM can create the internal speaker route.

Tested on an ASUS Vivobook S16 M3607GA with ACP70 SoundWire RT721-SDCA.
With the standalone RT721 ACP70 machine entry, this makes the HiFi
profile expose Speaker, Headphones, internal Mic and Headset devices.

Signed-off-by: Marco Griep <mail@marcogriep.de>
---
 sound/soc/sdw_utils/soc_sdw_rt_mf_sdca.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sound/soc/sdw_utils/soc_sdw_rt_mf_sdca.c b/sound/soc/sdw_utils/soc_sdw_rt_mf_sdca.c
index 5bf3627a97a0..e895397eefd6 100644
--- a/sound/soc/sdw_utils/soc_sdw_rt_mf_sdca.c
+++ b/sound/soc/sdw_utils/soc_sdw_rt_mf_sdca.c
@@ -74,6 +74,12 @@ int asoc_sdw_rt_mf_sdca_spk_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd
 		return -EINVAL;
 	}
 
+	card->components = devm_kasprintf(card->dev, GFP_KERNEL,
+					  "%s spk:%s",
+					  card->components, codec_name);
+	if (!card->components)
+		return -ENOMEM;
+
 	/* Add routes */
 	ret = snd_soc_dapm_add_routes(dapm, route_map->route_map, route_map->route_size);
 	if (ret)

base-commit: 1e9cdc2ea15adf4a821eefedabf6c0c8cf0b6a55
-- 
2.55.0