Commit e38b9b74 authored by Mark Brown's avatar Mark Brown

ASoC: compress: Only mute playback streams

Otherwise capture activity on a compressed DAI would mute any playback
on the same DAI.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarVinod Koul <vinod.koul@intel.com>
Acked-by: default avatarLiam Girdwood <liam.r.girdwood@linux.intel.com>
parent 1f88eb0f
...@@ -116,13 +116,12 @@ static int soc_compr_free(struct snd_compr_stream *cstream) ...@@ -116,13 +116,12 @@ static int soc_compr_free(struct snd_compr_stream *cstream)
if (cstream->direction == SND_COMPRESS_PLAYBACK) { if (cstream->direction == SND_COMPRESS_PLAYBACK) {
cpu_dai->playback_active--; cpu_dai->playback_active--;
codec_dai->playback_active--; codec_dai->playback_active--;
snd_soc_dai_digital_mute(codec_dai, 1);
} else { } else {
cpu_dai->capture_active--; cpu_dai->capture_active--;
codec_dai->capture_active--; codec_dai->capture_active--;
} }
snd_soc_dai_digital_mute(codec_dai, 1);
cpu_dai->active--; cpu_dai->active--;
codec_dai->active--; codec_dai->active--;
codec->active--; codec->active--;
...@@ -179,10 +178,16 @@ static int soc_compr_trigger(struct snd_compr_stream *cstream, int cmd) ...@@ -179,10 +178,16 @@ static int soc_compr_trigger(struct snd_compr_stream *cstream, int cmd)
goto out; goto out;
} }
if (cmd == SNDRV_PCM_TRIGGER_START) if (cstream->direction == SND_COMPRESS_PLAYBACK) {
snd_soc_dai_digital_mute(codec_dai, 0); switch (cmd) {
else if (cmd == SNDRV_PCM_TRIGGER_STOP) case SNDRV_PCM_TRIGGER_START:
snd_soc_dai_digital_mute(codec_dai, 1); snd_soc_dai_digital_mute(codec_dai, 0);
break;
case SNDRV_PCM_TRIGGER_STOP:
snd_soc_dai_digital_mute(codec_dai, 1);
break;
}
}
out: out:
mutex_unlock(&rtd->pcm_mutex); mutex_unlock(&rtd->pcm_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment