summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2012-06-05 19:26:59 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-08 06:56:38 +0800
commit35ea0655a1bcdb1dcb1c1d0c4b6b391ade9c6d01 (patch)
tree080733710359f9376f955d21c3fad66690a03fad
parentbfd37bb5f681961e255fd2f346c20fdae2ef3f27 (diff)
downloadlinux-35ea0655a1bcdb1dcb1c1d0c4b6b391ade9c6d01.tar.gz
linux-35ea0655a1bcdb1dcb1c1d0c4b6b391ade9c6d01.tar.bz2
linux-35ea0655a1bcdb1dcb1c1d0c4b6b391ade9c6d01.zip
ASoC: dpcm: Fix dpcm_get_be() to check that DAI is BE
Make sure that the dpcm_get_be() only returns BE DAI links. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/soc-pcm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index bedd1717a373..48fd15b312c1 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -794,6 +794,9 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
for (i = 0; i < card->num_links; i++) {
be = &card->rtd[i];
+ if (!be->dai_link->no_pcm)
+ continue;
+
if (be->cpu_dai->playback_widget == widget ||
be->codec_dai->playback_widget == widget)
return be;
@@ -803,6 +806,9 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
for (i = 0; i < card->num_links; i++) {
be = &card->rtd[i];
+ if (!be->dai_link->no_pcm)
+ continue;
+
if (be->cpu_dai->capture_widget == widget ||
be->codec_dai->capture_widget == widget)
return be;