[alsa-devel] [PATCH] ASoC: dpcm: Fix dpcm_get_be() to check that DAI is BE.
Liam Girdwood
lrg at ti.com
Tue Jun 5 20:26:59 CEST 2012
Make sure that the dpcm_get_be() only returns BE DAI links.
Signed-off-by: Liam Girdwood <lrg at ti.com>
---
sound/soc/soc-pcm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index edb0d0c..1b6f6be 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -830,6 +830,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;
@@ -839,6 +842,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;
--
1.7.9.5
More information about the Alsa-devel
mailing list