ASoC: SOF: topology: Use partial match for disconnecting DAI link and DAI widget
authorBard Liao <yung-chuan.liao@linux.intel.com>
Mon, 4 Dec 2023 21:47:10 +0000 (15:47 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 4 Dec 2023 21:49:19 +0000 (21:49 +0000)
We use partial match for connecting DAI link and DAI widget. We need to
use partial match for disconnecting, too.

Fixes: fe88788779fc ("ASoC: SOF: topology: Use partial match for connecting DAI link and DAI widget")
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231204214713.208951-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/topology.c

index 9f717366cddce21c13ba5344afe215ffe344c1ab..c1f66ba0e98727032eaf65f88ee398b1f7b34f92 100644 (file)
@@ -1135,7 +1135,7 @@ static void sof_disconnect_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(sname, rtd->dai_link->stream_name))
+                   !strstr(rtd->dai_link->stream_name, sname))
                        continue;
 
                for_each_rtd_cpu_dais(rtd, i, cpu_dai)