]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00171077 ESAI: Ends of record should not impact playback
authorLionel Xu <Lionel.Xu@freescale.com>
Fri, 20 Apr 2012 11:33:33 +0000 (19:33 +0800)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:11:35 +0000 (14:11 +0200)
The mute process in shutdown function should only be limited to playback, or
it will influence each other when they running together.

Signed-off-by: Lionel Xu <Lionel.Xu@freescale.com>
sound/soc/codecs/cs42888.c

index 63d244a8d00ab72e1142e562f5f4b0c39326d22c..97a8fc85db119b7a2d8592f4f68103a9d68c155b 100644 (file)
@@ -743,12 +743,13 @@ static void cs42888_shutdown(struct snd_pcm_substream *substream,
        u8 val;
 
        /* Mute all the channels */
-       val = snd_soc_read(codec, CS42888_MUTE);
-
-       val |= CS42888_MUTE_ALL;
-       ret = snd_soc_write(codec, CS42888_MUTE, val);
-       if (ret < 0)
-               pr_err("i2c write failed\n");
+       if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
+               val = snd_soc_read(codec, CS42888_MUTE);
+               val |= CS42888_MUTE_ALL;
+               ret = snd_soc_write(codec, CS42888_MUTE, val);
+               if (ret < 0)
+                       pr_err("i2c write failed\n");
+       }
 
 }