[v8,4/6] ASoC: core: Call mute for cpu dais as well
diff mbox

Message ID 1412603954-9030-5-git-send-email-vinod.koul@intel.com
State Accepted
Commit ae11601b80b984859deda1f2d430a23bfabd3bea
Headers show

Commit Message

Vinod Koul Oct. 6, 2014, 1:59 p.m. UTC
From: Ramesh Babu <ramesh.babu@intel.com>

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>
---
 sound/soc/soc-pcm.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Patch
diff mbox

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 642c862..79b9eb0 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -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);