[alsa-devel] [PATCH 1/4] ASoC: Intel: Skylake: Reset the controller in probe
Controller can be in reset state by default. Capability structure traversal requires the controller to be out of reset else it results in broken capability parsing. Hence make sure that controller is out of reset before parsing capabilities by doing a full reset.
Signed-off-by: Guneshwor Singh guneshwor.o.singh@intel.com --- sound/soc/intel/skylake/skl.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index 334917ee41cf..a56dfde3928c 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -702,6 +702,8 @@ static int skl_first_init(struct hdac_ext_bus *ebus) return -ENXIO; }
+ skl_init_chip(bus, true); + snd_hdac_bus_parse_capabilities(bus);
if (skl_acquire_irq(ebus, 0) < 0)
From: Dronamraju Santosh P K santosh.pavan.kumarx.dronamraju@intel.com
Since Broxton does not use code loader DMA, remove code loader cleanup in its dsp cleanup routine. Remove the iounmap too as it is done in skl_free_dsp().
Signed-off-by: Dronamraju Santosh P K santosh.pavan.kumarx.dronamraju@intel.com Signed-off-by: Guneshwor Singh guneshwor.o.singh@intel.com --- sound/soc/intel/skylake/bxt-sst.c | 5 ----- 1 file changed, 5 deletions(-)
diff --git a/sound/soc/intel/skylake/bxt-sst.c b/sound/soc/intel/skylake/bxt-sst.c index cf11b84888b9..08a2c5eb59fa 100644 --- a/sound/soc/intel/skylake/bxt-sst.c +++ b/sound/soc/intel/skylake/bxt-sst.c @@ -629,11 +629,6 @@ void bxt_sst_dsp_cleanup(struct device *dev, struct skl_sst *ctx) release_firmware(ctx->dsp->fw); skl_freeup_uuid_list(ctx); skl_ipc_free(&ctx->ipc); - ctx->dsp->cl_dev.ops.cl_cleanup_controller(ctx->dsp); - - if (ctx->dsp->addr.lpe) - iounmap(ctx->dsp->addr.lpe); - ctx->dsp->ops->free(ctx->dsp); } EXPORT_SYMBOL_GPL(bxt_sst_dsp_cleanup);
The patch
ASoC: Intel: bxtn: Remove code loader reference in cleanup
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 3fbbcf4dadb6c01d6411bac715a7448f96c3724c Mon Sep 17 00:00:00 2001
From: Dronamraju Santosh P K santosh.pavan.kumarx.dronamraju@intel.com Date: Fri, 28 Jul 2017 16:12:14 +0530 Subject: [PATCH] ASoC: Intel: bxtn: Remove code loader reference in cleanup
Since Broxton does not use code loader DMA, remove code loader cleanup in its dsp cleanup routine. Remove the iounmap too as it is done in skl_free_dsp().
Signed-off-by: Dronamraju Santosh P K santosh.pavan.kumarx.dronamraju@intel.com Signed-off-by: Guneshwor Singh guneshwor.o.singh@intel.com Acked-By: Vinod Koul vinod.koul@intel.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/intel/skylake/bxt-sst.c | 5 ----- 1 file changed, 5 deletions(-)
diff --git a/sound/soc/intel/skylake/bxt-sst.c b/sound/soc/intel/skylake/bxt-sst.c index cf11b84888b9..08a2c5eb59fa 100644 --- a/sound/soc/intel/skylake/bxt-sst.c +++ b/sound/soc/intel/skylake/bxt-sst.c @@ -629,11 +629,6 @@ void bxt_sst_dsp_cleanup(struct device *dev, struct skl_sst *ctx) release_firmware(ctx->dsp->fw); skl_freeup_uuid_list(ctx); skl_ipc_free(&ctx->ipc); - ctx->dsp->cl_dev.ops.cl_cleanup_controller(ctx->dsp); - - if (ctx->dsp->addr.lpe) - iounmap(ctx->dsp->addr.lpe); - ctx->dsp->ops->free(ctx->dsp); } EXPORT_SYMBOL_GPL(bxt_sst_dsp_cleanup);
Since skl_codec_create() always returns 0, make it return void and remove return check.
Signed-off-by: Guneshwor Singh guneshwor.o.singh@intel.com --- sound/soc/intel/skylake/skl.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index a56dfde3928c..f6dc5497ea50 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -528,7 +528,7 @@ static int probe_codec(struct hdac_ext_bus *ebus, int addr) }
/* Codec initialization */ -static int skl_codec_create(struct hdac_ext_bus *ebus) +static void skl_codec_create(struct hdac_ext_bus *ebus) { struct hdac_bus *bus = ebus_to_hbus(ebus); int c, max_slots; @@ -559,8 +559,6 @@ static int skl_codec_create(struct hdac_ext_bus *ebus) } } } - - return 0; }
static const struct hdac_bus_ops bus_core_ops = { @@ -612,9 +610,7 @@ static void skl_probe_work(struct work_struct *work) dev_info(bus->dev, "no hda codecs found!\n");
/* create codec instances */ - err = skl_codec_create(ebus); - if (err < 0) - goto out_err; + skl_codec_create(ebus);
if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)) { err = snd_hdac_display_power(bus, false);
The patch
ASoC: Intel: Skylake: Remove return check for skl_codec_create()
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 693c0fb26a312d7cc866b1e9195187789b69e7e6 Mon Sep 17 00:00:00 2001
From: "guneshwor.o.singh@intel.com" guneshwor.o.singh@intel.com Date: Fri, 28 Jul 2017 16:12:15 +0530 Subject: [PATCH] ASoC: Intel: Skylake: Remove return check for skl_codec_create()
Since skl_codec_create() always returns 0, make it return void and remove return check.
Signed-off-by: Guneshwor Singh guneshwor.o.singh@intel.com Acked-By: Vinod Koul vinod.koul@intel.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/intel/skylake/skl.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index b9e1310673f0..ab651517e8b8 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -528,7 +528,7 @@ static int probe_codec(struct hdac_ext_bus *ebus, int addr) }
/* Codec initialization */ -static int skl_codec_create(struct hdac_ext_bus *ebus) +static void skl_codec_create(struct hdac_ext_bus *ebus) { struct hdac_bus *bus = ebus_to_hbus(ebus); int c, max_slots; @@ -559,8 +559,6 @@ static int skl_codec_create(struct hdac_ext_bus *ebus) } } } - - return 0; }
static const struct hdac_bus_ops bus_core_ops = { @@ -612,9 +610,7 @@ static void skl_probe_work(struct work_struct *work) dev_info(bus->dev, "no hda codecs found!\n");
/* create codec instances */ - err = skl_codec_create(ebus); - if (err < 0) - goto out_err; + skl_codec_create(ebus);
if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)) { err = snd_hdac_display_power(bus, false);
Check if the next sink is not null to avoid potential null pointer dereference in skl_tplg_bind_sinks().
Signed-off-by: Guneshwor Singh guneshwor.o.singh@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 68c3f121efc3..8c3ce08f366d 100644 --- a/sound/soc/intel/skylake/skl-topology.c +++ b/sound/soc/intel/skylake/skl-topology.c @@ -925,7 +925,7 @@ static int skl_tplg_bind_sinks(struct snd_soc_dapm_widget *w, } }
- if (!sink) + if (!sink && next_sink) return skl_tplg_bind_sinks(next_sink, skl, src_w, src_mconfig);
return 0;
The patch
ASoC: Intel: Skylake: Fix potential null pointer dereference
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 10a5439f0e4db0b1c4c2a2f6c916d6501cfeae50 Mon Sep 17 00:00:00 2001
From: "guneshwor.o.singh@intel.com" guneshwor.o.singh@intel.com Date: Fri, 28 Jul 2017 16:12:16 +0530 Subject: [PATCH] ASoC: Intel: Skylake: Fix potential null pointer dereference
Check if the next sink is not null to avoid potential null pointer dereference in skl_tplg_bind_sinks().
Signed-off-by: Guneshwor Singh guneshwor.o.singh@intel.com Acked-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 68c3f121efc3..8c3ce08f366d 100644 --- a/sound/soc/intel/skylake/skl-topology.c +++ b/sound/soc/intel/skylake/skl-topology.c @@ -925,7 +925,7 @@ static int skl_tplg_bind_sinks(struct snd_soc_dapm_widget *w, } }
- if (!sink) + if (!sink && next_sink) return skl_tplg_bind_sinks(next_sink, skl, src_w, src_mconfig);
return 0;
On Fri, Jul 28, 2017 at 04:12:13PM +0530, Guneshwor Singh wrote:
Controller can be in reset state by default. Capability structure traversal requires the controller to be out of reset else it results in broken capability parsing. Hence make sure that controller is out of reset before parsing capabilities by doing a full reset.
Good series and nice changelogs...
Whole series:
Acked-By: Vinod Koul vinod.koul@intel.com
The patch
ASoC: Intel: Skylake: Reset the controller in probe
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 60767abcea3dd1d47a4bd38398e1e8c1864975eb Mon Sep 17 00:00:00 2001
From: "guneshwor.o.singh@intel.com" guneshwor.o.singh@intel.com Date: Fri, 28 Jul 2017 16:12:13 +0530 Subject: [PATCH] ASoC: Intel: Skylake: Reset the controller in probe
Controller can be in reset state by default. Capability structure traversal requires the controller to be out of reset else it results in broken capability parsing. Hence make sure that controller is out of reset before parsing capabilities by doing a full reset.
Signed-off-by: Guneshwor Singh guneshwor.o.singh@intel.com Acked-By: Vinod Koul vinod.koul@intel.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/intel/skylake/skl.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index 01a2dd6518a4..b9e1310673f0 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -702,6 +702,8 @@ static int skl_first_init(struct hdac_ext_bus *ebus) return -ENXIO; }
+ skl_init_chip(bus, true); + snd_hdac_bus_parse_capabilities(bus);
if (skl_acquire_irq(ebus, 0) < 0)
participants (3)
-
Guneshwor Singh
-
Mark Brown
-
Vinod Koul