From: Mark Brown Date: Wed, 6 Feb 2013 13:52:42 +0000 (+0000) Subject: ASoC: compress: Only mute playback streams X-Git-Tag: v3.12-rc1~1331^2~16^2~28^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e38b9b7478d57701fbcbaafdde169aa1a88d0eca;p=kernel%2Fkernel-generic.git ASoC: compress: Only mute playback streams Otherwise capture activity on a compressed DAI would mute any playback on the same DAI. Signed-off-by: Mark Brown Acked-by: Vinod Koul Acked-by: Liam Girdwood --- diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index c81aeec..35726cb 100644 --- a/sound/soc/soc-compress.c +++ b/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);