Skip to contentSkip to conversation

ASoC: dpcm: Fix dpcm_get_be() to check that DAI is BE.

PATCH Applied Liam Girdwood 2 participants 2 messages Jun 5, 2012 – Jun 8, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: dpcm: Fix dpcm_get_be() to check that DAI is BE.

Make sure that the dpcm_get_be() only returns BE DAI links.

---
 sound/soc/soc-pcm.c |    6 ++++++
 1 file changed, 6 insertions(+)
sound/soc/soc-pcm.c +6 -0
index edb0d0c..1b6f6be 100644
@@ -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;
Signature · 1 line
1.7.9.5
Applied
#1 lore raw
Quoted 1 line · Liam Girdwood

Make sure that the dpcm_get_be() only returns BE DAI links.

Applied, thanks.