* [PATCH 1/5] ASoC: Intel: Skylake: Fix the NULL pointer exception in dsp_clean up
2016-04-28 13:15 [PATCH 0/5] ASoC: Intel: Skylake: Wov optimizations Vinod Koul
@ 2016-04-28 13:15 ` Vinod Koul
2016-05-02 11:03 ` Applied "ASoC: Intel: Skylake: Fix the NULL pointer exception in dsp_clean up" to the asoc tree Mark Brown
2016-04-28 13:15 ` [PATCH 2/5] ASoC: Intel: Skylake: Fix memory leak during init instance Vinod Koul
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Vinod Koul @ 2016-04-28 13:15 UTC (permalink / raw)
To: alsa-devel
Cc: Dharageswari.R, patches.audio, liam.r.girdwood, Vinod Koul,
broonie, Jeeja KP
From: "Dharageswari.R" <dharageswari.r@intel.com>
If request firmware fails at init, the code loader DMA allocation
can be NULL, so check for boot complete before freeing up these
resources
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-sst-dsp.c | 2 --
sound/soc/intel/skylake/skl-sst.c | 4 ++++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/intel/skylake/skl-sst-dsp.c b/sound/soc/intel/skylake/skl-sst-dsp.c
index 2962ef22fc84..13c19855ee1a 100644
--- a/sound/soc/intel/skylake/skl-sst-dsp.c
+++ b/sound/soc/intel/skylake/skl-sst-dsp.c
@@ -336,8 +336,6 @@ void skl_dsp_free(struct sst_dsp *dsp)
skl_ipc_int_disable(dsp);
free_irq(dsp->irq, dsp);
- dsp->cl_dev.ops.cl_cleanup_controller(dsp);
- skl_cldma_int_disable(dsp);
skl_ipc_op_int_disable(dsp);
skl_ipc_int_disable(dsp);
diff --git a/sound/soc/intel/skylake/skl-sst.c b/sound/soc/intel/skylake/skl-sst.c
index df7964fd09c3..db3a45ee102b 100644
--- a/sound/soc/intel/skylake/skl-sst.c
+++ b/sound/soc/intel/skylake/skl-sst.c
@@ -463,6 +463,10 @@ void skl_sst_dsp_cleanup(struct device *dev, struct skl_sst *ctx)
skl_clear_module_table(ctx->dsp);
skl_ipc_free(&ctx->ipc);
ctx->dsp->ops->free(ctx->dsp);
+ if (ctx->boot_complete) {
+ ctx->dsp->cl_dev.ops.cl_cleanup_controller(ctx->dsp);
+ skl_cldma_int_disable(ctx->dsp);
+ }
}
EXPORT_SYMBOL_GPL(skl_sst_dsp_cleanup);
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* Applied "ASoC: Intel: Skylake: Fix the NULL pointer exception in dsp_clean up" to the asoc tree
2016-04-28 13:15 ` [PATCH 1/5] ASoC: Intel: Skylake: Fix the NULL pointer exception in dsp_clean up Vinod Koul
@ 2016-05-02 11:03 ` Mark Brown
0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2016-05-02 11:03 UTC (permalink / raw)
Cc: alsa-devel, Dharageswari.R, Vinod Koul, liam.r.girdwood,
patches.audio, broonie, Jeeja KP
The patch
ASoC: Intel: Skylake: Fix the NULL pointer exception in dsp_clean up
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 95536d8c29985167e745ff0d8c7cd7dcf4318e6b Mon Sep 17 00:00:00 2001
From: "Dharageswari.R" <dharageswari.r@intel.com>
Date: Thu, 28 Apr 2016 18:45:25 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Fix the NULL pointer exception in
dsp_clean up
If request firmware fails at init, the code loader DMA allocation
can be NULL, so check for boot complete before freeing up these
resources
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/intel/skylake/skl-sst-dsp.c | 2 --
sound/soc/intel/skylake/skl-sst.c | 4 ++++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/intel/skylake/skl-sst-dsp.c b/sound/soc/intel/skylake/skl-sst-dsp.c
index 2962ef22fc84..13c19855ee1a 100644
--- a/sound/soc/intel/skylake/skl-sst-dsp.c
+++ b/sound/soc/intel/skylake/skl-sst-dsp.c
@@ -336,8 +336,6 @@ void skl_dsp_free(struct sst_dsp *dsp)
skl_ipc_int_disable(dsp);
free_irq(dsp->irq, dsp);
- dsp->cl_dev.ops.cl_cleanup_controller(dsp);
- skl_cldma_int_disable(dsp);
skl_ipc_op_int_disable(dsp);
skl_ipc_int_disable(dsp);
diff --git a/sound/soc/intel/skylake/skl-sst.c b/sound/soc/intel/skylake/skl-sst.c
index bec4a7c486fd..13ec8d53b526 100644
--- a/sound/soc/intel/skylake/skl-sst.c
+++ b/sound/soc/intel/skylake/skl-sst.c
@@ -454,6 +454,10 @@ void skl_sst_dsp_cleanup(struct device *dev, struct skl_sst *ctx)
skl_clear_module_table(ctx->dsp);
skl_ipc_free(&ctx->ipc);
ctx->dsp->ops->free(ctx->dsp);
+ if (ctx->boot_complete) {
+ ctx->dsp->cl_dev.ops.cl_cleanup_controller(ctx->dsp);
+ skl_cldma_int_disable(ctx->dsp);
+ }
}
EXPORT_SYMBOL_GPL(skl_sst_dsp_cleanup);
--
2.8.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/5] ASoC: Intel: Skylake: Fix memory leak during init instance
2016-04-28 13:15 [PATCH 0/5] ASoC: Intel: Skylake: Wov optimizations Vinod Koul
2016-04-28 13:15 ` [PATCH 1/5] ASoC: Intel: Skylake: Fix the NULL pointer exception in dsp_clean up Vinod Koul
@ 2016-04-28 13:15 ` Vinod Koul
2016-05-02 11:03 ` Applied "ASoC: Intel: Skylake: Fix memory leak during init instance" to the asoc tree Mark Brown
2016-04-28 13:15 ` [PATCH 3/5] ASoC: Intel: Skylake: Prevent sending Set DMA Control IPC if the widget is "On" Vinod Koul
` (2 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Vinod Koul @ 2016-04-28 13:15 UTC (permalink / raw)
To: alsa-devel
Cc: liam.r.girdwood, patches.audio, broonie, Vinod Koul, Mousumi Jana
From: Mousumi Jana <mousumix.jana@intel.com>
param_data variable is allocated during set module format of init
instance is not getting freed and hence can cause a memory leak.
So free it up.
Signed-off-by: Mousumi Jana <mousumix.jana@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
sound/soc/intel/skylake/skl-messages.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index e3d149c68bbf..226db84ba20f 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -864,7 +864,7 @@ int skl_init_module(struct skl_sst *ctx,
return ret;
}
mconfig->m_state = SKL_MODULE_INIT_DONE;
-
+ kfree(param_data);
return ret;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* Applied "ASoC: Intel: Skylake: Fix memory leak during init instance" to the asoc tree
2016-04-28 13:15 ` [PATCH 2/5] ASoC: Intel: Skylake: Fix memory leak during init instance Vinod Koul
@ 2016-05-02 11:03 ` Mark Brown
0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2016-05-02 11:03 UTC (permalink / raw)
To: Mousumi Jana
Cc: Vinod Koul, liam.r.girdwood, alsa-devel, broonie, patches.audio
The patch
ASoC: Intel: Skylake: Fix memory leak during init instance
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 76222d6dd2e64c895735ab271ecc8b0df568981d Mon Sep 17 00:00:00 2001
From: Mousumi Jana <mousumix.jana@intel.com>
Date: Thu, 28 Apr 2016 18:45:26 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Fix memory leak during init instance
param_data variable is allocated during set module format of init
instance is not getting freed and hence can cause a memory leak.
So free it up.
Signed-off-by: Mousumi Jana <mousumix.jana@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/intel/skylake/skl-messages.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index e3d149c68bbf..226db84ba20f 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -864,7 +864,7 @@ int skl_init_module(struct skl_sst *ctx,
return ret;
}
mconfig->m_state = SKL_MODULE_INIT_DONE;
-
+ kfree(param_data);
return ret;
}
--
2.8.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 3/5] ASoC: Intel: Skylake: Prevent sending Set DMA Control IPC if the widget is "On"
2016-04-28 13:15 [PATCH 0/5] ASoC: Intel: Skylake: Wov optimizations Vinod Koul
2016-04-28 13:15 ` [PATCH 1/5] ASoC: Intel: Skylake: Fix the NULL pointer exception in dsp_clean up Vinod Koul
2016-04-28 13:15 ` [PATCH 2/5] ASoC: Intel: Skylake: Fix memory leak during init instance Vinod Koul
@ 2016-04-28 13:15 ` Vinod Koul
2016-05-02 11:03 ` Applied "ASoC: Intel: Skylake: Prevent sending Set DMA Control IPC if the widget is "On"" to the asoc tree Mark Brown
2016-04-28 13:15 ` [PATCH 4/5] ASoC: Intel: Skylake: Suspend PCMs when marked as active suspend Vinod Koul
2016-04-28 13:15 ` [PATCH 5/5] ASoC: Intel: Boards: remove ignore_suspend for WoV streams Vinod Koul
4 siblings, 1 reply; 11+ messages in thread
From: Vinod Koul @ 2016-04-28 13:15 UTC (permalink / raw)
To: alsa-devel
Cc: Dharageswari.R, patches.audio, liam.r.girdwood, Vinod Koul,
broonie, Jeeja KP
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 --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);
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Applied "ASoC: Intel: Skylake: Prevent sending Set DMA Control IPC if the widget is "On"" to the asoc tree
2016-04-28 13:15 ` [PATCH 3/5] ASoC: Intel: Skylake: Prevent sending Set DMA Control IPC if the widget is "On" Vinod Koul
@ 2016-05-02 11:03 ` Mark Brown
0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2016-05-02 11:03 UTC (permalink / raw)
Cc: alsa-devel, Dharageswari.R, Vinod Koul, liam.r.girdwood,
patches.audio, broonie, Jeeja KP
The patch
ASoC: Intel: Skylake: Prevent sending Set DMA Control IPC if the widget is "On"
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 1a13b1fafffd41c12a7068c4aa74f5a1d2210a07 Mon Sep 17 00:00:00 2001
From: "Dharageswari.R" <dharageswari.r@intel.com>
Date: Thu, 28 Apr 2016 18:45:27 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Prevent sending Set DMA Control IPC if
the widget is "On"
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/intel/skylake/skl-pcm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index dab0900eef26..4fcf5f830a8c 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);
--
2.8.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/5] ASoC: Intel: Skylake: Suspend PCMs when marked as active suspend
2016-04-28 13:15 [PATCH 0/5] ASoC: Intel: Skylake: Wov optimizations Vinod Koul
` (2 preceding siblings ...)
2016-04-28 13:15 ` [PATCH 3/5] ASoC: Intel: Skylake: Prevent sending Set DMA Control IPC if the widget is "On" Vinod Koul
@ 2016-04-28 13:15 ` Vinod Koul
2016-05-02 11:03 ` Applied "ASoC: Intel: Skylake: Suspend PCMs when marked as active suspend" to the asoc tree Mark Brown
2016-04-28 13:15 ` [PATCH 5/5] ASoC: Intel: Boards: remove ignore_suspend for WoV streams Vinod Koul
4 siblings, 1 reply; 11+ messages in thread
From: Vinod Koul @ 2016-04-28 13:15 UTC (permalink / raw)
To: alsa-devel; +Cc: liam.r.girdwood, patches.audio, broonie, Vinod Koul, Jeeja KP
From: Jeeja KP <jeeja.kp@intel.com>
For 'ignore_suspend' cases we need to keep DSP and pipes On, but
can suspend the stream and pause the DMA as we are not rendering
data during the suspended time.
For this we can check the dai widget ignore_suspend flag in
trigger suspend/resume, and start and stop the host DMA and host
copier pipelines.
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 | 30 ++++++++++++++++++++----------
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index df24d8c6b757..c726937321ef 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -402,23 +402,33 @@ static int skl_pcm_trigger(struct snd_pcm_substream *substream, int cmd,
struct skl_module_cfg *mconfig;
struct hdac_ext_bus *ebus = get_bus_ctx(substream);
struct hdac_ext_stream *stream = get_hdac_ext_stream(substream);
+ struct snd_soc_dapm_widget *w;
int ret;
mconfig = skl_tplg_fe_get_cpr_module(dai, substream->stream);
if (!mconfig)
return -EIO;
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ w = dai->playback_widget;
+ else
+ w = dai->capture_widget;
+
switch (cmd) {
case SNDRV_PCM_TRIGGER_RESUME:
- skl_pcm_prepare(substream, dai);
- /*
- * enable DMA Resume enable bit for the stream, set the dpib
- * & lpib position to resune before starting the DMA
- */
- snd_hdac_ext_stream_drsm_enable(ebus, true,
- hdac_stream(stream)->index);
- snd_hdac_ext_stream_set_dpibr(ebus, stream, stream->dpib);
- snd_hdac_ext_stream_set_lpib(stream, stream->lpib);
+ if (!w->ignore_suspend) {
+ skl_pcm_prepare(substream, dai);
+ /*
+ * enable DMA Resume enable bit for the stream, set the
+ * dpib & lpib position to resume before starting the
+ * DMA
+ */
+ snd_hdac_ext_stream_drsm_enable(ebus, true,
+ hdac_stream(stream)->index);
+ snd_hdac_ext_stream_set_dpibr(ebus, stream,
+ stream->dpib);
+ snd_hdac_ext_stream_set_lpib(stream, stream->lpib);
+ }
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
@@ -448,7 +458,7 @@ static int skl_pcm_trigger(struct snd_pcm_substream *substream, int cmd,
return ret;
ret = skl_decoupled_trigger(substream, cmd);
- if (cmd == SNDRV_PCM_TRIGGER_SUSPEND) {
+ if ((cmd == SNDRV_PCM_TRIGGER_SUSPEND) && !w->ignore_suspend) {
/* save the dpib and lpib positions */
stream->dpib = readl(ebus->bus.remap_addr +
AZX_REG_VS_SDXDPIB_XBASE +
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* Applied "ASoC: Intel: Skylake: Suspend PCMs when marked as active suspend" to the asoc tree
2016-04-28 13:15 ` [PATCH 4/5] ASoC: Intel: Skylake: Suspend PCMs when marked as active suspend Vinod Koul
@ 2016-05-02 11:03 ` Mark Brown
0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2016-05-02 11:03 UTC (permalink / raw)
To: Jeeja KP; +Cc: Vinod Koul, liam.r.girdwood, alsa-devel, broonie, patches.audio
The patch
ASoC: Intel: Skylake: Suspend PCMs when marked as active suspend
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 9a655db0201ef523683d700cb3f4508c08bc9d8c Mon Sep 17 00:00:00 2001
From: Jeeja KP <jeeja.kp@intel.com>
Date: Thu, 28 Apr 2016 18:45:28 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Suspend PCMs when marked as active
suspend
For 'ignore_suspend' cases we need to keep DSP and pipes On, but
can suspend the stream and pause the DMA as we are not rendering
data during the suspended time.
For this we can check the dai widget ignore_suspend flag in
trigger suspend/resume, and start and stop the host DMA and host
copier pipelines.
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/intel/skylake/skl-pcm.c | 30 ++++++++++++++++++++----------
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index 4fcf5f830a8c..b0e7797f2259 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -402,23 +402,33 @@ static int skl_pcm_trigger(struct snd_pcm_substream *substream, int cmd,
struct skl_module_cfg *mconfig;
struct hdac_ext_bus *ebus = get_bus_ctx(substream);
struct hdac_ext_stream *stream = get_hdac_ext_stream(substream);
+ struct snd_soc_dapm_widget *w;
int ret;
mconfig = skl_tplg_fe_get_cpr_module(dai, substream->stream);
if (!mconfig)
return -EIO;
+ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+ w = dai->playback_widget;
+ else
+ w = dai->capture_widget;
+
switch (cmd) {
case SNDRV_PCM_TRIGGER_RESUME:
- skl_pcm_prepare(substream, dai);
- /*
- * enable DMA Resume enable bit for the stream, set the dpib
- * & lpib position to resune before starting the DMA
- */
- snd_hdac_ext_stream_drsm_enable(ebus, true,
- hdac_stream(stream)->index);
- snd_hdac_ext_stream_set_dpibr(ebus, stream, stream->dpib);
- snd_hdac_ext_stream_set_lpib(stream, stream->lpib);
+ if (!w->ignore_suspend) {
+ skl_pcm_prepare(substream, dai);
+ /*
+ * enable DMA Resume enable bit for the stream, set the
+ * dpib & lpib position to resume before starting the
+ * DMA
+ */
+ snd_hdac_ext_stream_drsm_enable(ebus, true,
+ hdac_stream(stream)->index);
+ snd_hdac_ext_stream_set_dpibr(ebus, stream,
+ stream->dpib);
+ snd_hdac_ext_stream_set_lpib(stream, stream->lpib);
+ }
case SNDRV_PCM_TRIGGER_START:
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
@@ -448,7 +458,7 @@ static int skl_pcm_trigger(struct snd_pcm_substream *substream, int cmd,
return ret;
ret = skl_decoupled_trigger(substream, cmd);
- if (cmd == SNDRV_PCM_TRIGGER_SUSPEND) {
+ if ((cmd == SNDRV_PCM_TRIGGER_SUSPEND) && !w->ignore_suspend) {
/* save the dpib and lpib positions */
stream->dpib = readl(ebus->bus.remap_addr +
AZX_REG_VS_SDXDPIB_XBASE +
--
2.8.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/5] ASoC: Intel: Boards: remove ignore_suspend for WoV streams
2016-04-28 13:15 [PATCH 0/5] ASoC: Intel: Skylake: Wov optimizations Vinod Koul
` (3 preceding siblings ...)
2016-04-28 13:15 ` [PATCH 4/5] ASoC: Intel: Skylake: Suspend PCMs when marked as active suspend Vinod Koul
@ 2016-04-28 13:15 ` Vinod Koul
2016-05-02 11:03 ` Applied "ASoC: Intel: Boards: remove ignore_suspend for WoV streams" to the asoc tree Mark Brown
4 siblings, 1 reply; 11+ messages in thread
From: Vinod Koul @ 2016-04-28 13:15 UTC (permalink / raw)
To: alsa-devel; +Cc: liam.r.girdwood, patches.audio, broonie, Vinod Koul, Jeeja KP
From: Jeeja KP <jeeja.kp@intel.com>
On WoV we can suspend the DMA and keep the DSP pipelines only On,
so remove the ignore_suspend for WoV streams but keep them for
WoV endpoints.
This helps in achieving better power by suspending DMAs
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
sound/soc/intel/boards/skl_nau88l25_max98357a.c | 1 -
sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 1 -
sound/soc/intel/boards/skl_rt286.c | 1 -
3 files changed, 3 deletions(-)
diff --git a/sound/soc/intel/boards/skl_nau88l25_max98357a.c b/sound/soc/intel/boards/skl_nau88l25_max98357a.c
index 8ccc97c6255f..c3e85fb550cb 100644
--- a/sound/soc/intel/boards/skl_nau88l25_max98357a.c
+++ b/sound/soc/intel/boards/skl_nau88l25_max98357a.c
@@ -434,7 +434,6 @@ static struct snd_soc_dai_link skylake_dais[] = {
.platform_name = "0000:00:1f.3",
.init = NULL,
.dpcm_capture = 1,
- .ignore_suspend = 1,
.nonatomic = 1,
.dynamic = 1,
.ops = &skylaye_refcap_ops,
diff --git a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
index bde85bf989b8..0aeceaa6f3ba 100644
--- a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
+++ b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
@@ -482,7 +482,6 @@ static struct snd_soc_dai_link skylake_dais[] = {
.platform_name = "0000:00:1f.3",
.init = NULL,
.dpcm_capture = 1,
- .ignore_suspend = 1,
.nonatomic = 1,
.dynamic = 1,
.ops = &skylaye_refcap_ops,
diff --git a/sound/soc/intel/boards/skl_rt286.c b/sound/soc/intel/boards/skl_rt286.c
index 06de802898fb..e2b5b855ae71 100644
--- a/sound/soc/intel/boards/skl_rt286.c
+++ b/sound/soc/intel/boards/skl_rt286.c
@@ -338,7 +338,6 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = {
.platform_name = "0000:00:1f.3",
.init = NULL,
.dpcm_capture = 1,
- .ignore_suspend = 1,
.nonatomic = 1,
.dynamic = 1,
},
--
1.9.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* Applied "ASoC: Intel: Boards: remove ignore_suspend for WoV streams" to the asoc tree
2016-04-28 13:15 ` [PATCH 5/5] ASoC: Intel: Boards: remove ignore_suspend for WoV streams Vinod Koul
@ 2016-05-02 11:03 ` Mark Brown
0 siblings, 0 replies; 11+ messages in thread
From: Mark Brown @ 2016-05-02 11:03 UTC (permalink / raw)
To: Jeeja KP; +Cc: Vinod Koul, liam.r.girdwood, alsa-devel, broonie, patches.audio
The patch
ASoC: Intel: Boards: remove ignore_suspend for WoV streams
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 551f4bc86807637098786c78afb78418ada4aa1f Mon Sep 17 00:00:00 2001
From: Jeeja KP <jeeja.kp@intel.com>
Date: Thu, 28 Apr 2016 18:45:29 +0530
Subject: [PATCH] ASoC: Intel: Boards: remove ignore_suspend for WoV streams
On WoV we can suspend the DMA and keep the DSP pipelines only On,
so remove the ignore_suspend for WoV streams but keep them for
WoV endpoints.
This helps in achieving better power by suspending DMAs
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/intel/boards/skl_nau88l25_max98357a.c | 1 -
sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 1 -
sound/soc/intel/boards/skl_rt286.c | 1 -
3 files changed, 3 deletions(-)
diff --git a/sound/soc/intel/boards/skl_nau88l25_max98357a.c b/sound/soc/intel/boards/skl_nau88l25_max98357a.c
index 72176b79a18d..ca8063d9da55 100644
--- a/sound/soc/intel/boards/skl_nau88l25_max98357a.c
+++ b/sound/soc/intel/boards/skl_nau88l25_max98357a.c
@@ -391,7 +391,6 @@ static struct snd_soc_dai_link skylake_dais[] = {
.platform_name = "0000:00:1f.3",
.init = NULL,
.dpcm_capture = 1,
- .ignore_suspend = 1,
.nonatomic = 1,
.dynamic = 1,
.ops = &skylaye_refcap_ops,
diff --git a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
index 5f1ca99ae9b0..a0e3a3f85658 100644
--- a/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
+++ b/sound/soc/intel/boards/skl_nau88l25_ssm4567.c
@@ -440,7 +440,6 @@ static struct snd_soc_dai_link skylake_dais[] = {
.platform_name = "0000:00:1f.3",
.init = NULL,
.dpcm_capture = 1,
- .ignore_suspend = 1,
.nonatomic = 1,
.dynamic = 1,
.ops = &skylaye_refcap_ops,
diff --git a/sound/soc/intel/boards/skl_rt286.c b/sound/soc/intel/boards/skl_rt286.c
index 2016397a8e75..ef5b17fbd751 100644
--- a/sound/soc/intel/boards/skl_rt286.c
+++ b/sound/soc/intel/boards/skl_rt286.c
@@ -317,7 +317,6 @@ static struct snd_soc_dai_link skylake_rt286_dais[] = {
.platform_name = "0000:00:1f.3",
.init = NULL,
.dpcm_capture = 1,
- .ignore_suspend = 1,
.nonatomic = 1,
.dynamic = 1,
},
--
2.8.1
^ permalink raw reply related [flat|nested] 11+ messages in thread