All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: dpcm: Fix dpcm_get_be() to check that DAI is BE.
@ 2012-06-05 18:26 Liam Girdwood
  2012-06-07 22:57 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Liam Girdwood @ 2012-06-05 18:26 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, Liam Girdwood

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

Signed-off-by: Liam Girdwood <lrg@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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-08  0:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-05 18:26 [PATCH] ASoC: dpcm: Fix dpcm_get_be() to check that DAI is BE Liam Girdwood
2012-06-07 22:57 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.