diff mbox

[3/5] ASoC: Intel: Skylake: Prevent sending Set DMA Control IPC if the widget is "On"

Message ID 1461849329-20364-4-git-send-email-vinod.koul@intel.com (mailing list archive)
State Accepted
Commit 1a13b1fafffd41c12a7068c4aa74f5a1d2210a07
Headers show

Commit Message

Vinod Koul April 28, 2016, 1:15 p.m. UTC
From: "Dharageswari.R" <dharageswari.r@intel.com>

If widget of a playback or capture DAI is already On, then no
need not send the Set DMA Control IPC message to firmware.

Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/intel/skylake/skl-pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index 8de921272f71..df24d8c6b757 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -213,7 +213,7 @@  static int skl_be_prepare(struct snd_pcm_substream *substream,
 	struct skl_sst *ctx = skl->skl_sst;
 	struct skl_module_cfg *mconfig;
 
-	if ((dai->playback_active > 1) || (dai->capture_active > 1))
+	if (dai->playback_widget->power || dai->capture_widget->power)
 		return 0;
 
 	mconfig = skl_tplg_be_get_cpr_module(dai, substream->stream);