diff options
author | Ranjani Sridharan <ranjani.sridharan@linux.intel.com> | 2023-05-26 15:41:47 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-05-30 14:11:02 +0100 |
commit | e018e0b346706d0a0d7d7f884f3850cc0903abc2 (patch) | |
tree | 3a0721308164c4040bb5500d27b809992a990ad1 /sound/soc/soc-topology.c | |
parent | 13e75f4b03217226f110c5bb5d11720adb5ca9d1 (diff) | |
download | lwn-e018e0b346706d0a0d7d7f884f3850cc0903abc2.tar.gz lwn-e018e0b346706d0a0d7d7f884f3850cc0903abc2.zip |
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: 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>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20230526204149.456068-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-topology.c')
-rw-r--r-- | sound/soc/soc-topology.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/soc-topology.c b/sound/soc/soc-topology.c index 20fd46a41cbb..8add361e87c6 100644 --- a/sound/soc/soc-topology.c +++ b/sound/soc/soc-topology.c @@ -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; |