ASoC: Intel: Skylake: Manifest parsing support
Subsystems (3)
cover ASoC: Intel: Skylake: Manifest parsing support
The firmware file contains the extended manifest which needs to be stripped before downloading of firmware.
The firmware manifest also contains manifest which has module information, Driver needs to parse and create module information and use it for sending IPCs.
So this series adds common API for stripping manifest and then strips it for SKL and BXT. Also it adds core support to parse and add module information and its use in SKL and BXT.
Changes in this series:
- modified manifest parse to be generic utility code, added calling patches from SKL n BXTN
- fix issues in last rvw
- add extended manifest parsing in this series
- make manifest series common and use list instead of table and bxtn modules will have manifest parsing and addition later
Ramesh Babu (1):
ASoC: Intel: Skylake: Add strip extended manifest utility
Shreyas NC (1):
ASoC: Intel: Skylake: Add DSP firmware manifest parsing
Vinod Koul (5):
ASoC: Intel: Skylake: Don't use local pointer for firmware
ASoC: Intel: Skylake: Strip manifest for Skylake platform
ASoC: Intel: Skylake: Strip manifest for Broxton platform
ASoC: Intel: Skylake: Find uuids for Skylake
ASoC: Intel: Skylake: Find uuids for Broxton
sound/soc/intel/skylake/Makefile | 2 +- sound/soc/intel/skylake/bxt-sst.c | 26 +++- sound/soc/intel/skylake/skl-sst-dsp.h | 8 + sound/soc/intel/skylake/skl-sst-ipc.h | 3 + sound/soc/intel/skylake/skl-sst-utils.c | 256 ++++++++++++++++++++++++++++++++ sound/soc/intel/skylake/skl-sst.c | 23 ++- sound/soc/intel/skylake/skl-topology.c | 4 + 7 files changed, 315 insertions(+), 7 deletions(-) create mode 100644 sound/soc/intel/skylake/skl-sst-utils.c
Signature · 1 line
1.9.1
PATCH 1/7 ASoC: Intel: Skylake: Add strip extended manifest utility
From: Ramesh Babu <[email protected]>
Some upcoming platforms like broxton etc have extended manifest in firmware binary. This is not required to be downloaded to DSP. So driver needs to strip this before downloading.
Add a utility function to check if a header exists, and remove it in that case
--- sound/soc/intel/skylake/Makefile | 2 +- sound/soc/intel/skylake/skl-sst-dsp.h | 2 ++ sound/soc/intel/skylake/skl-sst-utils.c | 54 +++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 sound/soc/intel/skylake/skl-sst-utils.c
sound/soc/intel/skylake/Makefile +1 -1
@@ -5,6 +5,6 @@ obj-$(CONFIG_SND_SOC_INTEL_SKYLAKE) += snd-soc-skl.o # Skylake IPC Support snd-soc-skl-ipc-objs := skl-sst-ipc.o skl-sst-dsp.o skl-sst-cldma.o \ - skl-sst.o bxt-sst.o + skl-sst.o bxt-sst.o skl-sst-utils.o obj-$(CONFIG_SND_SOC_INTEL_SKYLAKE) += snd-soc-skl-ipc.o
sound/soc/intel/skylake/skl-sst-dsp.h +2 -0
@@ -175,4 +175,6 @@ int bxt_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,void skl_sst_dsp_cleanup (struct device *dev,struct skl_sst *ctx);void bxt_sst_dsp_cleanup (struct device *dev,struct skl_sst *ctx); +int skl_dsp_strip_extended_manifest (struct firmware *fw); +#endif /*__SKL_SST_DSP_H__*/
sound/soc/intel/skylake/skl-sst-utils.c new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Add strip extended manifest utility" to the asoc tree
The patch
ASoC: Intel: Skylake: Add strip extended manifest utility
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
6eee87261f69e366bfe9b908ae3b441efb8e28eaMon Sep 17 00:00:00 2001
From: Ramesh Babu <[email protected]>
Date: Mon, 30 May 2016 17:42:55 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Add strip extended manifest utility
Some upcoming platforms like broxton etc have extended manifest in firmware binary. This is not required to be downloaded to DSP. So driver needs to strip this before downloading.
Add a utility function to check if a header exists, and remove it in that case
--- sound/soc/intel/skylake/Makefile | 2 +- sound/soc/intel/skylake/skl-sst-dsp.h | 2 ++ sound/soc/intel/skylake/skl-sst-utils.c | 54 +++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 sound/soc/intel/skylake/skl-sst-utils.c
sound/soc/intel/skylake/Makefile +1 -1
@@ -5,6 +5,6 @@ obj-$(CONFIG_SND_SOC_INTEL_SKYLAKE) += snd-soc-skl.o # Skylake IPC Support snd-soc-skl-ipc-objs := skl-sst-ipc.o skl-sst-dsp.o skl-sst-cldma.o \ - skl-sst.o bxt-sst.o + skl-sst.o bxt-sst.o skl-sst-utils.o obj-$(CONFIG_SND_SOC_INTEL_SKYLAKE) += snd-soc-skl-ipc.o
sound/soc/intel/skylake/skl-sst-dsp.h +2 -0
@@ -175,4 +175,6 @@ int bxt_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,void skl_sst_dsp_cleanup (struct device *dev,struct skl_sst *ctx);void bxt_sst_dsp_cleanup (struct device *dev,struct skl_sst *ctx); +int skl_dsp_strip_extended_manifest (struct firmware *fw); +#endif /*__SKL_SST_DSP_H__*/
sound/soc/intel/skylake/skl-sst-utils.c new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
2.8.1
PATCH 2/7 ASoC: Intel: Skylake: Don't use local pointer for firmware
In reply to Vinod KoulWe have firmware pointer is driver context, so use that instead of local pointer.
--- sound/soc/intel/skylake/bxt-sst.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
sound/soc/intel/skylake/bxt-sst.c +4 -5
@@ -132,20 +132,19 @@ static int sst_transfer_fw_host_dma(struct sst_dsp *ctx)static int bxt_load_base_firmware (struct sst_dsp *ctx) { -const struct firmware *fw =NULL ;struct skl_sst *skl = ctx->thread_context;int ret; - ret =request_firmware (&fw, ctx->fw_name, ctx->dev); + ret =request_firmware (&ctx->fw, ctx->fw_name, ctx->dev);if (ret <0 ) {dev_err (ctx->dev,"Request firmware failed %d\n" , ret); goto sst_load_base_firmware_failed; } - ret =sst_bxt_prepare_fw (ctx, fw->data, fw->size); + ret =sst_bxt_prepare_fw (ctx, ctx->fw->data, ctx->fw->size);/* Retry Enabling core and ROM load. Retry seemed to help */ if (ret <0 ) { - ret =sst_bxt_prepare_fw (ctx, fw->data, fw->size); + ret =sst_bxt_prepare_fw (ctx, ctx->fw->data, ctx->fw->size);if (ret <0 ) {dev_err (ctx->dev,"Core En/ROM load fail:%d\n" , ret); goto sst_load_base_firmware_failed;
@@ -175,7 +174,7 @@ static int bxt_load_base_firmware(struct sst_dsp *ctx) } sst_load_base_firmware_failed: -release_firmware (fw); +release_firmware (ctx->fw);return ret; }
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Don't use local pointer for firmware" to the asoc tree
The patch
ASoC: Intel: Skylake: Don't use local pointer for firmware
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
fdfa82ee1435dc8ff6b4c82640bd142f2d15edb1Mon Sep 17 00:00:00 2001
From: Vinod Koul <[email protected]>
Date: Mon, 30 May 2016 17:42:56 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Don't use local pointer for firmware
We have firmware pointer is driver context, so use that instead of local pointer.
--- sound/soc/intel/skylake/bxt-sst.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
sound/soc/intel/skylake/bxt-sst.c +4 -5
@@ -132,20 +132,19 @@ static int sst_transfer_fw_host_dma(struct sst_dsp *ctx)static int bxt_load_base_firmware (struct sst_dsp *ctx) { -const struct firmware *fw =NULL ;struct skl_sst *skl = ctx->thread_context;int ret; - ret =request_firmware (&fw, ctx->fw_name, ctx->dev); + ret =request_firmware (&ctx->fw, ctx->fw_name, ctx->dev);if (ret <0 ) {dev_err (ctx->dev,"Request firmware failed %d\n" , ret); goto sst_load_base_firmware_failed; } - ret =sst_bxt_prepare_fw (ctx, fw->data, fw->size); + ret =sst_bxt_prepare_fw (ctx, ctx->fw->data, ctx->fw->size);/* Retry Enabling core and ROM load. Retry seemed to help */ if (ret <0 ) { - ret =sst_bxt_prepare_fw (ctx, fw->data, fw->size); + ret =sst_bxt_prepare_fw (ctx, ctx->fw->data, ctx->fw->size);if (ret <0 ) {dev_err (ctx->dev,"Core En/ROM load fail:%d\n" , ret); goto sst_load_base_firmware_failed;
@@ -175,7 +174,7 @@ static int bxt_load_base_firmware(struct sst_dsp *ctx) } sst_load_base_firmware_failed: -release_firmware (fw); +release_firmware (ctx->fw);return ret; }
Signature · 1 line
2.8.1
PATCH 3/7 ASoC: Intel: Skylake: Strip manifest for Skylake platform
In reply to Vinod KoulFuture firmware updates may comes with extended manifest so invoke skl_dsp_strip_extended_manifest() to check and strip
--- sound/soc/intel/skylake/skl-sst.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
sound/soc/intel/skylake/skl-sst.c +8 -1
@@ -72,6 +72,7 @@ static int skl_load_base_firmware(struct sst_dsp *ctx) {int ret =0 , i;struct skl_sst *skl = ctx->thread_context; +struct firmware stripped_fw;u32 reg; skl->boot_complete = false;
@@ -86,6 +87,12 @@ static int skl_load_base_firmware(struct sst_dsp *ctx) } } +/* check for extended manifest */ + stripped_fw.data = ctx->fw->data; + stripped_fw.size = ctx->fw->size; + +skl_dsp_strip_extended_manifest (&stripped_fw); + ret =skl_dsp_boot (ctx);if (ret <0 ) {dev_err (ctx->dev,"Boot dsp core failed ret: %d" , ret);
@@ -119,7 +126,7 @@ static int skl_load_base_firmware(struct sst_dsp *ctx) goto transfer_firmware_failed; } - ret =skl_transfer_firmware (ctx, ctx->fw->data, ctx->fw->size); + ret =skl_transfer_firmware (ctx, stripped_fw.data, stripped_fw.size);if (ret <0 ) {dev_err (ctx->dev,"Transfer firmware failed%d\n" , ret); goto transfer_firmware_failed;
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Strip manifest for Skylake platform" to the asoc tree
The patch
ASoC: Intel: Skylake: Strip manifest for Skylake platform
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
cd63655e8025eb9839b8aaf503e14f89da9d4f9eMon Sep 17 00:00:00 2001
From: Vinod Koul <[email protected]>
Date: Mon, 30 May 2016 17:42:57 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Strip manifest for Skylake platform
Future firmware updates may comes with extended manifest so invoke skl_dsp_strip_extended_manifest() to check and strip
--- sound/soc/intel/skylake/skl-sst.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
sound/soc/intel/skylake/skl-sst.c +8 -1
@@ -72,6 +72,7 @@ static int skl_load_base_firmware(struct sst_dsp *ctx) {int ret =0 , i;struct skl_sst *skl = ctx->thread_context; +struct firmware stripped_fw;u32 reg; skl->boot_complete = false;
@@ -86,6 +87,12 @@ static int skl_load_base_firmware(struct sst_dsp *ctx) } } +/* check for extended manifest */ + stripped_fw.data = ctx->fw->data; + stripped_fw.size = ctx->fw->size; + +skl_dsp_strip_extended_manifest (&stripped_fw); + ret =skl_dsp_boot (ctx);if (ret <0 ) {dev_err (ctx->dev,"Boot dsp core failed ret: %d" , ret);
@@ -119,7 +126,7 @@ static int skl_load_base_firmware(struct sst_dsp *ctx) goto transfer_firmware_failed; } - ret =skl_transfer_firmware (ctx, ctx->fw->data, ctx->fw->size); + ret =skl_transfer_firmware (ctx, stripped_fw.data, stripped_fw.size);if (ret <0 ) {dev_err (ctx->dev,"Transfer firmware failed%d\n" , ret); goto transfer_firmware_failed;
Signature · 1 line
2.8.1
PATCH 4/7 ASoC: Intel: Skylake: Strip manifest for Broxton platform
In reply to Vinod KoulBroxton firmrware comes with extended manifest so invoke skl_dsp_strip_extended_manifest() to check and strip
--- sound/soc/intel/skylake/bxt-sst.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
sound/soc/intel/skylake/bxt-sst.c +12 -2
@@ -132,6 +132,7 @@ static int sst_transfer_fw_host_dma(struct sst_dsp *ctx)static int bxt_load_base_firmware (struct sst_dsp *ctx) { +struct firmware stripped_fw;struct skl_sst *skl = ctx->thread_context;int ret;
@@ -141,10 +142,19 @@ static int bxt_load_base_firmware(struct sst_dsp *ctx) goto sst_load_base_firmware_failed; } - ret =sst_bxt_prepare_fw (ctx, ctx->fw->data, ctx->fw->size); +/* check for extended manifest */ +if (ctx->fw ==NULL ) + goto sst_load_base_firmware_failed; + + + stripped_fw.data = ctx->fw->data; + stripped_fw.size = ctx->fw->size; +skl_dsp_strip_extended_manifest (&stripped_fw); + + ret =sst_bxt_prepare_fw (ctx, stripped_fw.data, stripped_fw.size);/* Retry Enabling core and ROM load. Retry seemed to help */ if (ret <0 ) { - ret =sst_bxt_prepare_fw (ctx, ctx->fw->data, ctx->fw->size); + ret =sst_bxt_prepare_fw (ctx, stripped_fw.data, stripped_fw.size);if (ret <0 ) {dev_err (ctx->dev,"Core En/ROM load fail:%d\n" , ret); goto sst_load_base_firmware_failed;
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Strip manifest for Broxton platform" to the asoc tree
The patch
ASoC: Intel: Skylake: Strip manifest for Broxton platform
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
bf242d19d5549d52374f5026ad11ddd793fbd8fbMon Sep 17 00:00:00 2001
From: Vinod Koul <[email protected]>
Date: Mon, 30 May 2016 17:42:58 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Strip manifest for Broxton platform
Broxton firmrware comes with extended manifest so invoke skl_dsp_strip_extended_manifest() to check and strip
--- sound/soc/intel/skylake/bxt-sst.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
sound/soc/intel/skylake/bxt-sst.c +12 -2
@@ -132,6 +132,7 @@ static int sst_transfer_fw_host_dma(struct sst_dsp *ctx)static int bxt_load_base_firmware (struct sst_dsp *ctx) { +struct firmware stripped_fw;struct skl_sst *skl = ctx->thread_context;int ret;
@@ -141,10 +142,19 @@ static int bxt_load_base_firmware(struct sst_dsp *ctx) goto sst_load_base_firmware_failed; } - ret =sst_bxt_prepare_fw (ctx, ctx->fw->data, ctx->fw->size); +/* check for extended manifest */ +if (ctx->fw ==NULL ) + goto sst_load_base_firmware_failed; + + + stripped_fw.data = ctx->fw->data; + stripped_fw.size = ctx->fw->size; +skl_dsp_strip_extended_manifest (&stripped_fw); + + ret =sst_bxt_prepare_fw (ctx, stripped_fw.data, stripped_fw.size);/* Retry Enabling core and ROM load. Retry seemed to help */ if (ret <0 ) { - ret =sst_bxt_prepare_fw (ctx, ctx->fw->data, ctx->fw->size); + ret =sst_bxt_prepare_fw (ctx, stripped_fw.data, stripped_fw.size);if (ret <0 ) {dev_err (ctx->dev,"Core En/ROM load fail:%d\n" , ret); goto sst_load_base_firmware_failed;
Signature · 1 line
2.8.1
PATCH 5/7 ASoC: Intel: Skylake: Add DSP firmware manifest parsing
In reply to Vinod KoulFrom: Shreyas NC <[email protected]>
Module params like module_id and loadable flag can be changed in the DSP Firmware. These are kept in the firmware manifest and driver should read these values from this manifest.
So, add support to parse the DSP firmware manifest and read these module params.
--- sound/soc/intel/skylake/skl-sst-dsp.h | 6 + sound/soc/intel/skylake/skl-sst-ipc.h | 3 + sound/soc/intel/skylake/skl-sst-utils.c | 206 +++++++++++++++++++++++++++++++- sound/soc/intel/skylake/skl-topology.c | 4 + 4 files changed, 217 insertions(+), 2 deletions(-)
sound/soc/intel/skylake/skl-sst-dsp.h +6 -0
@@ -19,6 +19,7 @@#include <linux/interrupt.h> #include <sound/memalloc.h> #include "skl-sst-cldma.h" +#include "skl-tplg-interface.h" struct sst_dsp ;struct skl_sst ;
@@ -175,6 +176,11 @@ int bxt_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,void skl_sst_dsp_cleanup (struct device *dev,struct skl_sst *ctx);void bxt_sst_dsp_cleanup (struct device *dev,struct skl_sst *ctx); +int snd_skl_get_module_info (struct skl_sst *ctx,u8 *uuid, +struct skl_dfw_module *dfw_config); +int snd_skl_parse_uuids (struct sst_dsp *ctx,unsigned int offset); +void skl_freeup_uuid_list (struct skl_sst *ctx); +int skl_dsp_strip_extended_manifest (struct firmware *fw);#endif /*__SKL_SST_DSP_H__*/
sound/soc/intel/skylake/skl-sst-ipc.h +3 -0
@@ -60,6 +60,9 @@ struct skl_sst {void (*enable_miscbdcge)(struct device *dev,bool enable);/*Is CGCTL.MISCBDCGE disabled*/ bool miscbdcg_disabled; + +/* Populate module information */ +struct list_head uuid_list; };struct skl_ipc_init_instance_msg {
sound/soc/intel/skylake/skl-sst-utils.c +204 -2
227 lines not on this page · raw message
sound/soc/intel/skylake/skl-topology.c +4 -0
@@ -1585,6 +1585,10 @@ static int skl_tplg_widget_load(struct snd_soc_component *cmpnt, w->priv = mconfig;memcpy (&mconfig->guid, &dfw_config->uuid,16 ); + ret =snd_skl_get_module_info (skl->skl_sst, mconfig->guid, dfw_config); +if (ret <0 ) +return ret; + mconfig->id.module_id = dfw_config->module_id; mconfig->id.instance_id = dfw_config->instance_id; mconfig->mcps = dfw_config->max_mcps;
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Add DSP firmware manifest parsing" to the asoc tree
The patch
ASoC: Intel: Skylake: Add DSP firmware manifest parsing
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
ea6b3e943787b996487605f853295397c52e51fdMon Sep 17 00:00:00 2001
From: Shreyas NC <[email protected]>
Date: Mon, 30 May 2016 17:42:59 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Add DSP firmware manifest parsing
Module params like module_id and loadable flag can be changed in the DSP Firmware. These are kept in the firmware manifest and driver should read these values from this manifest.
So, add support to parse the DSP firmware manifest and read these module params.
--- sound/soc/intel/skylake/skl-sst-dsp.h | 6 + sound/soc/intel/skylake/skl-sst-ipc.h | 3 + sound/soc/intel/skylake/skl-sst-utils.c | 206 +++++++++++++++++++++++++++++++- sound/soc/intel/skylake/skl-topology.c | 4 + 4 files changed, 217 insertions(+), 2 deletions(-)
sound/soc/intel/skylake/skl-sst-dsp.h +6 -0
@@ -19,6 +19,7 @@#include <linux/interrupt.h> #include <sound/memalloc.h> #include "skl-sst-cldma.h" +#include "skl-tplg-interface.h" struct sst_dsp ;struct skl_sst ;
@@ -175,6 +176,11 @@ int bxt_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,void skl_sst_dsp_cleanup (struct device *dev,struct skl_sst *ctx);void bxt_sst_dsp_cleanup (struct device *dev,struct skl_sst *ctx); +int snd_skl_get_module_info (struct skl_sst *ctx,u8 *uuid, +struct skl_dfw_module *dfw_config); +int snd_skl_parse_uuids (struct sst_dsp *ctx,unsigned int offset); +void skl_freeup_uuid_list (struct skl_sst *ctx); +int skl_dsp_strip_extended_manifest (struct firmware *fw);#endif /*__SKL_SST_DSP_H__*/
sound/soc/intel/skylake/skl-sst-ipc.h +3 -0
@@ -60,6 +60,9 @@ struct skl_sst {void (*enable_miscbdcge)(struct device *dev,bool enable);/*Is CGCTL.MISCBDCGE disabled*/ bool miscbdcg_disabled; + +/* Populate module information */ +struct list_head uuid_list; };struct skl_ipc_init_instance_msg {
sound/soc/intel/skylake/skl-sst-utils.c +204 -2
227 lines not on this page · raw message
sound/soc/intel/skylake/skl-topology.c +4 -0
@@ -1585,6 +1585,10 @@ static int skl_tplg_widget_load(struct snd_soc_component *cmpnt, w->priv = mconfig;memcpy (&mconfig->guid, &dfw_config->uuid,16 ); + ret =snd_skl_get_module_info (skl->skl_sst, mconfig->guid, dfw_config); +if (ret <0 ) +return ret; + mconfig->id.module_id = dfw_config->module_id; mconfig->id.instance_id = dfw_config->instance_id; mconfig->mcps = dfw_config->max_mcps;
Signature · 1 line
2.8.1
PATCH 6/7 ASoC: Intel: Skylake: Find uuids for Skylake
In reply to Vinod KoulSKylake uses different offset in manifest for parsing module table. So invoke common parsing utility from skylake using skylake offset.
--- sound/soc/intel/skylake/skl-sst.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
sound/soc/intel/skylake/skl-sst.c +14 -0
@@ -68,6 +68,8 @@ static int skl_transfer_firmware(struct sst_dsp *ctx,return ret; } +#define SKL_ADSP_FW_BIN_HDR_OFFSET 0x284 +static int skl_load_base_firmware (struct sst_dsp *ctx) {int ret =0 , i;
@@ -85,6 +87,16 @@ static int skl_load_base_firmware(struct sst_dsp *ctx)skl_dsp_disable_core (ctx);return -EIO ; } + + } + + ret =snd_skl_parse_uuids (ctx,SKL_ADSP_FW_BIN_HDR_OFFSET ); +if (ret <0 ) { +dev_err (ctx->dev, +"UUID parsing err: %d\n" , ret); +release_firmware (ctx->fw); +skl_dsp_disable_core (ctx); +return ret; }/* check for extended manifest */
@@ -416,6 +428,7 @@ int skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq, skl->dev = dev; skl_dev.thread_context = skl; +INIT_LIST_HEAD (&skl->uuid_list); skl->dsp =skl_dsp_ctx_init (dev, &skl_dev, irq);if (!skl->dsp) {
@@ -459,6 +472,7 @@ EXPORT_SYMBOL_GPL(skl_sst_dsp_init);void skl_sst_dsp_cleanup (struct device *dev,struct skl_sst *ctx) {skl_clear_module_table (ctx->dsp); +skl_freeup_uuid_list (ctx);skl_ipc_free (&ctx->ipc); ctx->dsp->ops->free (ctx->dsp);if (ctx->boot_complete) {
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Find uuids for Skylake" to the asoc tree
The patch
ASoC: Intel: Skylake: Find uuids for Skylake
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
06711051d2e02f54a3ba4c2c0f4ce096f45437b1Mon Sep 17 00:00:00 2001
From: Vinod Koul <[email protected]>
Date: Mon, 30 May 2016 17:43:00 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Find uuids for Skylake
SKylake uses different offset in manifest for parsing module table. So invoke common parsing utility from skylake using skylake offset.
--- sound/soc/intel/skylake/skl-sst.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
sound/soc/intel/skylake/skl-sst.c +14 -0
@@ -68,6 +68,8 @@ static int skl_transfer_firmware(struct sst_dsp *ctx,return ret; } +#define SKL_ADSP_FW_BIN_HDR_OFFSET 0x284 +static int skl_load_base_firmware (struct sst_dsp *ctx) {int ret =0 , i;
@@ -85,6 +87,16 @@ static int skl_load_base_firmware(struct sst_dsp *ctx)skl_dsp_disable_core (ctx);return -EIO ; } + + } + + ret =snd_skl_parse_uuids (ctx,SKL_ADSP_FW_BIN_HDR_OFFSET ); +if (ret <0 ) { +dev_err (ctx->dev, +"UUID parsing err: %d\n" , ret); +release_firmware (ctx->fw); +skl_dsp_disable_core (ctx); +return ret; }/* check for extended manifest */
@@ -416,6 +428,7 @@ int skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq, skl->dev = dev; skl_dev.thread_context = skl; +INIT_LIST_HEAD (&skl->uuid_list); skl->dsp =skl_dsp_ctx_init (dev, &skl_dev, irq);if (!skl->dsp) {
@@ -459,6 +472,7 @@ EXPORT_SYMBOL_GPL(skl_sst_dsp_init);void skl_sst_dsp_cleanup (struct device *dev,struct skl_sst *ctx) {skl_clear_module_table (ctx->dsp); +skl_freeup_uuid_list (ctx);skl_ipc_free (&ctx->ipc); ctx->dsp->ops->free (ctx->dsp);if (ctx->boot_complete) {
Signature · 1 line
2.8.1
PATCH 7/7 ASoC: Intel: Skylake: Find uuids for Broxton
In reply to Vinod KoulBroxton uses different offset in manifest for parsing module table. So invoke common parsing utility from broxton using broxton offset.
--- sound/soc/intel/skylake/bxt-sst.c | 7 +++++++ 1 file changed, 7 insertions(+)
sound/soc/intel/skylake/bxt-sst.c +7 -0
@@ -130,6 +130,8 @@ static int sst_transfer_fw_host_dma(struct sst_dsp *ctx)return ret; } +#define BXT_ADSP_FW_BIN_HDR_OFFSET 0x2000 +static int bxt_load_base_firmware (struct sst_dsp *ctx) {struct firmware stripped_fw;
@@ -146,6 +148,9 @@ static int bxt_load_base_firmware(struct sst_dsp *ctx)if (ctx->fw ==NULL ) goto sst_load_base_firmware_failed; + ret =snd_skl_parse_uuids (ctx,BXT_ADSP_FW_BIN_HDR_OFFSET ); +if (ret <0 ) + goto sst_load_base_firmware_failed; stripped_fw.data = ctx->fw->data; stripped_fw.size = ctx->fw->size;
@@ -283,6 +288,7 @@ int bxt_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq, skl->dev = dev; skl_dev.thread_context = skl; +INIT_LIST_HEAD (&skl->uuid_list); skl->dsp =skl_dsp_ctx_init (dev, &skl_dev, irq);if (!skl->dsp) {
@@ -323,6 +329,7 @@ EXPORT_SYMBOL_GPL(bxt_sst_dsp_init);void bxt_sst_dsp_cleanup (struct device *dev,struct skl_sst *ctx) { +skl_freeup_uuid_list (ctx);skl_ipc_free (&ctx->ipc); ctx->dsp->cl_dev.ops.cl_cleanup_controller (ctx->dsp);
Signature · 1 line
1.9.1
Mark Brown
maintainerApplied "ASoC: Intel: Skylake: Find uuids for Broxton" to the asoc tree
The patch
ASoC: Intel: Skylake: Find uuids for Broxton
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
3467a64dded3bcdbff8c3c9db2b1f1af20a9e295Mon Sep 17 00:00:00 2001
From: Vinod Koul <[email protected]>
Date: Mon, 30 May 2016 17:43:01 +0530
Subject: [PATCH] ASoC: Intel: Skylake: Find uuids for Broxton
Broxton uses different offset in manifest for parsing module table. So invoke common parsing utility from broxton using broxton offset.
--- sound/soc/intel/skylake/bxt-sst.c | 7 +++++++ 1 file changed, 7 insertions(+)
sound/soc/intel/skylake/bxt-sst.c +7 -0
@@ -130,6 +130,8 @@ static int sst_transfer_fw_host_dma(struct sst_dsp *ctx)return ret; } +#define BXT_ADSP_FW_BIN_HDR_OFFSET 0x2000 +static int bxt_load_base_firmware (struct sst_dsp *ctx) {struct firmware stripped_fw;
@@ -146,6 +148,9 @@ static int bxt_load_base_firmware(struct sst_dsp *ctx)if (ctx->fw ==NULL ) goto sst_load_base_firmware_failed; + ret =snd_skl_parse_uuids (ctx,BXT_ADSP_FW_BIN_HDR_OFFSET ); +if (ret <0 ) + goto sst_load_base_firmware_failed; stripped_fw.data = ctx->fw->data; stripped_fw.size = ctx->fw->size;
@@ -283,6 +288,7 @@ int bxt_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq, skl->dev = dev; skl_dev.thread_context = skl; +INIT_LIST_HEAD (&skl->uuid_list); skl->dsp =skl_dsp_ctx_init (dev, &skl_dev, irq);if (!skl->dsp) {
@@ -323,6 +329,7 @@ EXPORT_SYMBOL_GPL(bxt_sst_dsp_init);void bxt_sst_dsp_cleanup (struct device *dev,struct skl_sst *ctx) { +skl_freeup_uuid_list (ctx);skl_ipc_free (&ctx->ipc); ctx->dsp->cl_dev.ops.cl_cleanup_controller (ctx->dsp);
Signature · 1 line
2.8.1