From ec85e1eaca7c354583b8dbcaf717459cf11cf65f Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 6 Feb 2013 13:52:42 +0000 Subject: [PATCH] --- yaml --- r: 353361 b: refs/heads/master c: e38b9b7478d57701fbcbaafdde169aa1a88d0eca h: refs/heads/master i: 353359: a84d006120d648ba368387a394522b93fd7563b1 v: v3 --- [refs] | 2 +- trunk/sound/soc/soc-compress.c | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 7ade424cc6ce..c599e58e9ef4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1f88eb0f0660f8b58a1fe9011f3d3a350c7dd194 +refs/heads/master: e38b9b7478d57701fbcbaafdde169aa1a88d0eca diff --git a/trunk/sound/soc/soc-compress.c b/trunk/sound/soc/soc-compress.c index c81aeecec936..35726cbf1f02 100644 --- a/trunk/sound/soc/soc-compress.c +++ b/trunk/sound/soc/soc-compress.c @@ -116,13 +116,12 @@ static int soc_compr_free(struct snd_compr_stream *cstream) if (cstream->direction == SND_COMPRESS_PLAYBACK) { cpu_dai->playback_active--; codec_dai->playback_active--; + snd_soc_dai_digital_mute(codec_dai, 1); } else { cpu_dai->capture_active--; codec_dai->capture_active--; } - snd_soc_dai_digital_mute(codec_dai, 1); - cpu_dai->active--; codec_dai->active--; codec->active--; @@ -179,10 +178,16 @@ static int soc_compr_trigger(struct snd_compr_stream *cstream, int cmd) goto out; } - if (cmd == SNDRV_PCM_TRIGGER_START) - snd_soc_dai_digital_mute(codec_dai, 0); - else if (cmd == SNDRV_PCM_TRIGGER_STOP) - snd_soc_dai_digital_mute(codec_dai, 1); + if (cstream->direction == SND_COMPRESS_PLAYBACK) { + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + snd_soc_dai_digital_mute(codec_dai, 0); + break; + case SNDRV_PCM_TRIGGER_STOP: + snd_soc_dai_digital_mute(codec_dai, 1); + break; + } + } out: mutex_unlock(&rtd->pcm_mutex);