aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/soc-pcm.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index ed1e077114a2..170ff9695753 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -450,19 +450,6 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
450 codec_dai->active--; 450 codec_dai->active--;
451 codec->active--; 451 codec->active--;
452 452
453 /* clear the corresponding DAIs rate when inactive */
454 if (!cpu_dai->active) {
455 cpu_dai->rate = 0;
456 cpu_dai->channels = 0;
457 cpu_dai->sample_bits = 0;
458 }
459
460 if (!codec_dai->active) {
461 codec_dai->rate = 0;
462 codec_dai->channels = 0;
463 codec_dai->sample_bits = 0;
464 }
465
466 /* Muting the DAC suppresses artifacts caused during digital 453 /* Muting the DAC suppresses artifacts caused during digital
467 * shutdown, for example from stopping clocks. 454 * shutdown, for example from stopping clocks.
468 */ 455 */
@@ -682,6 +669,19 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
682 669
683 mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass); 670 mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
684 671
672 /* clear the corresponding DAIs parameters when going to be inactive */
673 if (cpu_dai->active == 1) {
674 cpu_dai->rate = 0;
675 cpu_dai->channels = 0;
676 cpu_dai->sample_bits = 0;
677 }
678
679 if (codec_dai->active == 1) {
680 codec_dai->rate = 0;
681 codec_dai->channels = 0;
682 codec_dai->sample_bits = 0;
683 }
684
685 /* apply codec digital mute */ 685 /* apply codec digital mute */
686 if (!codec->active) 686 if (!codec->active)
687 snd_soc_dai_digital_mute(codec_dai, 1, substream->stream); 687 snd_soc_dai_digital_mute(codec_dai, 1, substream->stream);