ASoC: Intel: Skylake: Fixes and updates
Subsystems (3)
cover ASoC: Intel: Skylake: Fixes and updates
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(-)
Signature · 1 line
1.9.1
PATCH 1/9 ASoC: Intel: Skylake: Fix return for pm_runtime_get_sync()
From: Jeeja KP <[email protected]>
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
--- sound/soc/intel/skylake/skl-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/skylake/skl-pcm.c +1 -1
@@ -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,
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Fix return for pm_runtime_get_sync()" to the asoc tree
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
Quoted 1 line
From
9270b7b92615324ecda2b3fa0be98b4ab6c3e361Mon Sep 17 00:00:00 2001
From: Jeeja KP <[email protected]>
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
--- sound/soc/intel/skylake/skl-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/skylake/skl-pcm.c +1 -1
@@ -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,
Signature · 1 line
2.6.1
PATCH 2/9 ASoC: Intel: Skylake: Remove BE copier blob memcpy
In reply to Vinod KoulFrom: Jeeja KP <[email protected]>
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.
--- sound/soc/intel/skylake/skl-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/skylake/skl-topology.c +1 -1
@@ -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,
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Remove BE copier blob memcpy" to the asoc tree
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
Quoted 1 line
From
bc03281a5c706f6372dfc2100b04aa4055a15c88Mon Sep 17 00:00:00 2001
From: Jeeja KP <[email protected]>
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.
--- sound/soc/intel/skylake/skl-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/skylake/skl-topology.c +1 -1
@@ -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,
Signature · 1 line
2.6.1
PATCH 3/9 ASoC: Intel: Skylake: Fix to use correct macros for the path iteration
In reply to Vinod KoulFrom: "Subhransu S. Prusty" <[email protected]>
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
--- sound/soc/intel/skylake/skl-topology.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/intel/skylake/skl-topology.c +4 -4
@@ -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) {
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Fix to use correct macros for the path iteration" to the asoc tree
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
Quoted 1 line
From
f0900eb213e0f6f37e1567531f9604b9bed6771dMon Sep 17 00:00:00 2001
From: "Subhransu S. Prusty" <[email protected]>
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
--- sound/soc/intel/skylake/skl-topology.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/intel/skylake/skl-topology.c +4 -4
@@ -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) {
Signature · 1 line
2.6.1
PATCH 4/9 ASoC: Intel: Skylake: Fix to fill all sink/source pipe params
In reply to Vinod KoulFrom: "Subhransu S. Prusty" <[email protected]>
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.
--- sound/soc/intel/skylake/skl-topology.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-)
sound/soc/intel/skylake/skl-topology.c +22 -10
@@ -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; }/*
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Fix to fill all sink/source pipe params" to the asoc tree
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
Quoted 1 line
From
4d8adccb220ca270cfcdd80752618095fdc9990cMon Sep 17 00:00:00 2001
From: "Subhransu S. Prusty" <[email protected]>
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.
--- sound/soc/intel/skylake/skl-topology.c | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-)
sound/soc/intel/skylake/skl-topology.c +22 -10
@@ -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; }/*
Signature · 1 line
2.6.1
PATCH 5/9 ASoC: Intel: Skylake: Update for ssp node index in copier cfg
In reply to Vinod KoulFrom: Jeeja KP <[email protected]>
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.
--- sound/soc/intel/skylake/skl-messages.c | 7 ++++--- sound/soc/intel/skylake/skl-topology.h | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-)
sound/soc/intel/skylake/skl-messages.c +4 -3
@@ -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 :
sound/soc/intel/skylake/skl-topology.h +1 -2
@@ -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; };
Signature · 1 line
1.9.1
Mark Brown
maintainerRe: [PATCH 5/9] ASoC: Intel: Skylake: Update for ssp node index in copier cfg
Quoted 6 lines · Vinod Koul
From: Jeeja KP <[email protected]>
DSP firmware has interface change for SSP node index structure. New FW interface removes the
dual_monofield 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...
Re: [PATCH 5/9] ASoC: Intel: Skylake: Update for ssp node index in copier cfg
Quoted 10 lines · Mark Brown
Quoted 6 lines · Vinod Koul
From: Jeeja KP <[email protected]>
DSP firmware has interface change for SSP node index structure. New FW interface removes the
dual_monofield 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..
Signature · 1 line
~Vinod
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Update for ssp node index in copier cfg" to the asoc tree
In reply to Vinod KoulThe 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
Quoted 1 line
From
d7b188131c4823a85d17b992083bf8a8c32a2be3Mon Sep 17 00:00:00 2001
From: Jeeja KP <[email protected]>
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.
--- sound/soc/intel/skylake/skl-messages.c | 7 ++++--- sound/soc/intel/skylake/skl-topology.h | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-)
sound/soc/intel/skylake/skl-messages.c +4 -3
@@ -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 :
sound/soc/intel/skylake/skl-topology.h +1 -2
@@ -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; };
Signature · 1 line
2.6.1
PATCH 6/9 ASoC: Intel: Skylake: Add support to disable module notifications
In reply to Vinod KoulFrom: Jeeja KP <[email protected]>
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
--- sound/soc/intel/skylake/skl-messages.c | 28 ++++++++++++++++++++++++++-- sound/soc/intel/skylake/skl-topology.h | 5 +++++ 2 files changed, 31 insertions(+), 2 deletions(-)
sound/soc/intel/skylake/skl-messages.c +26 -2
@@ -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)
sound/soc/intel/skylake/skl-topology.h +5 -0
@@ -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;
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Add support to disable module notifications" to the asoc tree
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
Quoted 1 line
From
4e10996ba810031a493d903539f595e053826103Mon Sep 17 00:00:00 2001
From: Jeeja KP <[email protected]>
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
--- sound/soc/intel/skylake/skl-messages.c | 28 ++++++++++++++++++++++++++-- sound/soc/intel/skylake/skl-topology.h | 5 +++++ 2 files changed, 31 insertions(+), 2 deletions(-)
sound/soc/intel/skylake/skl-messages.c +26 -2
@@ -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)
sound/soc/intel/skylake/skl-topology.h +5 -0
@@ -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;
Signature · 1 line
2.6.1
PATCH 7/9 ASoC: Intel: Skylake: Fix to check return value of dsp init
In reply to Vinod KoulFrom: Jeeja KP <[email protected]>
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.
--- sound/soc/intel/skylake/skl-messages.c | 3 +++ 1 file changed, 3 insertions(+)
sound/soc/intel/skylake/skl-messages.c +3 -0
@@ -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);
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Fix to check return value of dsp init" to the asoc tree
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
Quoted 1 line
From
2ac454ffe6c2cb923711edc8027bbc0e782be457Mon Sep 17 00:00:00 2001
From: Jeeja KP <[email protected]>
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.
--- sound/soc/intel/skylake/skl-messages.c | 3 +++ 1 file changed, 3 insertions(+)
sound/soc/intel/skylake/skl-messages.c +3 -0
@@ -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);
Signature · 1 line
2.6.1
PATCH 8/9 ASoC: Intel: Skylake: Fix to set Non gateway copier cfg
In reply to Vinod KoulFrom: Jeeja KP <[email protected]>
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.
--- sound/soc/intel/skylake/skl-messages.c | 8 +++++++- sound/soc/intel/skylake/skl-tplg-interface.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-)
sound/soc/intel/skylake/skl-messages.c +7 -1
@@ -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;
sound/soc/intel/skylake/skl-tplg-interface.h +1 -0
@@ -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 };
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Fix to set Non gateway copier cfg" to the asoc tree
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
Quoted 1 line
From
bfa764accdea017b1c557f43fa5f2c77a0dc3b15Mon Sep 17 00:00:00 2001
From: Jeeja KP <[email protected]>
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.
--- sound/soc/intel/skylake/skl-messages.c | 8 +++++++- sound/soc/intel/skylake/skl-tplg-interface.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-)
sound/soc/intel/skylake/skl-messages.c +7 -1
@@ -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;
sound/soc/intel/skylake/skl-tplg-interface.h +1 -0
@@ -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 };
Signature · 1 line
2.6.1
PATCH 9/9 ASoC: Intel: Skylake: Add support to topology for module static pin
In reply to Vinod KoulFrom: Jeeja KP <[email protected]>
Some module pin connection are static and defined by the topology. This patch adds support for static pin definitions in topology widget private data
--- sound/soc/intel/skylake/skl-topology.c | 32 +++++++++++++++------------- sound/soc/intel/skylake/skl-tplg-interface.h | 6 ++++-- 2 files changed, 21 insertions(+), 17 deletions(-)
sound/soc/intel/skylake/skl-topology.c +17 -15
@@ -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;
sound/soc/intel/skylake/skl-tplg-interface.h +4 -2
@@ -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;
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Add support to topology for module static pin" to the asoc tree
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
Quoted 1 line
From
6abca1d71b62090821240ee2a4507c94ddd144e9Mon Sep 17 00:00:00 2001
From: Jeeja KP <[email protected]>
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
--- sound/soc/intel/skylake/skl-topology.c | 32 +++++++++++++++------------- sound/soc/intel/skylake/skl-tplg-interface.h | 6 ++++-- 2 files changed, 21 insertions(+), 17 deletions(-)
sound/soc/intel/skylake/skl-topology.c +17 -15
@@ -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;
sound/soc/intel/skylake/skl-tplg-interface.h +4 -2
@@ -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;
Signature · 1 line
2.6.1