diff options
author | Ranjani Sridharan <ranjani.sridharan@linux.intel.com> | 2023-05-26 15:41:48 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-05-30 14:11:03 +0100 |
commit | fe88788779fc30a4117dc2f9db4b50182679bb67 (patch) | |
tree | 71848495b8390989885c44f3735d7506e51cc284 | |
parent | e018e0b346706d0a0d7d7f884f3850cc0903abc2 (diff) | |
download | linux-stable-fe88788779fc30a4117dc2f9db4b50182679bb67.tar.gz linux-stable-fe88788779fc30a4117dc2f9db4b50182679bb67.tar.bz2 linux-stable-fe88788779fc30a4117dc2f9db4b50182679bb67.zip |
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: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20230526204149.456068-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/sof/topology.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c index d3d536b0a8f5..b572c809581d 100644 --- a/sound/soc/sof/topology.c +++ b/sound/soc/sof/topology.c @@ -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) { |