summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-06 13:52:42 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-07 18:41:50 +0000
commite38b9b7478d57701fbcbaafdde169aa1a88d0eca (patch)
tree620846f41845d7235cb0433636f22138b2ccceb3 /sound
parent1f88eb0f0660f8b58a1fe9011f3d3a350c7dd194 (diff)
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 <broonie@opensource.wolfsonmicro.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-compress.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index c81aeecec93..35726cbf1f0 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);