summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-12-13 14:54:53 +0100
committerTakashi Iwai <tiwai@suse.de>2013-12-13 14:54:53 +0100
commitafdcd431cebe3498db9aa963c780fdd5099917ec (patch)
tree16d9155e136f0df56689eead95cf44935aab2a0c /sound/soc/soc-pcm.c
parentc29cb5eb8157a0049c882672a7f941261f23ea34 (diff)
parente20ab019e28dcf09c2727aa69e2a073ed66718b3 (diff)
downloadlinux-stable-afdcd431cebe3498db9aa963c780fdd5099917ec.tar.gz
linux-stable-afdcd431cebe3498db9aa963c780fdd5099917ec.tar.bz2
linux-stable-afdcd431cebe3498db9aa963c780fdd5099917ec.zip
Merge tag 'asoc-v3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v3.13 A few driver and error handling fixes plus a fix to ensure that we mute streams when we should. The Atmel trigger addition is a fix to ensure that we do the correct sequence of interactions with the hardware.
Diffstat (limited to 'sound/soc/soc-pcm.c')
-rw-r--r--sound/soc/soc-pcm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 11a90cd027fa..891b9a9bcbf8 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -600,12 +600,13 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
struct snd_soc_platform *platform = rtd->platform;
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
struct snd_soc_dai *codec_dai = rtd->codec_dai;
- struct snd_soc_codec *codec = rtd->codec;
+ bool playback = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
/* apply codec digital mute */
- if (!codec->active)
+ if ((playback && codec_dai->playback_active == 1) ||
+ (!playback && codec_dai->capture_active == 1))
snd_soc_dai_digital_mute(codec_dai, 1, substream->stream);
/* free any machine hw params */