ASoC: core: Call mute for cpu dais as well
authorRamesh Babu <ramesh.babu@intel.com>
Wed, 15 Oct 2014 07:04:59 +0000 (12:34 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 20 Oct 2014 11:19:44 +0000 (12:19 +0100)
We call mute for codec dai only, we should call this for cpu dai as well to
allow cpu dais (FEs) in DSPs to be muted/unmuted on shutdown/startup

Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-pcm.c

index 002311afdeaa8bd6ceb40d120b0c6afaa13c6119..1cd027a97106a8b52f833a8f3cc560ff61adce19 100644 (file)
@@ -654,6 +654,8 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
                        codec_dai->rate = 0;
        }
 
+       snd_soc_dai_digital_mute(cpu_dai, 1, substream->stream);
+
        if (cpu_dai->driver->ops->shutdown)
                cpu_dai->driver->ops->shutdown(substream, cpu_dai);
 
@@ -772,6 +774,7 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
        for (i = 0; i < rtd->num_codecs; i++)
                snd_soc_dai_digital_mute(rtd->codec_dais[i], 0,
                                         substream->stream);
+       snd_soc_dai_digital_mute(cpu_dai, 0, substream->stream);
 
 out:
        mutex_unlock(&rtd->pcm_mutex);