summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-12-12 04:30:03 +0400
committerMark Brown <broonie@linaro.org>2013-12-12 04:30:03 +0400
commit2ff7085046a138e724a3a28f5e880e0b7d4be2c3 (patch)
treefc4610452512ee36fae9ee98a5cff05a44189c64 /sound
parent374b105797c3d4f29c685f3be535c35f5689b30e (diff)
parent7f62b6ee767586ee7e5d12787dbaaaf47a91979a (diff)
downloadlinux-2ff7085046a138e724a3a28f5e880e0b7d4be2c3.tar.xz
Merge remote-tracking branch 'asoc/fix/core' into asoc-linus
Diffstat (limited to 'sound')
-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 */