summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2012-06-05 20:26:59 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-06-08 00:56:38 +0200
commit35ea0655a1bcdb1dcb1c1d0c4b6b391ade9c6d01 (patch)
tree080733710359f9376f955d21c3fad66690a03fad /sound
parentASoC: wm8994: Apply volume updates with clocks enabled (diff)
downloadlinux-35ea0655a1bcdb1dcb1c1d0c4b6b391ade9c6d01.tar.xz
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>
Diffstat (limited to 'sound')
-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;