diff options
author | Lionel Xu <Lionel.Xu@freescale.com> | 2012-04-20 19:33:33 +0800 |
---|---|---|
committer | Lionel Xu <Lionel.Xu@freescale.com> | 2012-04-20 19:33:33 +0800 |
commit | 222f5a7c8f89e166a3e986e90e896c723178bee2 (patch) | |
tree | 9fbc6b5ebd491e26b63b38775decc8feed5f4cd1 /sound | |
parent | be7d2d3d8e3c0e1c7d64b98f77e54bc6fe6f4c44 (diff) |
ENGR00171077 ESAI: Ends of record should not impact playback
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/cs42888.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sound/soc/codecs/cs42888.c b/sound/soc/codecs/cs42888.c index 63d244a8d00a..97a8fc85db11 100644 --- a/sound/soc/codecs/cs42888.c +++ b/sound/soc/codecs/cs42888.c @@ -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"); + } } |