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

ASoC: topology: Allow partial matching when finding DAI link

This allows for setting shorter link names in topology. For example,
for the HDA Analog DAI link, just "Analog" would suffice instead of
"Analog Playback and Capture"
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>
Reviewed-by: default avatarPéter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230526204149.456068-2-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 13e75f4b
......@@ -2030,11 +2030,11 @@ static struct snd_soc_dai_link *snd_soc_find_dai_link(struct snd_soc_card *card,
if (link->id != id)
continue;
if (name && (!link->name || strcmp(name, link->name)))
if (name && (!link->name || !strstr(link->name, name)))
continue;
if (stream_name && (!link->stream_name
|| strcmp(stream_name, link->stream_name)))
if (stream_name && (!link->stream_name ||
!strstr(link->stream_name, stream_name)))
continue;
return link;
......
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