[PATCH v1 2/2] ASoC: sdw_utils: add spk component string for tac5xx2 family
From: Niranjan H Y
Date: Wed Aug 19 2026 - 01:35:53 EST
The tac5xx2 RTD init does not populate card->components with the
spk:<prefix> string. With this change, "amixer -D hw:<card> info"
includes the spk identifier for each tac5xx2 speaker component,
following the same pattern used by other codec families.
This allows userspace to identify the speaker codec at runtime
and enables UCM card matching for the tac5xx2 family.
Signed-off-by: Niranjan H Y <niranjan.hy@xxxxxx>
---
sound/soc/sdw_utils/soc_sdw_ti_amp.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sound/soc/sdw_utils/soc_sdw_ti_amp.c b/sound/soc/sdw_utils/soc_sdw_ti_amp.c
index d0ae5d7ef..5e0b2c753 100644
--- a/sound/soc/sdw_utils/soc_sdw_ti_amp.c
+++ b/sound/soc/sdw_utils/soc_sdw_ti_amp.c
@@ -127,6 +127,12 @@ int asoc_sdw_ti_tac5xx2_spk_rtd_init(struct snd_soc_pcm_runtime *rtd,
struct snd_soc_dai *codec_dai;
const char *prefix;
+ card->components = devm_kasprintf(card->dev, GFP_KERNEL,
+ "%s spk:%s", card->components,
+ dai->component->name_prefix);
+ if (!card->components)
+ return -ENOMEM;
+
for_each_rtd_codec_dais(rtd, i, codec_dai) {
if (!strstr(codec_dai->name, "tac5") &&
!strstr(codec_dai->name, "tas2883"))
--
2.34.1