All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: soc-pcm: fix sig_bits determination in soc_pcm_apply_msb()
@ 2014-10-07 12:33 Daniel Mack
  2014-10-07 18:15 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Mack @ 2014-10-07 12:33 UTC (permalink / raw)
  To: alsa-devel; +Cc: broonie, Daniel Mack

In the SNDRV_PCM_STREAM_CAPTURE branch in soc_pcm_apply_msb(), look at
sig_bits of the capture stream, not the playback one.

Spotted by coverity.

Signed-off-by: Daniel Mack <daniel@zonque.org>
---
 sound/soc/soc-pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 642c862..002311a 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -352,7 +352,7 @@ static void soc_pcm_apply_msb(struct snd_pcm_substream *substream)
 	} else {
 		for (i = 0; i < rtd->num_codecs; i++) {
 			codec_dai = rtd->codec_dais[i];
-			if (codec_dai->driver->playback.sig_bits == 0) {
+			if (codec_dai->driver->capture.sig_bits == 0) {
 				bits = 0;
 				break;
 			}
-- 
2.1.0

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

* Re: [PATCH] ASoC: soc-pcm: fix sig_bits determination in soc_pcm_apply_msb()
  2014-10-07 12:33 [PATCH] ASoC: soc-pcm: fix sig_bits determination in soc_pcm_apply_msb() Daniel Mack
@ 2014-10-07 18:15 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-10-07 18:15 UTC (permalink / raw)
  To: Daniel Mack; +Cc: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 208 bytes --]

On Tue, Oct 07, 2014 at 02:33:46PM +0200, Daniel Mack wrote:
> In the SNDRV_PCM_STREAM_CAPTURE branch in soc_pcm_apply_msb(), look at
> sig_bits of the capture stream, not the playback one.

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

end of thread, other threads:[~2014-10-07 18:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-07 12:33 [PATCH] ASoC: soc-pcm: fix sig_bits determination in soc_pcm_apply_msb() Daniel Mack
2014-10-07 18:15 ` 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.