Skip to content

Commit

Permalink
ASoC: Intel: sof_sdw_rt_sdca_jack_common: Use name_prefix for -sdca
Browse files Browse the repository at this point in the history
… 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: 9a9d31b ("ASoC: Intel: sof_sdw_rt_sdca_jack_common: remove -sdca for new codecs")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://msgid.link/r/20240513140730.27048-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
ujfalusi authored and broonie committed May 14, 2024
1 parent c3c5ac4 commit 04b5e2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/intel/boards/sof_sdw_rt_sdca_jack_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 04b5e2f

Please sign in to comment.