ASoC: compress: Only mute playback streams
Subsystems (3)
PATCH 1/1 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 <[email protected]>
--- sound/soc/soc-compress.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
sound/soc/soc-compress.c +11 -6
@@ -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);
Signature · 1 line
1.7.10.4
Quoted 4 lines · Mark Brown
Otherwise capture activity on a compressed DAI would mute any playback on the same DAI.
Signed-off-by Mark Brown <[email protected]>
Acked-by Liam Girdwood <[email protected]>
Vinod Koul
Acked-byQuoted 5 lines · Liam Girdwood
Quoted 4 lines · Mark Brown
Otherwise capture activity on a compressed DAI would mute any playback on the same DAI.
Signed-off-by Mark Brown <[email protected]>
Acked-by Vinod Koul <[email protected]>