From: Peter Ujfalusi Date: Mon, 13 May 2024 14:07:30 +0000 (+0300) Subject: ASoC: Intel: sof_sdw_rt_sdca_jack_common: Use name_prefix for `-sdca` detection X-Git-Tag: v6.10-rc1~23^2^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04b5e2f9a75a3f33f29dec780c1363367642fd73;p=thirdparty%2Flinux.git ASoC: Intel: sof_sdw_rt_sdca_jack_common: Use name_prefix for `-sdca` detection Match against the correct string to decide to add the '-sdca' postfix: instead of codec_dai->name the correct one is component->name_prefix. The component->name_prefix is added previously to the card->components as hs. Fixes: 9a9d31b149f3 ("ASoC: Intel: sof_sdw_rt_sdca_jack_common: remove -sdca for new codecs") Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Pierre-Louis Bossart Link: https://msgid.link/r/20240513140730.27048-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c b/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c index 701b0372f59e3..012195c505191 100644 --- a/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c +++ b/sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c @@ -109,7 +109,7 @@ int rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *d return -ENOMEM; for (i = 0; i < ARRAY_SIZE(need_sdca_suffix); i++) { - if (strstr(codec_dai->name, need_sdca_suffix[i])) { + if (strstr(component->name_prefix, need_sdca_suffix[i])) { /* Add -sdca suffix for existing UCMs */ card->components = devm_kasprintf(card->dev, GFP_KERNEL, "%s-sdca", card->components);