All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, patches.audio@intel.com,
	liam.r.girdwood@linux.intel.com,
	Vinod Koul <vinod.koul@intel.com>,
	broonie@kernel.org, Jeeja KP <jeeja.kp@intel.com>
Subject: [PATCH 6/9] ASoC: Intel: Skylake: Add support to disable module notifications
Date: Thu, 22 Oct 2015 23:22:39 +0530	[thread overview]
Message-ID: <1445536362-26670-7-git-send-email-vinod.koul@intel.com> (raw)
In-Reply-To: <1445536362-26670-1-git-send-email-vinod.koul@intel.com>

From: Jeeja KP <jeeja.kp@intel.com>

Each FW modules can report underrun/overrun notification from
all modules. This patch disables underrun/overrun notification after
firmware is loaded.
This will be supportted for debug mode only thru debugfs

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/intel/skylake/skl-messages.c | 28 ++++++++++++++++++++++++++--
 sound/soc/intel/skylake/skl-topology.h |  5 +++++
 2 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index 77c0736d3c9e..ca7bbeea2cd9 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -54,6 +54,24 @@ static int skl_free_dma_buf(struct device *dev, struct snd_dma_buffer *dmab)
 	return 0;
 }
 
+#define NOTIFICATION_PARAM_ID 3
+#define NOTIFICATION_MASK 0xf
+
+/* disable notfication for underruns/overruns from firmware module */
+static void skl_dsp_enable_notification(struct skl_sst *ctx, bool enable)
+{
+	struct notification_mask mask;
+	struct skl_ipc_large_config_msg	msg = {0};
+
+	mask.notify = NOTIFICATION_MASK;
+	mask.enable = enable;
+
+	msg.large_param_id = NOTIFICATION_PARAM_ID;
+	msg.param_data_size = sizeof(mask);
+
+	skl_ipc_set_large_config(&ctx->ipc, &msg, (u32 *)&mask);
+}
+
 int skl_init_dsp(struct skl *skl)
 {
 	void __iomem *mmio_base;
@@ -79,7 +97,7 @@ int skl_init_dsp(struct skl *skl)
 
 	ret = skl_sst_dsp_init(bus->dev, mmio_base, irq,
 			loader_ops, &skl->skl_sst);
-
+	skl_dsp_enable_notification(skl->skl_sst, false);
 	dev_dbg(bus->dev, "dsp registration status=%d\n", ret);
 
 	return ret;
@@ -122,6 +140,7 @@ int skl_suspend_dsp(struct skl *skl)
 int skl_resume_dsp(struct skl *skl)
 {
 	struct skl_sst *ctx = skl->skl_sst;
+	int ret;
 
 	/* if ppcap is not supported return 0 */
 	if (!skl->ebus.ppcap)
@@ -131,7 +150,12 @@ int skl_resume_dsp(struct skl *skl)
 	snd_hdac_ext_bus_ppcap_enable(&skl->ebus, true);
 	snd_hdac_ext_bus_ppcap_int_enable(&skl->ebus, true);
 
-	return skl_dsp_wake(ctx->dsp);
+	ret = skl_dsp_wake(ctx->dsp);
+	if (ret < 0)
+		return ret;
+
+	skl_dsp_enable_notification(skl->skl_sst, false);
+	return ret;
 }
 
 enum skl_bitdepth skl_get_bit_depth(int params)
diff --git a/sound/soc/intel/skylake/skl-topology.h b/sound/soc/intel/skylake/skl-topology.h
index 2399535a196a..76053a8de41c 100644
--- a/sound/soc/intel/skylake/skl-topology.h
+++ b/sound/soc/intel/skylake/skl-topology.h
@@ -129,6 +129,11 @@ struct skl_src_module_cfg {
 	enum skl_s_freq src_cfg;
 } __packed;
 
+struct notification_mask {
+	u32 notify;
+	u32 enable;
+} __packed;
+
 struct skl_up_down_mixer_cfg {
 	struct skl_base_cfg base_cfg;
 	enum skl_ch_cfg out_ch_cfg;
-- 
1.9.1

  parent reply	other threads:[~2015-10-22 17:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-22 17:52 [PATCH 0/9] ASoC: Intel: Skylake: Fixes and updates Vinod Koul
2015-10-22 17:52 ` [PATCH 1/9] ASoC: Intel: Skylake: Fix return for pm_runtime_get_sync() Vinod Koul
2015-10-23 17:47   ` Applied "ASoC: Intel: Skylake: Fix return for pm_runtime_get_sync()" to the asoc tree Mark Brown
2015-10-22 17:52 ` [PATCH 2/9] ASoC: Intel: Skylake: Remove BE copier blob memcpy Vinod Koul
2015-10-23 17:47   ` Applied "ASoC: Intel: Skylake: Remove BE copier blob memcpy" to the asoc tree Mark Brown
2015-10-22 17:52 ` [PATCH 3/9] ASoC: Intel: Skylake: Fix to use correct macros for the path iteration Vinod Koul
2015-10-23 17:47   ` Applied "ASoC: Intel: Skylake: Fix to use correct macros for the path iteration" to the asoc tree Mark Brown
2015-10-22 17:52 ` [PATCH 4/9] ASoC: Intel: Skylake: Fix to fill all sink/source pipe params Vinod Koul
2015-10-23 17:47   ` Applied "ASoC: Intel: Skylake: Fix to fill all sink/source pipe params" to the asoc tree Mark Brown
2015-10-22 17:52 ` [PATCH 5/9] ASoC: Intel: Skylake: Update for ssp node index in copier cfg Vinod Koul
2015-10-23 16:30   ` Mark Brown
2015-10-24 11:56     ` Vinod Koul
2015-10-23 17:47   ` Applied "ASoC: Intel: Skylake: Update for ssp node index in copier cfg" to the asoc tree Mark Brown
2015-10-22 17:52 ` Vinod Koul [this message]
2015-10-23 17:47   ` Applied "ASoC: Intel: Skylake: Add support to disable module notifications" " Mark Brown
2015-10-22 17:52 ` [PATCH 7/9] ASoC: Intel: Skylake: Fix to check return value of dsp init Vinod Koul
2015-10-23 17:47   ` Applied "ASoC: Intel: Skylake: Fix to check return value of dsp init" to the asoc tree Mark Brown
2015-10-22 17:52 ` [PATCH 8/9] ASoC: Intel: Skylake: Fix to set Non gateway copier cfg Vinod Koul
2015-10-23 17:47   ` Applied "ASoC: Intel: Skylake: Fix to set Non gateway copier cfg" to the asoc tree Mark Brown
2015-10-22 17:52 ` [PATCH 9/9] ASoC: Intel: Skylake: Add support to topology for module static pin Vinod Koul
2015-10-23 17:47   ` Applied "ASoC: Intel: Skylake: Add support to topology for module static pin" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445536362-26670-7-git-send-email-vinod.koul@intel.com \
    --to=vinod.koul@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=jeeja.kp@intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=patches.audio@intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.