All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] ASoC: Intel: Skylake: Fixes and updates
@ 2015-10-22 17:52 Vinod Koul
  2015-10-22 17:52 ` [PATCH 1/9] ASoC: Intel: Skylake: Fix return for pm_runtime_get_sync() Vinod Koul
                   ` (8 more replies)
  0 siblings, 9 replies; 21+ messages in thread
From: Vinod Koul @ 2015-10-22 17:52 UTC (permalink / raw)
  To: alsa-devel; +Cc: liam.r.girdwood, tiwai, broonie, Vinod Koul, patches.audio

This series adds various fixes thru the driver. It also updates ssp node
structure to latest FW interface. Last patch add support for static pin
connections between modules, which is useful for intra pipe connections

Jeeja KP (7):
  ASoC: Intel: Skylake: Fix return for pm_runtime_get_sync()
  ASoC: Intel: Skylake: Remove BE copier blob memcpy
  ASoC: Intel: Skylake: Update for ssp node index in copier cfg
  ASoC: Intel: Skylake: Add support to disable module notifications
  ASoC: Intel: Skylake: Fix to check return value of dsp init
  ASoC: Intel: Skylake: Fix to set Non gateway copier cfg
  ASoC: Intel: Skylake: Add support to topology for module static pin

Subhransu S. Prusty (2):
  ASoC: Intel: Skylake: Fix to use correct macros for the path iteration
  ASoC: Intel: Skylake: Fix to fill all sink/source pipe params

 sound/soc/intel/skylake/skl-messages.c       | 44 +++++++++++++++--
 sound/soc/intel/skylake/skl-pcm.c            |  2 +-
 sound/soc/intel/skylake/skl-topology.c       | 74 +++++++++++++++++-----------
 sound/soc/intel/skylake/skl-topology.h       |  8 ++-
 sound/soc/intel/skylake/skl-tplg-interface.h |  7 ++-
 5 files changed, 95 insertions(+), 40 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH 1/9] ASoC: Intel: Skylake: Fix return for pm_runtime_get_sync()
  2015-10-22 17:52 [PATCH 0/9] ASoC: Intel: Skylake: Fixes and updates Vinod Koul
@ 2015-10-22 17:52 ` 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
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 21+ messages in thread
From: Vinod Koul @ 2015-10-22 17:52 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, patches.audio, liam.r.girdwood, Vinod Koul, broonie, Jeeja KP

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

pm_runtime_get_sync() will return a negative value in case of
error and can return postive value for success.  The return check
for pm_runtime_get_sync() must be less than 0, so fix it

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 a8f53da11ae3..a2f94ce1679d 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -116,7 +116,7 @@ static int skl_pcm_open(struct snd_pcm_substream *substream,
 
 	dev_dbg(dai->dev, "%s: %s\n", __func__, dai->name);
 	ret = pm_runtime_get_sync(dai->dev);
-	if (ret)
+	if (ret < 0)
 		return ret;
 
 	stream = snd_hdac_ext_stream_assign(ebus, substream,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 2/9] ASoC: Intel: Skylake: Remove BE copier blob memcpy
  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-22 17:52 ` 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
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 21+ messages in thread
From: Vinod Koul @ 2015-10-22 17:52 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, patches.audio, liam.r.girdwood, Vinod Koul, broonie, Jeeja KP

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

The BE copier private data allowed endpoint configuration blobs, now these
are queried from BIOS, we don't need to copy the blob, but only capability.

Removing the blob from private data will not allocate memory for module
specific config in which case memcpy will fail. Fix is to assign the ptr
queried from the NHLT table for the endpoint configuration.

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

diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index a5d8420ce69a..7c920857007e 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -926,7 +926,7 @@ static int skl_tplg_be_fill_pipe_params(struct snd_soc_dai *dai,
 					params->s_freq, params->stream);
 	if (cfg) {
 		mconfig->formats_config.caps_size = cfg->size;
-		memcpy(mconfig->formats_config.caps, &cfg->caps, cfg->size);
+		mconfig->formats_config.caps = (u32 *) &cfg->caps;
 	} else {
 		dev_err(dai->dev, "Blob NULL for id %x type %d dirn %d\n",
 					mconfig->vbus_id, link_type,
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 3/9] ASoC: Intel: Skylake: Fix to use correct macros for the path iteration
  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-22 17:52 ` [PATCH 2/9] ASoC: Intel: Skylake: Remove BE copier blob memcpy Vinod Koul
@ 2015-10-22 17:52 ` 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
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 21+ messages in thread
From: Vinod Koul @ 2015-10-22 17:52 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, patches.audio, liam.r.girdwood, Vinod Koul, broonie,
	Subhransu S. Prusty

From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>

In case of playback, for the BE dai source path should be iterated to find
the pipe params. With sink path iterated, this resulted in a loop and kernel
panic with page request failure.
Similar are the cases for Capture and FE dais. Using correct macros to fix
the panic

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/intel/skylake/skl-topology.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index 7c920857007e..0fba39dcb2ab 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -844,7 +844,7 @@ skl_tplg_fe_get_cpr_module(struct snd_soc_dai *dai, int stream)
 
 	if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
 		w = dai->playback_widget;
-		snd_soc_dapm_widget_for_each_source_path(w, p) {
+		snd_soc_dapm_widget_for_each_sink_path(w, p) {
 			if (p->connect && p->sink->power &&
 					is_skl_dsp_widget_type(p->sink))
 				continue;
@@ -857,7 +857,7 @@ skl_tplg_fe_get_cpr_module(struct snd_soc_dai *dai, int stream)
 		}
 	} else {
 		w = dai->capture_widget;
-		snd_soc_dapm_widget_for_each_sink_path(w, p) {
+		snd_soc_dapm_widget_for_each_source_path(w, p) {
 			if (p->connect && p->source->power &&
 					is_skl_dsp_widget_type(p->source))
 				continue;
@@ -945,7 +945,7 @@ static int skl_tplg_be_set_src_pipe_params(struct snd_soc_dai *dai,
 {
 	struct snd_soc_dapm_path *p;
 
-	snd_soc_dapm_widget_for_each_sink_path(w, p) {
+	snd_soc_dapm_widget_for_each_source_path(w, p) {
 		if (p->connect && is_skl_dsp_widget_type(p->source) &&
 						p->source->priv) {
 
@@ -969,7 +969,7 @@ static int skl_tplg_be_set_sink_pipe_params(struct snd_soc_dai *dai,
 {
 	struct snd_soc_dapm_path *p = NULL;
 
-	snd_soc_dapm_widget_for_each_source_path(w, p) {
+	snd_soc_dapm_widget_for_each_sink_path(w, p) {
 		if (p->connect && is_skl_dsp_widget_type(p->sink) &&
 						p->sink->priv) {
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 4/9] ASoC: Intel: Skylake: Fix to fill all sink/source pipe params
  2015-10-22 17:52 [PATCH 0/9] ASoC: Intel: Skylake: Fixes and updates Vinod Koul
                   ` (2 preceding siblings ...)
  2015-10-22 17:52 ` [PATCH 3/9] ASoC: Intel: Skylake: Fix to use correct macros for the path iteration Vinod Koul
@ 2015-10-22 17:52 ` 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
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 21+ messages in thread
From: Vinod Koul @ 2015-10-22 17:52 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, liam.r.girdwood, patches.audio, broonie, Jeeja KP,
	Vinod Koul, Subhransu S. Prusty

From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>

Currently params only for first copier widget identified in the
source/sink path is queried from NHLT. In the dapm route the
playback/capture widget may be connected to more than one copier
widget. This patch adds return check to return only for any error
case.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@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-topology.c | 32 ++++++++++++++++++++++----------
 1 file changed, 22 insertions(+), 10 deletions(-)

diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index 0fba39dcb2ab..68e1b00ce7ed 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -944,48 +944,60 @@ static int skl_tplg_be_set_src_pipe_params(struct snd_soc_dai *dai,
 				struct skl_pipe_params *params)
 {
 	struct snd_soc_dapm_path *p;
+	int ret = -EIO;
 
 	snd_soc_dapm_widget_for_each_source_path(w, p) {
 		if (p->connect && is_skl_dsp_widget_type(p->source) &&
 						p->source->priv) {
 
-			if (!p->source->power)
-				return skl_tplg_be_fill_pipe_params(
+			if (!p->source->power) {
+				ret = skl_tplg_be_fill_pipe_params(
 						dai, p->source->priv,
 						params);
-			else
+				if (ret < 0)
+					return ret;
+			} else {
 				return -EBUSY;
+			}
 		} else {
-			return skl_tplg_be_set_src_pipe_params(
+			ret = skl_tplg_be_set_src_pipe_params(
 						dai, p->source,	params);
+			if (ret < 0)
+				return ret;
 		}
 	}
 
-	return -EIO;
+	return ret;
 }
 
 static int skl_tplg_be_set_sink_pipe_params(struct snd_soc_dai *dai,
 	struct snd_soc_dapm_widget *w, struct skl_pipe_params *params)
 {
 	struct snd_soc_dapm_path *p = NULL;
+	int ret = -EIO;
 
 	snd_soc_dapm_widget_for_each_sink_path(w, p) {
 		if (p->connect && is_skl_dsp_widget_type(p->sink) &&
 						p->sink->priv) {
 
-			if (!p->sink->power)
-				return skl_tplg_be_fill_pipe_params(
+			if (!p->sink->power) {
+				ret = skl_tplg_be_fill_pipe_params(
 						dai, p->sink->priv, params);
-			else
+				if (ret < 0)
+					return ret;
+			} else {
 				return -EBUSY;
+			}
 
 		} else {
-			return skl_tplg_be_set_sink_pipe_params(
+			ret = skl_tplg_be_set_sink_pipe_params(
 						dai, p->sink, params);
+			if (ret < 0)
+				return ret;
 		}
 	}
 
-	return -EIO;
+	return ret;
 }
 
 /*
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 5/9] ASoC: Intel: Skylake: Update for ssp node index in copier cfg
  2015-10-22 17:52 [PATCH 0/9] ASoC: Intel: Skylake: Fixes and updates Vinod Koul
                   ` (3 preceding siblings ...)
  2015-10-22 17:52 ` [PATCH 4/9] ASoC: Intel: Skylake: Fix to fill all sink/source pipe params Vinod Koul
@ 2015-10-22 17:52 ` Vinod Koul
  2015-10-23 16:30   ` Mark Brown
  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 ` [PATCH 6/9] ASoC: Intel: Skylake: Add support to disable module notifications Vinod Koul
                   ` (3 subsequent siblings)
  8 siblings, 2 replies; 21+ messages in thread
From: Vinod Koul @ 2015-10-22 17:52 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, patches.audio, liam.r.girdwood, Vinod Koul, broonie, Jeeja KP

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

DSP firmware has interface change for SSP node index structure.
New FW interface removes the dual_mono field and adds 4 bits for
TDM slot group index. This patch updates the ssp dma to align with
the DSP firmware structure.

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 | 7 ++++---
 sound/soc/intel/skylake/skl-topology.h | 3 +--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index 826d4fd8930a..77c0736d3c9e 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -303,6 +303,7 @@ static void skl_setup_cpr_gateway_cfg(struct skl_sst *ctx,
 			struct skl_cpr_cfg *cpr_mconfig)
 {
 	union skl_connector_node_id node_id = {0};
+	union skl_ssp_dma_node ssp_node  = {0};
 	struct skl_pipe_params *params = mconfig->pipe->p_params;
 
 	switch (mconfig->dev_type) {
@@ -320,9 +321,9 @@ static void skl_setup_cpr_gateway_cfg(struct skl_sst *ctx,
 			(SKL_CONN_SOURCE == mconfig->hw_conn_type) ?
 			SKL_DMA_I2S_LINK_OUTPUT_CLASS :
 			SKL_DMA_I2S_LINK_INPUT_CLASS;
-		node_id.node.vindex = params->host_dma_id +
-					 (mconfig->time_slot << 1) +
-					 (mconfig->vbus_id << 3);
+		ssp_node.dma_node.time_slot_index = mconfig->time_slot;
+		ssp_node.dma_node.i2s_instance = mconfig->vbus_id;
+		node_id.node.vindex = ssp_node.val;
 		break;
 
 	case SKL_DEVICE_DMIC:
diff --git a/sound/soc/intel/skylake/skl-topology.h b/sound/soc/intel/skylake/skl-topology.h
index 0c83dc3ea3e2..2399535a196a 100644
--- a/sound/soc/intel/skylake/skl-topology.h
+++ b/sound/soc/intel/skylake/skl-topology.h
@@ -153,8 +153,7 @@ enum skl_dma_type {
 union skl_ssp_dma_node {
 	u8 val;
 	struct {
-		u8 dual_mono:1;
-		u8 time_slot:3;
+		u8 time_slot_index:4;
 		u8 i2s_instance:4;
 	} dma_node;
 };
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 6/9] ASoC: Intel: Skylake: Add support to disable module notifications
  2015-10-22 17:52 [PATCH 0/9] ASoC: Intel: Skylake: Fixes and updates Vinod Koul
                   ` (4 preceding siblings ...)
  2015-10-22 17:52 ` [PATCH 5/9] ASoC: Intel: Skylake: Update for ssp node index in copier cfg Vinod Koul
@ 2015-10-22 17:52 ` Vinod Koul
  2015-10-23 17:47   ` Applied "ASoC: Intel: Skylake: Add support to disable module notifications" to the asoc tree Mark Brown
  2015-10-22 17:52 ` [PATCH 7/9] ASoC: Intel: Skylake: Fix to check return value of dsp init Vinod Koul
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 21+ messages in thread
From: Vinod Koul @ 2015-10-22 17:52 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, patches.audio, liam.r.girdwood, Vinod Koul, broonie, Jeeja KP

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

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 7/9] ASoC: Intel: Skylake: Fix to check return value of dsp init
  2015-10-22 17:52 [PATCH 0/9] ASoC: Intel: Skylake: Fixes and updates Vinod Koul
                   ` (5 preceding siblings ...)
  2015-10-22 17:52 ` [PATCH 6/9] ASoC: Intel: Skylake: Add support to disable module notifications Vinod Koul
@ 2015-10-22 17:52 ` 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-22 17:52 ` [PATCH 9/9] ASoC: Intel: Skylake: Add support to topology for module static pin Vinod Koul
  8 siblings, 1 reply; 21+ messages in thread
From: Vinod Koul @ 2015-10-22 17:52 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, patches.audio, liam.r.girdwood, Vinod Koul, broonie, Jeeja KP

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

If DSP initialization fails, ipc to disable notification
will cause NULL ptr exception as ipc is not initialized.
This patch returns error if dsp init fails before
sending disable notification ipc.

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 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index ca7bbeea2cd9..a1001a686aa9 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -97,6 +97,9 @@ int skl_init_dsp(struct skl *skl)
 
 	ret = skl_sst_dsp_init(bus->dev, mmio_base, irq,
 			loader_ops, &skl->skl_sst);
+	if (ret < 0)
+		return ret;
+
 	skl_dsp_enable_notification(skl->skl_sst, false);
 	dev_dbg(bus->dev, "dsp registration status=%d\n", ret);
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 8/9] ASoC: Intel: Skylake: Fix to set Non gateway copier cfg
  2015-10-22 17:52 [PATCH 0/9] ASoC: Intel: Skylake: Fixes and updates Vinod Koul
                   ` (6 preceding siblings ...)
  2015-10-22 17:52 ` [PATCH 7/9] ASoC: Intel: Skylake: Fix to check return value of dsp init Vinod Koul
@ 2015-10-22 17:52 ` 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
  8 siblings, 1 reply; 21+ messages in thread
From: Vinod Koul @ 2015-10-22 17:52 UTC (permalink / raw)
  To: alsa-devel
  Cc: Dharageswari.R, tiwai, liam.r.girdwood, patches.audio, broonie,
	Jeeja KP, Vinod Koul

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

If copier instance is connected to a DMA gateway then driver
needs to configure the gateway configuration otherwise set
it to invalid.
This patch sets the non gateway copier node value to invalid.

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-messages.c       | 8 +++++++-
 sound/soc/intel/skylake/skl-tplg-interface.h | 1 +
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index a1001a686aa9..50a109503a3f 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -321,6 +321,7 @@ static void skl_copy_copier_caps(struct skl_module_cfg *mconfig,
 			(mconfig->formats_config.caps_size) / 4;
 }
 
+#define SKL_NON_GATEWAY_CPR_NODE_ID 0xFFFFFFFF
 /*
  * Calculate the gatewat settings required for copier module, type of
  * gateway and index of gateway to use
@@ -367,13 +368,18 @@ static void skl_setup_cpr_gateway_cfg(struct skl_sst *ctx,
 		node_id.node.vindex = params->link_dma_id;
 		break;
 
-	default:
+	case SKL_DEVICE_HDAHOST:
 		node_id.node.dma_type =
 			(SKL_CONN_SOURCE == mconfig->hw_conn_type) ?
 			SKL_DMA_HDA_HOST_OUTPUT_CLASS :
 			SKL_DMA_HDA_HOST_INPUT_CLASS;
 		node_id.node.vindex = params->host_dma_id;
 		break;
+
+	default:
+		cpr_mconfig->gtw_cfg.node_id = SKL_NON_GATEWAY_CPR_NODE_ID;
+		cpr_mconfig->cpr_feature_mask = 0;
+		return;
 	}
 
 	cpr_mconfig->gtw_cfg.node_id = node_id.val;
diff --git a/sound/soc/intel/skylake/skl-tplg-interface.h b/sound/soc/intel/skylake/skl-tplg-interface.h
index d14f7fe64aa8..718d3d5df9a8 100644
--- a/sound/soc/intel/skylake/skl-tplg-interface.h
+++ b/sound/soc/intel/skylake/skl-tplg-interface.h
@@ -106,6 +106,7 @@ enum skl_dev_type {
 	SKL_DEVICE_I2S = 0x2,
 	SKL_DEVICE_SLIMBUS = 0x3,
 	SKL_DEVICE_HDALINK = 0x4,
+	SKL_DEVICE_HDAHOST = 0x5,
 	SKL_DEVICE_NONE
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* [PATCH 9/9] ASoC: Intel: Skylake: Add support to topology for module static pin
  2015-10-22 17:52 [PATCH 0/9] ASoC: Intel: Skylake: Fixes and updates Vinod Koul
                   ` (7 preceding siblings ...)
  2015-10-22 17:52 ` [PATCH 8/9] ASoC: Intel: Skylake: Fix to set Non gateway copier cfg Vinod Koul
@ 2015-10-22 17:52 ` 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
  8 siblings, 1 reply; 21+ messages in thread
From: Vinod Koul @ 2015-10-22 17:52 UTC (permalink / raw)
  To: alsa-devel
  Cc: tiwai, patches.audio, liam.r.girdwood, Vinod Koul, broonie, Jeeja KP

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

Some module pin connection are static and defined by the topology.
This patch adds support for static pin definitions in topology widget
private data

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/intel/skylake/skl-topology.c       | 32 +++++++++++++++-------------
 sound/soc/intel/skylake/skl-tplg-interface.h |  6 ++++--
 2 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index 68e1b00ce7ed..a7854c8fc523 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -1034,18 +1034,17 @@ static const struct snd_soc_tplg_widget_events skl_tplg_widget_ops[] = {
  * The topology binary passes the pin info for a module so initialize the pin
  * info passed into module instance
  */
-static void skl_fill_module_pin_info(struct device *dev,
-			struct skl_module_pin *m_pin,
-			int max_pin)
+static void skl_fill_module_pin_info(struct skl_dfw_module_pin *dfw_pin,
+						struct skl_module_pin *m_pin,
+						bool is_dynamic, int max_pin)
 {
 	int i;
 
 	for (i = 0; i < max_pin; i++) {
-		m_pin[i].id.module_id = 0;
-		m_pin[i].id.instance_id = 0;
+		m_pin[i].id.module_id = dfw_pin[i].module_id;
+		m_pin[i].id.instance_id = dfw_pin[i].instance_id;
 		m_pin[i].in_use = false;
-		m_pin[i].is_dynamic = true;
-		m_pin[i].pin_index = i;
+		m_pin[i].is_dynamic = is_dynamic;
 	}
 }
 
@@ -1164,17 +1163,20 @@ static int skl_tplg_widget_load(struct snd_soc_component *cmpnt,
 	if (!mconfig->m_in_pin)
 		return -ENOMEM;
 
-	mconfig->m_out_pin = devm_kzalloc(bus->dev,
-				(mconfig->max_in_queue) *
-					sizeof(*mconfig->m_out_pin),
-				GFP_KERNEL);
+	mconfig->m_out_pin = devm_kzalloc(bus->dev, (mconfig->max_out_queue) *
+						sizeof(*mconfig->m_out_pin),
+						GFP_KERNEL);
 	if (!mconfig->m_out_pin)
 		return -ENOMEM;
 
-	skl_fill_module_pin_info(bus->dev, mconfig->m_in_pin,
-				mconfig->max_in_queue);
-	skl_fill_module_pin_info(bus->dev, mconfig->m_out_pin,
-				mconfig->max_out_queue);
+	skl_fill_module_pin_info(dfw_config->in_pin, mconfig->m_in_pin,
+						dfw_config->is_dynamic_in_pin,
+						mconfig->max_in_queue);
+
+	skl_fill_module_pin_info(dfw_config->out_pin, mconfig->m_out_pin,
+						 dfw_config->is_dynamic_out_pin,
+							mconfig->max_out_queue);
+
 
 	if (mconfig->formats_config.caps_size == 0)
 		goto bind_event;
diff --git a/sound/soc/intel/skylake/skl-tplg-interface.h b/sound/soc/intel/skylake/skl-tplg-interface.h
index 718d3d5df9a8..2bc396d54cbe 100644
--- a/sound/soc/intel/skylake/skl-tplg-interface.h
+++ b/sound/soc/intel/skylake/skl-tplg-interface.h
@@ -113,8 +113,6 @@ enum skl_dev_type {
 struct skl_dfw_module_pin {
 	u16 module_id;
 	u16 instance_id;
-	u8 pin_id;
-	bool is_dynamic;
 } __packed;
 
 struct skl_dfw_module_fmt {
@@ -155,9 +153,13 @@ struct skl_dfw_module {
 	u32 converter;
 	u32 module_type;
 	u32 vbus_id;
+	u8 is_dynamic_in_pin;
+	u8 is_dynamic_out_pin;
 	struct skl_dfw_pipe pipe;
 	struct skl_dfw_module_fmt in_fmt;
 	struct skl_dfw_module_fmt out_fmt;
+	struct skl_dfw_module_pin in_pin[MAX_IN_QUEUE];
+	struct skl_dfw_module_pin out_pin[MAX_OUT_QUEUE];
 	struct skl_dfw_module_caps caps;
 } __packed;
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH 5/9] ASoC: Intel: Skylake: Update for ssp node index in copier cfg
  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
  1 sibling, 1 reply; 21+ messages in thread
From: Mark Brown @ 2015-10-23 16:30 UTC (permalink / raw)
  To: Vinod Koul; +Cc: liam.r.girdwood, tiwai, alsa-devel, Jeeja KP, patches.audio


[-- Attachment #1.1: Type: text/plain, Size: 463 bytes --]

On Thu, Oct 22, 2015 at 11:22:38PM +0530, Vinod Koul wrote:
> From: Jeeja KP <jeeja.kp@intel.com>
> 
> DSP firmware has interface change for SSP node index structure.
> New FW interface removes the dual_mono field and adds 4 bits for
> TDM slot group index. This patch updates the ssp dma to align with
> the DSP firmware structure.

This probably doesn't matter right now since things haven't been
released yet but it's going to become an ABI issue...

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 21+ messages in thread

* Applied "ASoC: Intel: Skylake: Add support to topology for module static pin" to the asoc tree
  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   ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2015-10-23 17:47 UTC (permalink / raw)
  To: Jeeja KP, Vinod Koul, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: Intel: Skylake: Add support to topology for module static pin

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 6abca1d71b62090821240ee2a4507c94ddd144e9 Mon Sep 17 00:00:00 2001
From: Jeeja KP <jeeja.kp@intel.com>
Date: Thu, 22 Oct 2015 23:22:42 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Add support to topology for module
 static pin

Some module pin connection are static and defined by the topology.
This patch adds support for static pin definitions in topology widget
private data

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-topology.c       | 32 +++++++++++++++-------------
 sound/soc/intel/skylake/skl-tplg-interface.h |  6 ++++--
 2 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index 68e1b00..a7854c8 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -1034,18 +1034,17 @@ static const struct snd_soc_tplg_widget_events skl_tplg_widget_ops[] = {
  * The topology binary passes the pin info for a module so initialize the pin
  * info passed into module instance
  */
-static void skl_fill_module_pin_info(struct device *dev,
-			struct skl_module_pin *m_pin,
-			int max_pin)
+static void skl_fill_module_pin_info(struct skl_dfw_module_pin *dfw_pin,
+						struct skl_module_pin *m_pin,
+						bool is_dynamic, int max_pin)
 {
 	int i;
 
 	for (i = 0; i < max_pin; i++) {
-		m_pin[i].id.module_id = 0;
-		m_pin[i].id.instance_id = 0;
+		m_pin[i].id.module_id = dfw_pin[i].module_id;
+		m_pin[i].id.instance_id = dfw_pin[i].instance_id;
 		m_pin[i].in_use = false;
-		m_pin[i].is_dynamic = true;
-		m_pin[i].pin_index = i;
+		m_pin[i].is_dynamic = is_dynamic;
 	}
 }
 
@@ -1164,17 +1163,20 @@ static int skl_tplg_widget_load(struct snd_soc_component *cmpnt,
 	if (!mconfig->m_in_pin)
 		return -ENOMEM;
 
-	mconfig->m_out_pin = devm_kzalloc(bus->dev,
-				(mconfig->max_in_queue) *
-					sizeof(*mconfig->m_out_pin),
-				GFP_KERNEL);
+	mconfig->m_out_pin = devm_kzalloc(bus->dev, (mconfig->max_out_queue) *
+						sizeof(*mconfig->m_out_pin),
+						GFP_KERNEL);
 	if (!mconfig->m_out_pin)
 		return -ENOMEM;
 
-	skl_fill_module_pin_info(bus->dev, mconfig->m_in_pin,
-				mconfig->max_in_queue);
-	skl_fill_module_pin_info(bus->dev, mconfig->m_out_pin,
-				mconfig->max_out_queue);
+	skl_fill_module_pin_info(dfw_config->in_pin, mconfig->m_in_pin,
+						dfw_config->is_dynamic_in_pin,
+						mconfig->max_in_queue);
+
+	skl_fill_module_pin_info(dfw_config->out_pin, mconfig->m_out_pin,
+						 dfw_config->is_dynamic_out_pin,
+							mconfig->max_out_queue);
+
 
 	if (mconfig->formats_config.caps_size == 0)
 		goto bind_event;
diff --git a/sound/soc/intel/skylake/skl-tplg-interface.h b/sound/soc/intel/skylake/skl-tplg-interface.h
index 718d3d5..2bc396d 100644
--- a/sound/soc/intel/skylake/skl-tplg-interface.h
+++ b/sound/soc/intel/skylake/skl-tplg-interface.h
@@ -113,8 +113,6 @@ enum skl_dev_type {
 struct skl_dfw_module_pin {
 	u16 module_id;
 	u16 instance_id;
-	u8 pin_id;
-	bool is_dynamic;
 } __packed;
 
 struct skl_dfw_module_fmt {
@@ -155,9 +153,13 @@ struct skl_dfw_module {
 	u32 converter;
 	u32 module_type;
 	u32 vbus_id;
+	u8 is_dynamic_in_pin;
+	u8 is_dynamic_out_pin;
 	struct skl_dfw_pipe pipe;
 	struct skl_dfw_module_fmt in_fmt;
 	struct skl_dfw_module_fmt out_fmt;
+	struct skl_dfw_module_pin in_pin[MAX_IN_QUEUE];
+	struct skl_dfw_module_pin out_pin[MAX_OUT_QUEUE];
 	struct skl_dfw_module_caps caps;
 } __packed;
 
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Applied "ASoC: Intel: Skylake: Fix to set Non gateway copier cfg" to the asoc tree
  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   ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2015-10-23 17:47 UTC (permalink / raw)
  To: Dharageswari.R, Jeeja KP, Vinod Koul, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: Intel: Skylake: Fix to set Non gateway copier cfg

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 bfa764accdea017b1c557f43fa5f2c77a0dc3b15 Mon Sep 17 00:00:00 2001
From: Jeeja KP <jeeja.kp@intel.com>
Date: Thu, 22 Oct 2015 23:22:41 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Fix to set Non gateway copier cfg

If copier instance is connected to a DMA gateway then driver
needs to configure the gateway configuration otherwise set
it to invalid.
This patch sets the non gateway copier node value to invalid.

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-messages.c       | 8 +++++++-
 sound/soc/intel/skylake/skl-tplg-interface.h | 1 +
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index a1001a6..50a1095 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -321,6 +321,7 @@ static void skl_copy_copier_caps(struct skl_module_cfg *mconfig,
 			(mconfig->formats_config.caps_size) / 4;
 }
 
+#define SKL_NON_GATEWAY_CPR_NODE_ID 0xFFFFFFFF
 /*
  * Calculate the gatewat settings required for copier module, type of
  * gateway and index of gateway to use
@@ -367,13 +368,18 @@ static void skl_setup_cpr_gateway_cfg(struct skl_sst *ctx,
 		node_id.node.vindex = params->link_dma_id;
 		break;
 
-	default:
+	case SKL_DEVICE_HDAHOST:
 		node_id.node.dma_type =
 			(SKL_CONN_SOURCE == mconfig->hw_conn_type) ?
 			SKL_DMA_HDA_HOST_OUTPUT_CLASS :
 			SKL_DMA_HDA_HOST_INPUT_CLASS;
 		node_id.node.vindex = params->host_dma_id;
 		break;
+
+	default:
+		cpr_mconfig->gtw_cfg.node_id = SKL_NON_GATEWAY_CPR_NODE_ID;
+		cpr_mconfig->cpr_feature_mask = 0;
+		return;
 	}
 
 	cpr_mconfig->gtw_cfg.node_id = node_id.val;
diff --git a/sound/soc/intel/skylake/skl-tplg-interface.h b/sound/soc/intel/skylake/skl-tplg-interface.h
index d14f7fe..718d3d5 100644
--- a/sound/soc/intel/skylake/skl-tplg-interface.h
+++ b/sound/soc/intel/skylake/skl-tplg-interface.h
@@ -106,6 +106,7 @@ enum skl_dev_type {
 	SKL_DEVICE_I2S = 0x2,
 	SKL_DEVICE_SLIMBUS = 0x3,
 	SKL_DEVICE_HDALINK = 0x4,
+	SKL_DEVICE_HDAHOST = 0x5,
 	SKL_DEVICE_NONE
 };
 
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Applied "ASoC: Intel: Skylake: Fix to check return value of dsp init" to the asoc tree
  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   ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2015-10-23 17:47 UTC (permalink / raw)
  To: Jeeja KP, Vinod Koul, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: Intel: Skylake: Fix to check return value of dsp init

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 2ac454ffe6c2cb923711edc8027bbc0e782be457 Mon Sep 17 00:00:00 2001
From: Jeeja KP <jeeja.kp@intel.com>
Date: Thu, 22 Oct 2015 23:22:40 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Fix to check return value of dsp init

If DSP initialization fails, ipc to disable notification
will cause NULL ptr exception as ipc is not initialized.
This patch returns error if dsp init fails before
sending disable notification ipc.

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-messages.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index ca7bbee..a1001a6 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -97,6 +97,9 @@ int skl_init_dsp(struct skl *skl)
 
 	ret = skl_sst_dsp_init(bus->dev, mmio_base, irq,
 			loader_ops, &skl->skl_sst);
+	if (ret < 0)
+		return ret;
+
 	skl_dsp_enable_notification(skl->skl_sst, false);
 	dev_dbg(bus->dev, "dsp registration status=%d\n", ret);
 
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Applied "ASoC: Intel: Skylake: Add support to disable module notifications" to the asoc tree
  2015-10-22 17:52 ` [PATCH 6/9] ASoC: Intel: Skylake: Add support to disable module notifications Vinod Koul
@ 2015-10-23 17:47   ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2015-10-23 17:47 UTC (permalink / raw)
  To: Jeeja KP, Vinod Koul, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: Intel: Skylake: Add support to disable module notifications

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 4e10996ba810031a493d903539f595e053826103 Mon Sep 17 00:00:00 2001
From: Jeeja KP <jeeja.kp@intel.com>
Date: Thu, 22 Oct 2015 23:22:39 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Add support to disable module
 notifications

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>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 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 77c0736..ca7bbee 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 2399535..76053a8 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;
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Applied "ASoC: Intel: Skylake: Update for ssp node index in copier cfg" to the asoc tree
  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-23 17:47   ` Mark Brown
  1 sibling, 0 replies; 21+ messages in thread
From: Mark Brown @ 2015-10-23 17:47 UTC (permalink / raw)
  To: Jeeja KP, Vinod Koul, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: Intel: Skylake: Update for ssp node index in copier cfg

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 d7b188131c4823a85d17b992083bf8a8c32a2be3 Mon Sep 17 00:00:00 2001
From: Jeeja KP <jeeja.kp@intel.com>
Date: Thu, 22 Oct 2015 23:22:38 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Update for ssp node index in copier cfg

DSP firmware has interface change for SSP node index structure.
New FW interface removes the dual_mono field and adds 4 bits for
TDM slot group index. This patch updates the ssp dma to align with
the DSP firmware structure.

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-messages.c | 7 ++++---
 sound/soc/intel/skylake/skl-topology.h | 3 +--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index 826d4fd..77c0736 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -303,6 +303,7 @@ static void skl_setup_cpr_gateway_cfg(struct skl_sst *ctx,
 			struct skl_cpr_cfg *cpr_mconfig)
 {
 	union skl_connector_node_id node_id = {0};
+	union skl_ssp_dma_node ssp_node  = {0};
 	struct skl_pipe_params *params = mconfig->pipe->p_params;
 
 	switch (mconfig->dev_type) {
@@ -320,9 +321,9 @@ static void skl_setup_cpr_gateway_cfg(struct skl_sst *ctx,
 			(SKL_CONN_SOURCE == mconfig->hw_conn_type) ?
 			SKL_DMA_I2S_LINK_OUTPUT_CLASS :
 			SKL_DMA_I2S_LINK_INPUT_CLASS;
-		node_id.node.vindex = params->host_dma_id +
-					 (mconfig->time_slot << 1) +
-					 (mconfig->vbus_id << 3);
+		ssp_node.dma_node.time_slot_index = mconfig->time_slot;
+		ssp_node.dma_node.i2s_instance = mconfig->vbus_id;
+		node_id.node.vindex = ssp_node.val;
 		break;
 
 	case SKL_DEVICE_DMIC:
diff --git a/sound/soc/intel/skylake/skl-topology.h b/sound/soc/intel/skylake/skl-topology.h
index 0c83dc3..2399535 100644
--- a/sound/soc/intel/skylake/skl-topology.h
+++ b/sound/soc/intel/skylake/skl-topology.h
@@ -153,8 +153,7 @@ enum skl_dma_type {
 union skl_ssp_dma_node {
 	u8 val;
 	struct {
-		u8 dual_mono:1;
-		u8 time_slot:3;
+		u8 time_slot_index:4;
 		u8 i2s_instance:4;
 	} dma_node;
 };
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Applied "ASoC: Intel: Skylake: Fix to fill all sink/source pipe params" to the asoc tree
  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   ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2015-10-23 17:47 UTC (permalink / raw)
  To: Subhransu S. Prusty, Jeeja KP, Vinod Koul, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: Intel: Skylake: Fix to fill all sink/source pipe params

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 4d8adccb220ca270cfcdd80752618095fdc9990c Mon Sep 17 00:00:00 2001
From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
Date: Thu, 22 Oct 2015 23:22:37 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Fix to fill all sink/source pipe params

Currently params only for first copier widget identified in the
source/sink path is queried from NHLT. In the dapm route the
playback/capture widget may be connected to more than one copier
widget. This patch adds return check to return only for any error
case.

Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@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-topology.c | 32 ++++++++++++++++++++++----------
 1 file changed, 22 insertions(+), 10 deletions(-)

diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index 0fba39d..68e1b00 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -944,48 +944,60 @@ static int skl_tplg_be_set_src_pipe_params(struct snd_soc_dai *dai,
 				struct skl_pipe_params *params)
 {
 	struct snd_soc_dapm_path *p;
+	int ret = -EIO;
 
 	snd_soc_dapm_widget_for_each_source_path(w, p) {
 		if (p->connect && is_skl_dsp_widget_type(p->source) &&
 						p->source->priv) {
 
-			if (!p->source->power)
-				return skl_tplg_be_fill_pipe_params(
+			if (!p->source->power) {
+				ret = skl_tplg_be_fill_pipe_params(
 						dai, p->source->priv,
 						params);
-			else
+				if (ret < 0)
+					return ret;
+			} else {
 				return -EBUSY;
+			}
 		} else {
-			return skl_tplg_be_set_src_pipe_params(
+			ret = skl_tplg_be_set_src_pipe_params(
 						dai, p->source,	params);
+			if (ret < 0)
+				return ret;
 		}
 	}
 
-	return -EIO;
+	return ret;
 }
 
 static int skl_tplg_be_set_sink_pipe_params(struct snd_soc_dai *dai,
 	struct snd_soc_dapm_widget *w, struct skl_pipe_params *params)
 {
 	struct snd_soc_dapm_path *p = NULL;
+	int ret = -EIO;
 
 	snd_soc_dapm_widget_for_each_sink_path(w, p) {
 		if (p->connect && is_skl_dsp_widget_type(p->sink) &&
 						p->sink->priv) {
 
-			if (!p->sink->power)
-				return skl_tplg_be_fill_pipe_params(
+			if (!p->sink->power) {
+				ret = skl_tplg_be_fill_pipe_params(
 						dai, p->sink->priv, params);
-			else
+				if (ret < 0)
+					return ret;
+			} else {
 				return -EBUSY;
+			}
 
 		} else {
-			return skl_tplg_be_set_sink_pipe_params(
+			ret = skl_tplg_be_set_sink_pipe_params(
 						dai, p->sink, params);
+			if (ret < 0)
+				return ret;
 		}
 	}
 
-	return -EIO;
+	return ret;
 }
 
 /*
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Applied "ASoC: Intel: Skylake: Fix to use correct macros for the path iteration" to the asoc tree
  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   ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2015-10-23 17:47 UTC (permalink / raw)
  To: Subhransu S. Prusty, Vinod Koul, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: Intel: Skylake: Fix to use correct macros for the path iteration

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 f0900eb213e0f6f37e1567531f9604b9bed6771d Mon Sep 17 00:00:00 2001
From: "Subhransu S. Prusty" <subhransu.s.prusty@intel.com>
Date: Thu, 22 Oct 2015 23:22:36 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Fix to use correct macros for the path
 iteration

In case of playback, for the BE dai source path should be iterated to find
the pipe params. With sink path iterated, this resulted in a loop and kernel
panic with page request failure.
Similar are the cases for Capture and FE dais. Using correct macros to fix
the panic

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/intel/skylake/skl-topology.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index 7c92085..0fba39d 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -844,7 +844,7 @@ skl_tplg_fe_get_cpr_module(struct snd_soc_dai *dai, int stream)
 
 	if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
 		w = dai->playback_widget;
-		snd_soc_dapm_widget_for_each_source_path(w, p) {
+		snd_soc_dapm_widget_for_each_sink_path(w, p) {
 			if (p->connect && p->sink->power &&
 					is_skl_dsp_widget_type(p->sink))
 				continue;
@@ -857,7 +857,7 @@ skl_tplg_fe_get_cpr_module(struct snd_soc_dai *dai, int stream)
 		}
 	} else {
 		w = dai->capture_widget;
-		snd_soc_dapm_widget_for_each_sink_path(w, p) {
+		snd_soc_dapm_widget_for_each_source_path(w, p) {
 			if (p->connect && p->source->power &&
 					is_skl_dsp_widget_type(p->source))
 				continue;
@@ -945,7 +945,7 @@ static int skl_tplg_be_set_src_pipe_params(struct snd_soc_dai *dai,
 {
 	struct snd_soc_dapm_path *p;
 
-	snd_soc_dapm_widget_for_each_sink_path(w, p) {
+	snd_soc_dapm_widget_for_each_source_path(w, p) {
 		if (p->connect && is_skl_dsp_widget_type(p->source) &&
 						p->source->priv) {
 
@@ -969,7 +969,7 @@ static int skl_tplg_be_set_sink_pipe_params(struct snd_soc_dai *dai,
 {
 	struct snd_soc_dapm_path *p = NULL;
 
-	snd_soc_dapm_widget_for_each_source_path(w, p) {
+	snd_soc_dapm_widget_for_each_sink_path(w, p) {
 		if (p->connect && is_skl_dsp_widget_type(p->sink) &&
 						p->sink->priv) {
 
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Applied "ASoC: Intel: Skylake: Remove BE copier blob memcpy" to the asoc tree
  2015-10-22 17:52 ` [PATCH 2/9] ASoC: Intel: Skylake: Remove BE copier blob memcpy Vinod Koul
@ 2015-10-23 17:47   ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2015-10-23 17:47 UTC (permalink / raw)
  To: Jeeja KP, Vinod Koul, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: Intel: Skylake: Remove BE copier blob memcpy

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 bc03281a5c706f6372dfc2100b04aa4055a15c88 Mon Sep 17 00:00:00 2001
From: Jeeja KP <jeeja.kp@intel.com>
Date: Thu, 22 Oct 2015 23:22:35 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Remove BE copier blob memcpy

The BE copier private data allowed endpoint configuration blobs, now these
are queried from BIOS, we don't need to copy the blob, but only capability.

Removing the blob from private data will not allocate memory for module
specific config in which case memcpy will fail. Fix is to assign the ptr
queried from the NHLT table for the endpoint configuration.

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-topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index a5d8420..7c92085 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -926,7 +926,7 @@ static int skl_tplg_be_fill_pipe_params(struct snd_soc_dai *dai,
 					params->s_freq, params->stream);
 	if (cfg) {
 		mconfig->formats_config.caps_size = cfg->size;
-		memcpy(mconfig->formats_config.caps, &cfg->caps, cfg->size);
+		mconfig->formats_config.caps = (u32 *) &cfg->caps;
 	} else {
 		dev_err(dai->dev, "Blob NULL for id %x type %d dirn %d\n",
 					mconfig->vbus_id, link_type,
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Applied "ASoC: Intel: Skylake: Fix return for pm_runtime_get_sync()" to the asoc tree
  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   ` Mark Brown
  0 siblings, 0 replies; 21+ messages in thread
From: Mark Brown @ 2015-10-23 17:47 UTC (permalink / raw)
  To: Jeeja KP, Vinod Koul, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: Intel: Skylake: Fix return for pm_runtime_get_sync()

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 9270b7b92615324ecda2b3fa0be98b4ab6c3e361 Mon Sep 17 00:00:00 2001
From: Jeeja KP <jeeja.kp@intel.com>
Date: Thu, 22 Oct 2015 23:22:34 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Fix return for pm_runtime_get_sync()

pm_runtime_get_sync() will return a negative value in case of
error and can return postive value for success.  The return check
for pm_runtime_get_sync() must be less than 0, so fix it

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 a8f53da..a2f94ce 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -116,7 +116,7 @@ static int skl_pcm_open(struct snd_pcm_substream *substream,
 
 	dev_dbg(dai->dev, "%s: %s\n", __func__, dai->name);
 	ret = pm_runtime_get_sync(dai->dev);
-	if (ret)
+	if (ret < 0)
 		return ret;
 
 	stream = snd_hdac_ext_stream_assign(ebus, substream,
-- 
2.6.1

^ permalink raw reply related	[flat|nested] 21+ messages in thread

* Re: [PATCH 5/9] ASoC: Intel: Skylake: Update for ssp node index in copier cfg
  2015-10-23 16:30   ` Mark Brown
@ 2015-10-24 11:56     ` Vinod Koul
  0 siblings, 0 replies; 21+ messages in thread
From: Vinod Koul @ 2015-10-24 11:56 UTC (permalink / raw)
  To: Mark Brown; +Cc: liam.r.girdwood, tiwai, alsa-devel, Jeeja KP, patches.audio


[-- Attachment #1.1: Type: text/plain, Size: 657 bytes --]

On Sat, Oct 24, 2015 at 01:30:52AM +0900, Mark Brown wrote:
> On Thu, Oct 22, 2015 at 11:22:38PM +0530, Vinod Koul wrote:
> > From: Jeeja KP <jeeja.kp@intel.com>
> > 
> > DSP firmware has interface change for SSP node index structure.
> > New FW interface removes the dual_mono field and adds 4 bits for
> > TDM slot group index. This patch updates the ssp dma to align with
> > the DSP firmware structure.
> 
> This probably doesn't matter right now since things haven't been
> released yet but it's going to become an ABI issue...

Yes, I am trying to ensure after this cycle is done we dont have any more
interface changes..

-- 
~Vinod

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2015-10-24 11:52 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 6/9] ASoC: Intel: Skylake: Add support to disable module notifications Vinod Koul
2015-10-23 17:47   ` Applied "ASoC: Intel: Skylake: Add support to disable module notifications" to the asoc tree 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

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.