ASoC: SOF: Intel: Add support for MeteorLake
Subsystems (4)
Bard Liao
maintainercover ASoC: SOF: Intel: Add support for MeteorLake
Add platform abstraction for the Meteor Lake platform.
This platform has significant differences compared to the TGL/ADL
generation: it relies on new hardware using the code name 'ACE' and only supports the INTEL_IPC4 protocol and firmware architecture based on the Zephyr RTOS
Bard Liao (2):
ASoC: SOC: Intel: introduce cl_init callback
ASoC: SOF: Intel: Add support for MeteorLake (MTL)
include/linux/soundwire/sdw_intel.h | 2 + sound/soc/sof/intel/Kconfig | 16 + sound/soc/sof/intel/Makefile | 4 +- sound/soc/sof/intel/apl.c | 1 + sound/soc/sof/intel/cnl.c | 2 + sound/soc/sof/intel/hda-loader.c | 15 +- sound/soc/sof/intel/hda.h | 4 + sound/soc/sof/intel/icl.c | 1 + sound/soc/sof/intel/mtl.c | 800 ++++++++++++++++++++++++++++ sound/soc/sof/intel/mtl.h | 76 +++ sound/soc/sof/intel/pci-mtl.c | 71 +++ sound/soc/sof/intel/shim.h | 2 + sound/soc/sof/intel/tgl.c | 4 + 13 files changed, 994 insertions(+), 4 deletions(-) create mode 100644 sound/soc/sof/intel/mtl.c create mode 100644 sound/soc/sof/intel/mtl.h create mode 100644 sound/soc/sof/intel/pci-mtl.c
Signature · 1 line
2.17.1
Bard Liao
maintainerPATCH 1/2 ASoC: SOC: Intel: introduce cl_init callback
The code loader init sequences are different between versions of Intel platforms. Have a cl_init callback allows us to reuse the common code.
No function changed.
--- sound/soc/sof/intel/apl.c | 1 + sound/soc/sof/intel/cnl.c | 2 ++ sound/soc/sof/intel/hda-loader.c | 15 ++++++++++++--- sound/soc/sof/intel/hda.h | 1 + sound/soc/sof/intel/icl.c | 1 + sound/soc/sof/intel/shim.h | 1 + sound/soc/sof/intel/tgl.c | 4 ++++ 7 files changed, 22 insertions(+), 3 deletions(-)
sound/soc/sof/intel/apl.c +1 -0
@@ -101,6 +101,7 @@ const struct sof_intel_dsp_desc apl_chip_info = { .ssp_base_offset = APL_SSP_BASE_OFFSET, .quirks = SOF_INTEL_PROCEN_FMT_QUIRK, .check_ipc_irq = hda_dsp_check_ipc_irq, + .cl_init = cl_dsp_init, .hw_ip_version = SOF_INTEL_CAVS_1_5_PLUS, };EXPORT_SYMBOL_NS (apl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
sound/soc/sof/intel/cnl.c +2 -0
@@ -401,6 +401,7 @@ const struct sof_intel_dsp_desc cnl_chip_info = { .sdw_alh_base = SDW_ALH_BASE, .check_sdw_irq = hda_common_check_sdw_irq, .check_ipc_irq = hda_dsp_check_ipc_irq, + .cl_init = cl_dsp_init, .hw_ip_version = SOF_INTEL_CAVS_1_8, };EXPORT_SYMBOL_NS (cnl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
@@ -430,6 +431,7 @@ const struct sof_intel_dsp_desc jsl_chip_info = { .sdw_alh_base = SDW_ALH_BASE, .check_sdw_irq = hda_common_check_sdw_irq, .check_ipc_irq = hda_dsp_check_ipc_irq, + .cl_init = cl_dsp_init, .hw_ip_version = SOF_INTEL_CAVS_2_0, };EXPORT_SYMBOL_NS (jsl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
sound/soc/sof/intel/hda-loader.c +12 -3
@@ -99,7 +99,7 @@ struct hdac_ext_stream *hda_cl_stream_prepare(struct snd_sof_dev *sdev, unsigned* power on all host managed cores and only unstall/run the boot core to boot the * DSP then turn off all non boot cores (if any) is powered on. */ -static int cl_dsp_init (struct snd_sof_dev *sdev,int stream_tag,bool imr_boot) +int cl_dsp_init (struct snd_sof_dev *sdev,int stream_tag,bool imr_boot) {struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;const struct sof_intel_dsp_desc *chip = hda->desc;
@@ -369,9 +369,15 @@ int hda_dsp_cl_boot_firmware_iccmax(struct snd_sof_dev *sdev)static int hda_dsp_boot_imr (struct snd_sof_dev *sdev) { +const struct sof_intel_dsp_desc *chip_info;int ret; - ret =cl_dsp_init (sdev,0 , true); + chip_info =get_chip_info (sdev->pdata); +if (chip_info->cl_init) + ret = chip_info->cl_init (sdev,0 , true); +else + ret = -EINVAL ; +if (!ret)hda_sdw_process_wakeen (sdev);
@@ -430,7 +436,10 @@ int hda_dsp_cl_boot_firmware(struct snd_sof_dev *sdev) "Attempting iteration %d of Core En/ROM load...\n", i); hda->boot_iteration = i +1 ; - ret =cl_dsp_init (sdev, hext_stream->hstream.stream_tag, false); +if (chip_info->cl_init) + ret = chip_info->cl_init (sdev, hext_stream->hstream.stream_tag, false); +else + ret = -EINVAL ;/* don't retry anymore if successful */ if (!ret)
sound/soc/sof/intel/hda.h +1 -0
@@ -602,6 +602,7 @@ struct hdac_ext_stream *hda_cl_stream_prepare(struct snd_sof_dev *sdev, unsigned int direction);int hda_cl_cleanup (struct snd_sof_dev *sdev,struct snd_dma_buffer *dmab,struct hdac_ext_stream *hext_stream); +int cl_dsp_init (struct snd_sof_dev *sdev,int stream_tag,bool imr_boot);#define HDA_CL_STREAM_FORMAT 0x40/* pre and post fw run ops */
sound/soc/sof/intel/icl.c +1 -0
@@ -152,6 +152,7 @@ const struct sof_intel_dsp_desc icl_chip_info = { .sdw_alh_base = SDW_ALH_BASE, .check_sdw_irq = hda_common_check_sdw_irq, .check_ipc_irq = hda_dsp_check_ipc_irq, + .cl_init = cl_dsp_init, .hw_ip_version = SOF_INTEL_CAVS_2_0, };EXPORT_SYMBOL_NS (icl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
sound/soc/sof/intel/shim.h +1 -0
@@ -185,6 +185,7 @@ struct sof_intel_dsp_desc {enum sof_intel_hw_ip_version hw_ip_version;bool (*check_sdw_irq)(struct snd_sof_dev *sdev);bool (*check_ipc_irq)(struct snd_sof_dev *sdev); +int (*cl_init)(struct snd_sof_dev *sdev,int stream_tag,bool imr_boot); };extern struct snd_sof_dsp_ops sof_tng_ops;
sound/soc/sof/intel/tgl.c +4 -0
@@ -127,6 +127,7 @@ const struct sof_intel_dsp_desc tgl_chip_info = { .sdw_alh_base = SDW_ALH_BASE, .check_sdw_irq = hda_common_check_sdw_irq, .check_ipc_irq = hda_dsp_check_ipc_irq, + .cl_init = cl_dsp_init, .hw_ip_version = SOF_INTEL_CAVS_2_5, };EXPORT_SYMBOL_NS (tgl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
@@ -149,6 +150,7 @@ const struct sof_intel_dsp_desc tglh_chip_info = { .sdw_alh_base = SDW_ALH_BASE, .check_sdw_irq = hda_common_check_sdw_irq, .check_ipc_irq = hda_dsp_check_ipc_irq, + .cl_init = cl_dsp_init, .hw_ip_version = SOF_INTEL_CAVS_2_5, };EXPORT_SYMBOL_NS (tglh_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
@@ -171,6 +173,7 @@ const struct sof_intel_dsp_desc ehl_chip_info = { .sdw_alh_base = SDW_ALH_BASE, .check_sdw_irq = hda_common_check_sdw_irq, .check_ipc_irq = hda_dsp_check_ipc_irq, + .cl_init = cl_dsp_init, .hw_ip_version = SOF_INTEL_CAVS_2_5, };EXPORT_SYMBOL_NS (ehl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
@@ -193,6 +196,7 @@ const struct sof_intel_dsp_desc adls_chip_info = { .sdw_alh_base = SDW_ALH_BASE, .check_sdw_irq = hda_common_check_sdw_irq, .check_ipc_irq = hda_dsp_check_ipc_irq, + .cl_init = cl_dsp_init, .hw_ip_version = SOF_INTEL_CAVS_2_5, };EXPORT_SYMBOL_NS (adls_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
Signature · 1 line
2.17.1
Bard Liao
maintainerPATCH 2/2 ASoC: SOF: Intel: Add support for MeteorLake (MTL)
In reply to Bard LiaoAdd platform abstraction for the Meteor Lake platform.
This platform has significant differences compared to the TGL/ADL
generation: it relies on new hardware using the code name 'ACE' and only supports the INTEL_IPC4 protocol and firmware architecture based on the Zephyr RTOS
--- include/linux/soundwire/sdw_intel.h | 2 + sound/soc/sof/intel/Kconfig | 16 + sound/soc/sof/intel/Makefile | 4 +- sound/soc/sof/intel/hda.h | 3 + sound/soc/sof/intel/mtl.c | 800 ++++++++++++++++++++++++++++ sound/soc/sof/intel/mtl.h | 76 +++ sound/soc/sof/intel/pci-mtl.c | 71 +++ sound/soc/sof/intel/shim.h | 1 + 8 files changed, 972 insertions(+), 1 deletion(-) create mode 100644 sound/soc/sof/intel/mtl.c create mode 100644 sound/soc/sof/intel/mtl.h create mode 100644 sound/soc/sof/intel/pci-mtl.c
include/linux/soundwire/sdw_intel.h +2 -0
@@ -9,6 +9,8 @@#define SDW_SHIM_BASE 0x2C000#define SDW_ALH_BASE 0x2C800 +#define SDW_SHIM_BASE_ACE 0x38000 +#define SDW_ALH_BASE_ACE 0x24000#define SDW_LINK_BASE 0x30000#define SDW_LINK_SIZE 0x10000
sound/soc/sof/intel/Kconfig +16 -0
@@ -221,6 +221,22 @@ config SND_SOC_SOF_ALDERLAKE Say Y if you have such a device. If unsure select "N". +config SND_SOC_SOF_INTEL_MTL + tristate + select SND_SOC_SOF_HDA_COMMON + select SND_SOC_SOF_INTEL_SOUNDWIRE_LINK_BASELINE + select SND_SOC_SOF_INTEL_IPC4 + +config SND_SOC_SOF_METEORLAKE + tristate "SOF support for Meteorlake" + default SND_SOC_SOF_PCI + select SND_SOC_SOF_INTEL_MTL + help + This adds support for Sound Open Firmware for Intel(R) platforms + using the Meteorlake processors. + Say Y if you have such a device. + If unsure select "N". + config SND_SOC_SOF_HDA_COMMON tristate select SND_SOC_SOF_INTEL_COMMON
sound/soc/sof/intel/Makefile +3 -1
@@ -6,7 +6,7 @@ snd-sof-acpi-intel-bdw-objs := bdw.o snd-sof-intel-hda-common-objs := hda.o hda-loader.o hda-stream.o hda-trace.o \ hda-dsp.o hda-ipc.o hda-ctrl.o hda-pcm.o \ hda-dai.o hda-bus.o \ - apl.o cnl.o tgl.o icl.o hda-common-ops.o + apl.o cnl.o tgl.o icl.o mtl.o hda-common-ops.o snd-sof-intel-hda-common-$(CONFIG_SND_SOC_SOF_HDA_PROBES) += hda-probes.o snd-sof-intel-hda-objs := hda-codec.o
@@ -24,9 +24,11 @@ snd-sof-pci-intel-apl-objs := pci-apl.o snd-sof-pci-intel-cnl-objs := pci-cnl.o snd-sof-pci-intel-icl-objs := pci-icl.o snd-sof-pci-intel-tgl-objs := pci-tgl.o +snd-sof-pci-intel-mtl-objs := pci-mtl.o obj-$(CONFIG_SND_SOC_SOF_MERRIFIELD) += snd-sof-pci-intel-tng.o obj-$(CONFIG_SND_SOC_SOF_INTEL_APL) += snd-sof-pci-intel-apl.o obj-$(CONFIG_SND_SOC_SOF_INTEL_CNL) += snd-sof-pci-intel-cnl.o obj-$(CONFIG_SND_SOC_SOF_INTEL_ICL) += snd-sof-pci-intel-icl.o obj-$(CONFIG_SND_SOC_SOF_INTEL_TGL) += snd-sof-pci-intel-tgl.o +obj-$(CONFIG_SND_SOC_SOF_INTEL_MTL) += snd-sof-pci-intel-mtl.o
sound/soc/sof/intel/hda.h +3 -0
@@ -714,6 +714,8 @@ extern struct snd_sof_dsp_ops sof_tgl_ops;int sof_tgl_ops_init (struct snd_sof_dev *sdev);extern struct snd_sof_dsp_ops sof_icl_ops;int sof_icl_ops_init (struct snd_sof_dev *sdev); +extern struct snd_sof_dsp_ops sof_mtl_ops; +int sof_mtl_ops_init (struct snd_sof_dev *sdev);extern const struct sof_intel_dsp_desc apl_chip_info;extern const struct sof_intel_dsp_desc cnl_chip_info;
@@ -723,6 +725,7 @@ extern const struct sof_intel_dsp_desc tglh_chip_info;extern const struct sof_intel_dsp_desc ehl_chip_info;extern const struct sof_intel_dsp_desc jsl_chip_info;extern const struct sof_intel_dsp_desc adls_chip_info; +extern const struct sof_intel_dsp_desc mtl_chip_info;/* Probes support */ #if IS_ENABLED (CONFIG_SND_SOC_SOF_HDA_PROBES )
sound/soc/sof/intel/mtl.c new file +800 -0
800 lines not on this page · raw message
sound/soc/sof/intel/mtl.h new file +76 -0
76 lines not on this page · raw message
sound/soc/sof/intel/pci-mtl.c new file +71 -0
71 lines not on this page · raw message
sound/soc/sof/intel/shim.h +1 -0
@@ -20,6 +20,7 @@ enum sof_intel_hw_ip_version {SOF_INTEL_CAVS_1_8 ,/* CannonLake, CometLake, CoffeeLake */ SOF_INTEL_CAVS_2_0 ,/* IceLake, JasperLake */ SOF_INTEL_CAVS_2_5 ,/* TigerLake, AlderLake */ + SOF_INTEL_ACE_1_0, /* MeteorLake */ };/*
Signature · 1 line
2.17.1
Mark Brown
maintainerQuoted 8 lines · Bard Liao
Add platform abstraction for the Meteor Lake platform.
This platform has significant differences compared to the TGL/ADL
generation: it relies on new hardware using the code name 'ACE' and only supports theINTEL_IPC4protocol and firmware architecture based on the Zephyr RTOS[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: SOC: Intel: introduce cl_init callback
commit: ab222a4aaecfafece1516c775143e1cb9eb31612
[2/2] ASoC: SOF: Intel: Add support for MeteorLake (MTL)
commit: 064520e8aeaa2569f6504a50a37ac801b73656bcAll 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