summaryrefslogtreecommitdiff
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
authorBanajit Goswami <bgoswami@codeaurora.org>2015-07-04 22:14:27 -0700
committerJeevan Shriram <jshriram@codeaurora.org>2016-05-18 13:41:50 -0700
commitebbe768c8379a1295540036bc264573ec355a727 (patch)
treedd7377bb75c9d765c9d2da1aa51e4d9b22434e05 /sound/soc/soc-pcm.c
parentd4430c76682c2e7dc8c00371e6ffd9723b24b2a1 (diff)
ASoC: compare CPU DAI stream name to find BE DAI
While setting up route for a particular device, compare stream name of CPU DAI and Backend DAI to find the correct Backend DAI. Change-Id: Ic3f7c0e5b2a1055e7fdf52c78ded797a9a126d03 Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r--sound/soc/soc-pcm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 36a109dbe3d9..256b7e210f31 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1318,7 +1318,11 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
if (!be->dai_link->no_pcm)
continue;
- if (be->cpu_dai->playback_widget == widget)
+ if ((be->cpu_dai->playback_widget == widget &&
+ (be->dai_link->stream_name &&
+ !strcmp(be->dai_link->stream_name,
+ be->cpu_dai->playback_widget->sname))) ||
+ be->codec_dai->playback_widget == widget)
return be;
for (j = 0; j < be->num_codecs; j++) {
@@ -1335,7 +1339,11 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
if (!be->dai_link->no_pcm)
continue;
- if (be->cpu_dai->capture_widget == widget)
+ if ((be->cpu_dai->capture_widget == widget &&
+ (be->dai_link->stream_name &&
+ !strcmp(be->dai_link->stream_name,
+ be->cpu_dai->capture_widget->sname))) ||
+ be->codec_dai->capture_widget == widget)
return be;
for (j = 0; j < be->num_codecs; j++) {