Commit fe887887 authored by Ranjani Sridharan's avatar Ranjani Sridharan Committed by Mark Brown

ASoC: SOF: topology: Use partial match for connecting DAI link and DAI widget

This allows setting shorter names for the widget stream names in
topology. For example, in the case of HDA Analog DAI link, the stream
name is "Analog Playback and Capture". But it is enough to match "Analog"
in the DAI link stream name with a widget's stream name. This is needed
to set more meaningful names for the DAI widgets using the stream name
in topology.
Signed-off-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20230526204149.456068-3-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent e018e0b3
......@@ -1073,7 +1073,7 @@ static int sof_connect_dai_widget(struct snd_soc_component *scomp,
list_for_each_entry(rtd, &card->rtd_list, list) {
/* does stream match DAI link ? */
if (!rtd->dai_link->stream_name ||
strcmp(w->sname, rtd->dai_link->stream_name))
!strstr(rtd->dai_link->stream_name, w->sname))
continue;
for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment