All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: pcm: Require both CODEC and CPU support when declaring stream caps
@ 2013-06-01 22:16 Mark Brown
  2013-06-01 23:01 ` Fabio Estevam
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Mark Brown @ 2013-06-01 22:16 UTC (permalink / raw)
  To: Marek Vasut, Fabio Estevam, Liam Girdwood
  Cc: alsa-devel, Mark Brown, Mark Brown

When declaring playback and capture capabilities check for both CODEC
side and CPU side support rather than only checking for CODEC side
support.  While it is unusual some CPUs do have unidirectional DAIs.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/soc-pcm.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 73bb8ee..a9fddf0 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2011,9 +2011,11 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
 		if (cpu_dai->driver->capture.channels_min)
 			capture = 1;
 	} else {
-		if (codec_dai->driver->playback.channels_min)
+		if (codec_dai->driver->playback.channels_min &&
+		    cpu_dai->driver->playback.channels_min)
 			playback = 1;
-		if (codec_dai->driver->capture.channels_min)
+		if (codec_dai->driver->capture.channels_min &&
+		    cpu_dai->driver->capture.channels_min)
 			capture = 1;
 	}
 
-- 
1.7.10.4

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

end of thread, other threads:[~2013-06-03  8:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-01 22:16 [PATCH] ASoC: pcm: Require both CODEC and CPU support when declaring stream caps Mark Brown
2013-06-01 23:01 ` Fabio Estevam
2013-06-02 14:45 ` Fabio Estevam
2013-06-03  8:56   ` Mark Brown
2013-06-03  8:47 ` Liam Girdwood

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.