ASoC: SOF: add INTEL_IPC4 plumbing
Subsystems (5)
cover ASoC: SOF: add INTEL_IPC4 plumbing
The INTEL_IPC4 protocol and firmware architecture will rely on different sets of firmware binary and topology files. Some platforms will only support INTEL_IPC4, some will support both INTEL_IPC4 and SOF_IPC for development, and some will stay with the existing SOF_IPC.
This patchset adds new IPC definitions, and search paths for firmware and topology files, along with means to override the default IPC type and search paths for development. The firmware binary names are aligned with those used by the Intel AVS driver to avoid duplicate firmware installs, but the topology will have to differ due to driver architecture differences.
In addition, this patchset adds basic hardware support for SKL/KBL with HDaudio codecs, which requires a dedicated code loader and manifest support. Plain HDAudio was tested on Dell XPS 9350 and Intel NUC devices. HDAudio+DMIC support was tested on more recent UpExtreme (WHL and TGL variants).
Pierre-Louis Bossart (12):
ASoC: SOF: add definitions for different IPC types
ASoC: SOF: add path indirection to each IPC type
ASoC: SOF: add default IPC capability and file paths
ASoC: SOF: add IPC-dependent file names
ASoC: SOF: sof-pci-dev: add parameter to override firmware filename
ASoC: SOF: sof-pci-dev: add parameter to override topology filename
ASoC: SOF: sof-audio: preserve topology filename override in nocodec
mode
ASoC: SOF: remove const qualifier for 'struct snd_sof_dsp_ops'
ASoC: SOF: Intel: hda: use common ops across platforms
ASoC: SOF: Intel: hda: use BIT() macros for consistency
ASoC: SOF: Intel: add initial SKL/KBL hardware support
ASoC: SOF: Intel: add IP identifier
Ranjani Sridharan (4):
ASoC: SOF: Intel: move HDA_CL_STREAM_FORMAT definition to header
ASoC: SOF: Intel: hda: define check_ipc_irq op
ASoC: SOF: Intel: hda: Define rom_status_reg in sof_intel_dsp_desc
ASoC: SOF: Intel: hda: expose some codeloader functions
include/sound/sof.h | 23 +- sound/soc/sof/amd/acp.h | 2 +- sound/soc/sof/amd/pci-rn.c | 14 +- sound/soc/sof/amd/renoir.c | 2 +- sound/soc/sof/core.c | 6 + sound/soc/sof/debug.c | 2 +- sound/soc/sof/imx/imx8.c | 32 +- sound/soc/sof/imx/imx8m.c | 16 +- sound/soc/sof/intel/Kconfig | 24 + sound/soc/sof/intel/Makefile | 6 +- sound/soc/sof/intel/apl.c | 107 +---- sound/soc/sof/intel/bdw.c | 17 +- sound/soc/sof/intel/byt.c | 48 +- sound/soc/sof/intel/cnl.c | 112 ++--- sound/soc/sof/intel/hda-common-ops.c | 107 +++++ sound/soc/sof/intel/hda-dsp.c | 4 +- sound/soc/sof/intel/hda-ipc.c | 8 + sound/soc/sof/intel/hda-loader-skl.c | 583 +++++++++++++++++++++++++ sound/soc/sof/intel/hda-loader.c | 43 +- sound/soc/sof/intel/hda.c | 25 +- sound/soc/sof/intel/hda.h | 42 +- sound/soc/sof/intel/icl.c | 111 +---- sound/soc/sof/intel/pci-apl.c | 36 +- sound/soc/sof/intel/pci-cnl.c | 54 ++- sound/soc/sof/intel/pci-icl.c | 36 +- sound/soc/sof/intel/pci-skl.c | 89 ++++ sound/soc/sof/intel/pci-tgl.c | 91 +++- sound/soc/sof/intel/pci-tng.c | 17 +- sound/soc/sof/intel/shim.h | 16 +- sound/soc/sof/intel/skl.c | 70 +++ sound/soc/sof/intel/tgl.c | 120 ++--- sound/soc/sof/mediatek/mt8195/mt8195.c | 16 +- sound/soc/sof/ops.h | 8 + sound/soc/sof/pcm.c | 2 +- sound/soc/sof/sof-acpi-dev.c | 6 +- sound/soc/sof/sof-audio.c | 3 +- sound/soc/sof/sof-of-dev.c | 6 +- sound/soc/sof/sof-pci-dev.c | 47 +- 38 files changed, 1465 insertions(+), 486 deletions(-) create mode 100644 sound/soc/sof/intel/hda-common-ops.c create mode 100644 sound/soc/sof/intel/hda-loader-skl.c create mode 100644 sound/soc/sof/intel/pci-skl.c create mode 100644 sound/soc/sof/intel/skl.c
Signature · 1 line
2.30.2
PATCH 1/16 ASoC: SOF: add definitions for different IPC types
Add enum type to allow for different types of IPCs. The IPCv4 is intended for Intel only as a convergence path with firmware used in Windows. Follow-up patches will introduce different abstractions with .ops and different search paths for firmware and topology files.
--- include/sound/sof.h | 9 +++++++++ 1 file changed, 9 insertions(+)
include/sound/sof.h +9 -0
@@ -47,6 +47,13 @@ enum sof_dsp_power_states { SOF_DSP_PM_D3, }; +/* Definitions for multiple IPCs */ +enum sof_ipc_type { +SOF_IPC , +SOF_INTEL_IPC4 , +SOF_IPC_TYPE_COUNT +}; +/* * SOF Platform data. */
@@ -83,6 +90,8 @@ struct snd_sof_pdata {const struct snd_soc_acpi_mach *machine;void *hw_pdata; + +enum sof_ipc_type ipc_type; };/*
Signature · 1 line
2.30.2
PATCH 2/16 ASoC: SOF: add path indirection to each IPC type
In reply to Pierre-Louis BossartWith the addition of the IPCv4, we need the ability to select different paths for firmware and topologies.
First add an indirection. Follow-up patches will add mechanisms to select a default IPC or override it.
No functionality change in this patch.
--- include/sound/sof.h | 4 +-- sound/soc/sof/amd/pci-rn.c | 8 ++++-- sound/soc/sof/imx/imx8.c | 16 ++++++++--- sound/soc/sof/imx/imx8m.c | 8 ++++-- sound/soc/sof/intel/bdw.c | 8 ++++-- sound/soc/sof/intel/byt.c | 24 ++++++++++++---- sound/soc/sof/intel/pci-apl.c | 16 ++++++++--- sound/soc/sof/intel/pci-cnl.c | 24 ++++++++++++---- sound/soc/sof/intel/pci-icl.c | 16 ++++++++--- sound/soc/sof/intel/pci-tgl.c | 40 +++++++++++++++++++------- sound/soc/sof/intel/pci-tng.c | 8 ++++-- sound/soc/sof/mediatek/mt8195/mt8195.c | 8 ++++-- sound/soc/sof/sof-acpi-dev.c | 4 +-- sound/soc/sof/sof-of-dev.c | 4 +-- sound/soc/sof/sof-pci-dev.c | 6 ++-- 15 files changed, 141 insertions(+), 53 deletions(-)
include/sound/sof.h +2 -2
@@ -125,8 +125,8 @@ struct sof_dev_desc {const char *nocodec_tplg_filename;/* defaults paths for firmware and topology files */ -const char *default_fw_path; -const char *default_tplg_path; +const char *default_fw_path[SOF_IPC_TYPE_COUNT ]; +const char *default_tplg_path[SOF_IPC_TYPE_COUNT ];/* default firmware name */ const char *default_fw_filename;
sound/soc/sof/amd/pci-rn.c +6 -2
@@ -54,8 +54,12 @@ static const struct sof_dev_desc renoir_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &renoir_chip_info, - .default_fw_path = "amd/sof", - .default_tplg_path = "amd/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "amd/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "amd/sof-tplg", + }, .default_fw_filename = "sof-rn.ri", .nocodec_tplg_filename = "sof-acp.tplg", .ops = &sof_renoir_ops,
sound/soc/sof/imx/imx8.c +12 -4
@@ -613,16 +613,24 @@ static const struct snd_sof_dsp_ops sof_imx8x_ops = { };static struct sof_dev_desc sof_of_imx8qxp_desc = { - .default_fw_path ="imx/sof" , - .default_tplg_path ="imx/sof-tplg" , + .default_fw_path = { + [SOF_IPC ] ="imx/sof" , + }, + .default_tplg_path = { + [SOF_IPC ] ="imx/sof-tplg" , + }, .default_fw_filename ="sof-imx8x.ri" , .nocodec_tplg_filename ="sof-imx8-nocodec.tplg" , .ops = &sof_imx8x_ops, };static struct sof_dev_desc sof_of_imx8qm_desc = { - .default_fw_path ="imx/sof" , - .default_tplg_path ="imx/sof-tplg" , + .default_fw_path = { + [SOF_IPC ] ="imx/sof" , + }, + .default_tplg_path = { + [SOF_IPC ] ="imx/sof-tplg" , + }, .default_fw_filename ="sof-imx8.ri" , .nocodec_tplg_filename ="sof-imx8-nocodec.tplg" , .ops = &sof_imx8_ops,
sound/soc/sof/imx/imx8m.c +6 -2
@@ -473,8 +473,12 @@ static const struct snd_sof_dsp_ops sof_imx8m_ops = { };static struct sof_dev_desc sof_of_imx8mp_desc = { - .default_fw_path ="imx/sof" , - .default_tplg_path ="imx/sof-tplg" , + .default_fw_path = { + [SOF_IPC ] ="imx/sof" , + }, + .default_tplg_path = { + [SOF_IPC ] ="imx/sof-tplg" , + }, .default_fw_filename ="sof-imx8m.ri" , .nocodec_tplg_filename ="sof-imx8-nocodec.tplg" , .ops = &sof_imx8m_ops,
sound/soc/sof/intel/bdw.c +6 -2
@@ -646,8 +646,12 @@ static const struct sof_dev_desc sof_acpi_broadwell_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = 0, .chip_info = &bdw_chip_info, - .default_fw_path = "intel/sof", - .default_tplg_path = "intel/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "intel/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "intel/sof-tplg", + }, .default_fw_filename = "sof-bdw.ri", .nocodec_tplg_filename = "sof-bdw-nocodec.tplg", .ops = &sof_bdw_ops,
sound/soc/sof/intel/byt.c +18 -6
@@ -388,8 +388,12 @@ static const struct sof_dev_desc sof_acpi_baytrailcr_desc = { .resindex_imr_base = 2, .irqindex_host_ipc = 0, .chip_info = &byt_chip_info, - .default_fw_path = "intel/sof", - .default_tplg_path = "intel/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "intel/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "intel/sof-tplg", + }, .default_fw_filename = "sof-byt.ri", .nocodec_tplg_filename = "sof-byt-nocodec.tplg", .ops = &sof_byt_ops,
@@ -402,8 +406,12 @@ static const struct sof_dev_desc sof_acpi_baytrail_desc = { .resindex_imr_base = 2, .irqindex_host_ipc = 5, .chip_info = &byt_chip_info, - .default_fw_path = "intel/sof", - .default_tplg_path = "intel/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "intel/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "intel/sof-tplg", + }, .default_fw_filename = "sof-byt.ri", .nocodec_tplg_filename = "sof-byt-nocodec.tplg", .ops = &sof_byt_ops,
@@ -416,8 +424,12 @@ static const struct sof_dev_desc sof_acpi_cherrytrail_desc = { .resindex_imr_base = 2, .irqindex_host_ipc = 5, .chip_info = &cht_chip_info, - .default_fw_path = "intel/sof", - .default_tplg_path = "intel/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "intel/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "intel/sof-tplg", + }, .default_fw_filename = "sof-cht.ri", .nocodec_tplg_filename = "sof-cht-nocodec.tplg", .ops = &sof_cht_ops,
sound/soc/sof/intel/pci-apl.c +12 -4
@@ -27,8 +27,12 @@ static const struct sof_dev_desc bxt_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &apl_chip_info, - .default_fw_path = "intel/sof", - .default_tplg_path = "intel/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "intel/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "intel/sof-tplg", + }, .default_fw_filename = "sof-apl.ri", .nocodec_tplg_filename = "sof-apl-nocodec.tplg", .ops = &sof_apl_ops,
@@ -42,8 +46,12 @@ static const struct sof_dev_desc glk_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &apl_chip_info, - .default_fw_path = "intel/sof", - .default_tplg_path = "intel/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "intel/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "intel/sof-tplg", + }, .default_fw_filename = "sof-glk.ri", .nocodec_tplg_filename = "sof-glk-nocodec.tplg", .ops = &sof_apl_ops,
sound/soc/sof/intel/pci-cnl.c +18 -6
@@ -28,8 +28,12 @@ static const struct sof_dev_desc cnl_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &cnl_chip_info, - .default_fw_path = "intel/sof", - .default_tplg_path = "intel/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "intel/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "intel/sof-tplg", + }, .default_fw_filename = "sof-cnl.ri", .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", .ops = &sof_cnl_ops,
@@ -44,8 +48,12 @@ static const struct sof_dev_desc cfl_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &cnl_chip_info, - .default_fw_path = "intel/sof", - .default_tplg_path = "intel/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "intel/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "intel/sof-tplg", + }, .default_fw_filename = "sof-cfl.ri", .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", .ops = &sof_cnl_ops,
@@ -60,8 +68,12 @@ static const struct sof_dev_desc cml_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &cnl_chip_info, - .default_fw_path = "intel/sof", - .default_tplg_path = "intel/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "intel/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "intel/sof-tplg", + }, .default_fw_filename = "sof-cml.ri", .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", .ops = &sof_cnl_ops,
sound/soc/sof/intel/pci-icl.c +12 -4
@@ -28,8 +28,12 @@ static const struct sof_dev_desc icl_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &icl_chip_info, - .default_fw_path = "intel/sof", - .default_tplg_path = "intel/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "intel/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "intel/sof-tplg", + }, .default_fw_filename = "sof-icl.ri", .nocodec_tplg_filename = "sof-icl-nocodec.tplg", .ops = &sof_icl_ops,
@@ -43,8 +47,12 @@ static const struct sof_dev_desc jsl_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &jsl_chip_info, - .default_fw_path = "intel/sof", - .default_tplg_path = "intel/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "intel/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "intel/sof-tplg", + }, .default_fw_filename = "sof-jsl.ri", .nocodec_tplg_filename = "sof-jsl-nocodec.tplg", .ops = &sof_cnl_ops,
sound/soc/sof/intel/pci-tgl.c +30 -10
@@ -28,8 +28,12 @@ static const struct sof_dev_desc tgl_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &tgl_chip_info, - .default_fw_path = "intel/sof", - .default_tplg_path = "intel/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "intel/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "intel/sof-tplg", + }, .default_fw_filename = "sof-tgl.ri", .nocodec_tplg_filename = "sof-tgl-nocodec.tplg", .ops = &sof_tgl_ops,
@@ -44,8 +48,12 @@ static const struct sof_dev_desc tglh_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &tglh_chip_info, - .default_fw_path = "intel/sof", - .default_tplg_path = "intel/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "intel/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "intel/sof-tplg", + }, .default_fw_filename = "sof-tgl-h.ri", .nocodec_tplg_filename = "sof-tgl-nocodec.tplg", .ops = &sof_tgl_ops,
@@ -59,8 +67,12 @@ static const struct sof_dev_desc ehl_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &ehl_chip_info, - .default_fw_path = "intel/sof", - .default_tplg_path = "intel/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "intel/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "intel/sof-tplg", + }, .default_fw_filename = "sof-ehl.ri", .nocodec_tplg_filename = "sof-ehl-nocodec.tplg", .ops = &sof_tgl_ops,
@@ -75,8 +87,12 @@ static const struct sof_dev_desc adls_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &adls_chip_info, - .default_fw_path = "intel/sof", - .default_tplg_path = "intel/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "intel/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "intel/sof-tplg", + }, .default_fw_filename = "sof-adl-s.ri", .nocodec_tplg_filename = "sof-adl-nocodec.tplg", .ops = &sof_tgl_ops,
@@ -91,8 +107,12 @@ static const struct sof_dev_desc adl_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &tgl_chip_info, - .default_fw_path = "intel/sof", - .default_tplg_path = "intel/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "intel/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "intel/sof-tplg", + }, .default_fw_filename = "sof-adl.ri", .nocodec_tplg_filename = "sof-adl-nocodec.tplg", .ops = &sof_tgl_ops,
sound/soc/sof/intel/pci-tng.c +6 -2
@@ -215,8 +215,12 @@ static const struct sof_dev_desc tng_desc = { .resindex_imr_base = 0, .irqindex_host_ipc = -1, .chip_info = &tng_chip_info, - .default_fw_path = "intel/sof", - .default_tplg_path = "intel/sof-tplg", + .default_fw_path = { + [SOF_IPC] = "intel/sof", + }, + .default_tplg_path = { + [SOF_IPC] = "intel/sof-tplg", + }, .default_fw_filename = "sof-byt.ri", .nocodec_tplg_filename = "sof-byt.tplg", .ops = &sof_tng_ops,
sound/soc/sof/mediatek/mt8195/mt8195.c +6 -2
@@ -440,8 +440,12 @@ static const struct snd_sof_dsp_ops sof_mt8195_ops = { };static const struct sof_dev_desc sof_of_mt8195_desc = { - .default_fw_path ="mediatek/sof" , - .default_tplg_path ="mediatek/sof-tplg" , + .default_fw_path = { + [SOF_IPC ] ="mediatek/sof" , + }, + .default_tplg_path = { + [SOF_IPC ] ="mediatek/sof-tplg" , + }, .default_fw_filename ="sof-mt8195.ri" , .nocodec_tplg_filename ="sof-mt8195-nocodec.tplg" , .ops = &sof_mt8195_ops,
sound/soc/sof/sof-acpi-dev.c +2 -2
@@ -81,13 +81,13 @@ int sof_acpi_probe(struct platform_device *pdev, const struct sof_dev_desc *desc sof_pdata->fw_filename_prefix = fw_path; else sof_pdata->fw_filename_prefix = - sof_pdata->desc->default_fw_path; + sof_pdata->desc->default_fw_path[SOF_IPC ];if (tplg_path) sof_pdata->tplg_filename_prefix = tplg_path;else sof_pdata->tplg_filename_prefix = - sof_pdata->desc->default_tplg_path; + sof_pdata->desc->default_tplg_path[SOF_IPC ];/* set callback to be called on successful device probe to enable runtime_pm */ sof_pdata->sof_probe_complete = sof_acpi_probe_complete;
sound/soc/sof/sof-of-dev.c +2 -2
@@ -69,12 +69,12 @@ int sof_of_probe(struct platform_device *pdev)if (fw_path) sof_pdata->fw_filename_prefix = fw_path;else - sof_pdata->fw_filename_prefix = sof_pdata->desc->default_fw_path; + sof_pdata->fw_filename_prefix = sof_pdata->desc->default_fw_path[SOF_IPC ];if (tplg_path) sof_pdata->tplg_filename_prefix = tplg_path;else - sof_pdata->tplg_filename_prefix = sof_pdata->desc->default_tplg_path; + sof_pdata->tplg_filename_prefix = sof_pdata->desc->default_tplg_path[SOF_IPC ];/* set callback to be called on successful device probe to enable runtime_pm */ sof_pdata->sof_probe_complete = sof_of_probe_complete;
sound/soc/sof/sof-pci-dev.c +3 -3
@@ -193,7 +193,7 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) }else if (dmi_check_system (community_key_platforms)) { sof_pdata->fw_filename_prefix =devm_kasprintf (dev,GFP_KERNEL ,"%s/%s" , - sof_pdata->desc->default_fw_path, + sof_pdata->desc->default_fw_path[SOF_IPC ],"community" ); dev_dbg(dev,
@@ -201,14 +201,14 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) sof_pdata->fw_filename_prefix); }else { sof_pdata->fw_filename_prefix = - sof_pdata->desc->default_fw_path; + sof_pdata->desc->default_fw_path[SOF_IPC ]; }if (tplg_path) sof_pdata->tplg_filename_prefix = tplg_path;else sof_pdata->tplg_filename_prefix = - sof_pdata->desc->default_tplg_path; + sof_pdata->desc->default_tplg_path[SOF_IPC ];dmi_check_system (sof_tplg_table);if (sof_override_tplg_name)
Signature · 1 line
2.30.2
PATCH 3/16 ASoC: SOF: add default IPC capability and file paths
In reply to Pierre-Louis BossartThis patch adds a default IPC type for each platform, along with file paths to be used for each IPC type. To make reviews simpler, we only modify platform descriptors in this table, the information will be used in the next patch.
The Intel IPCv4 is only supported on Intel platforms after APL, and not by default. In follow-up patches, support for SKL and KBL will be added, and in those two cases the IPCv4 will be the default (and only supported mode).
--- include/sound/sof.h | 4 ++++ sound/soc/sof/amd/pci-rn.c | 2 ++ sound/soc/sof/imx/imx8.c | 4 ++++ sound/soc/sof/imx/imx8m.c | 2 ++ sound/soc/sof/intel/bdw.c | 2 ++ sound/soc/sof/intel/byt.c | 6 ++++++ sound/soc/sof/intel/pci-apl.c | 8 ++++++++ sound/soc/sof/intel/pci-cnl.c | 12 ++++++++++++ sound/soc/sof/intel/pci-icl.c | 8 ++++++++ sound/soc/sof/intel/pci-tgl.c | 20 ++++++++++++++++++++ sound/soc/sof/intel/pci-tng.c | 2 ++ sound/soc/sof/mediatek/mt8195/mt8195.c | 2 ++ 12 files changed, 72 insertions(+)
include/sound/sof.h +4 -0
@@ -124,6 +124,10 @@ struct sof_dev_desc {/* defaults for no codec mode */ const char *nocodec_tplg_filename; +/* information on supported IPCs */ +unsigned int ipc_supported_mask; +enum sof_ipc_type ipc_default; +/* defaults paths for firmware and topology files */ const char *default_fw_path[SOF_IPC_TYPE_COUNT ];const char *default_tplg_path[SOF_IPC_TYPE_COUNT ];
sound/soc/sof/amd/pci-rn.c +2 -0
@@ -54,6 +54,8 @@ static const struct sof_dev_desc renoir_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &renoir_chip_info, + .ipc_supported_mask = BIT(SOF_IPC), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "amd/sof", },
sound/soc/sof/imx/imx8.c +4 -0
@@ -613,6 +613,8 @@ static const struct snd_sof_dsp_ops sof_imx8x_ops = { };static struct sof_dev_desc sof_of_imx8qxp_desc = { + .ipc_supported_mask =BIT (SOF_IPC ), + .ipc_default =SOF_IPC , .default_fw_path = { [SOF_IPC ] ="imx/sof" , },
@@ -625,6 +627,8 @@ static struct sof_dev_desc sof_of_imx8qxp_desc = { };static struct sof_dev_desc sof_of_imx8qm_desc = { + .ipc_supported_mask =BIT (SOF_IPC ), + .ipc_default =SOF_IPC , .default_fw_path = { [SOF_IPC ] ="imx/sof" , },
sound/soc/sof/imx/imx8m.c +2 -0
@@ -473,6 +473,8 @@ static const struct snd_sof_dsp_ops sof_imx8m_ops = { };static struct sof_dev_desc sof_of_imx8mp_desc = { + .ipc_supported_mask =BIT (SOF_IPC ), + .ipc_default =SOF_IPC , .default_fw_path = { [SOF_IPC ] ="imx/sof" , },
sound/soc/sof/intel/bdw.c +2 -0
@@ -646,6 +646,8 @@ static const struct sof_dev_desc sof_acpi_broadwell_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = 0, .chip_info = &bdw_chip_info, + .ipc_supported_mask = BIT(SOF_IPC), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "intel/sof", },
sound/soc/sof/intel/byt.c +6 -0
@@ -388,6 +388,8 @@ static const struct sof_dev_desc sof_acpi_baytrailcr_desc = { .resindex_imr_base = 2, .irqindex_host_ipc = 0, .chip_info = &byt_chip_info, + .ipc_supported_mask = BIT(SOF_IPC), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "intel/sof", },
@@ -406,6 +408,8 @@ static const struct sof_dev_desc sof_acpi_baytrail_desc = { .resindex_imr_base = 2, .irqindex_host_ipc = 5, .chip_info = &byt_chip_info, + .ipc_supported_mask = BIT(SOF_IPC), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "intel/sof", },
@@ -424,6 +428,8 @@ static const struct sof_dev_desc sof_acpi_cherrytrail_desc = { .resindex_imr_base = 2, .irqindex_host_ipc = 5, .chip_info = &cht_chip_info, + .ipc_supported_mask = BIT(SOF_IPC), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "intel/sof", },
sound/soc/sof/intel/pci-apl.c +8 -0
@@ -27,11 +27,15 @@ static const struct sof_dev_desc bxt_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &apl_chip_info, + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "intel/sof", + [SOF_INTEL_IPC4] = "intel/avs/apl", }, .default_tplg_path = { [SOF_IPC] = "intel/sof-tplg", + [SOF_INTEL_IPC4] = "intel/avs-tplg", }, .default_fw_filename = "sof-apl.ri", .nocodec_tplg_filename = "sof-apl-nocodec.tplg",
@@ -46,11 +50,15 @@ static const struct sof_dev_desc glk_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &apl_chip_info, + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "intel/sof", + [SOF_INTEL_IPC4] = "intel/avs/glk", }, .default_tplg_path = { [SOF_IPC] = "intel/sof-tplg", + [SOF_INTEL_IPC4] = "intel/avs-tplg", }, .default_fw_filename = "sof-glk.ri", .nocodec_tplg_filename = "sof-glk-nocodec.tplg",
sound/soc/sof/intel/pci-cnl.c +12 -0
@@ -28,11 +28,15 @@ static const struct sof_dev_desc cnl_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &cnl_chip_info, + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "intel/sof", + [SOF_INTEL_IPC4] = "intel/avs/cnl", }, .default_tplg_path = { [SOF_IPC] = "intel/sof-tplg", + [SOF_INTEL_IPC4] = "intel/avs-tplg", }, .default_fw_filename = "sof-cnl.ri", .nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
@@ -48,11 +52,15 @@ static const struct sof_dev_desc cfl_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &cnl_chip_info, + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "intel/sof", + [SOF_INTEL_IPC4] = "intel/avs/cnl", }, .default_tplg_path = { [SOF_IPC] = "intel/sof-tplg", + [SOF_INTEL_IPC4] = "intel/avs-tplg", }, .default_fw_filename = "sof-cfl.ri", .nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
@@ -68,11 +76,15 @@ static const struct sof_dev_desc cml_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &cnl_chip_info, + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "intel/sof", + [SOF_INTEL_IPC4] = "intel/avs/cnl", }, .default_tplg_path = { [SOF_IPC] = "intel/sof-tplg", + [SOF_INTEL_IPC4] = "intel/avs-tplg", }, .default_fw_filename = "sof-cml.ri", .nocodec_tplg_filename = "sof-cnl-nocodec.tplg",
sound/soc/sof/intel/pci-icl.c +8 -0
@@ -28,11 +28,15 @@ static const struct sof_dev_desc icl_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &icl_chip_info, + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "intel/sof", + [SOF_INTEL_IPC4] = "intel/avs/icl", }, .default_tplg_path = { [SOF_IPC] = "intel/sof-tplg", + [SOF_INTEL_IPC4] = "intel/avs-tplg", }, .default_fw_filename = "sof-icl.ri", .nocodec_tplg_filename = "sof-icl-nocodec.tplg",
@@ -47,11 +51,15 @@ static const struct sof_dev_desc jsl_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &jsl_chip_info, + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "intel/sof", + [SOF_INTEL_IPC4] = "intel/avs/jsl", }, .default_tplg_path = { [SOF_IPC] = "intel/sof-tplg", + [SOF_INTEL_IPC4] = "intel/avs-tplg", }, .default_fw_filename = "sof-jsl.ri", .nocodec_tplg_filename = "sof-jsl-nocodec.tplg",
sound/soc/sof/intel/pci-tgl.c +20 -0
@@ -28,11 +28,15 @@ static const struct sof_dev_desc tgl_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &tgl_chip_info, + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "intel/sof", + [SOF_INTEL_IPC4] = "intel/avs/tgl", }, .default_tplg_path = { [SOF_IPC] = "intel/sof-tplg", + [SOF_INTEL_IPC4] = "intel/avs-tplg", }, .default_fw_filename = "sof-tgl.ri", .nocodec_tplg_filename = "sof-tgl-nocodec.tplg",
@@ -48,11 +52,15 @@ static const struct sof_dev_desc tglh_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &tglh_chip_info, + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "intel/sof", + [SOF_INTEL_IPC4] = "intel/avs/tgl-h", }, .default_tplg_path = { [SOF_IPC] = "intel/sof-tplg", + [SOF_INTEL_IPC4] = "intel/avs-tplg", }, .default_fw_filename = "sof-tgl-h.ri", .nocodec_tplg_filename = "sof-tgl-nocodec.tplg",
@@ -67,11 +75,15 @@ static const struct sof_dev_desc ehl_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &ehl_chip_info, + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "intel/sof", + [SOF_INTEL_IPC4] = "intel/avs/ehl", }, .default_tplg_path = { [SOF_IPC] = "intel/sof-tplg", + [SOF_INTEL_IPC4] = "intel/avs-tplg", }, .default_fw_filename = "sof-ehl.ri", .nocodec_tplg_filename = "sof-ehl-nocodec.tplg",
@@ -87,11 +99,15 @@ static const struct sof_dev_desc adls_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &adls_chip_info, + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "intel/sof", + [SOF_INTEL_IPC4] = "intel/avs/adl-s", }, .default_tplg_path = { [SOF_IPC] = "intel/sof-tplg", + [SOF_INTEL_IPC4] = "intel/avs-tplg", }, .default_fw_filename = "sof-adl-s.ri", .nocodec_tplg_filename = "sof-adl-nocodec.tplg",
@@ -107,11 +123,15 @@ static const struct sof_dev_desc adl_desc = { .resindex_imr_base = -1, .irqindex_host_ipc = -1, .chip_info = &tgl_chip_info, + .ipc_supported_mask = BIT(SOF_IPC) | BIT(SOF_INTEL_IPC4), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "intel/sof", + [SOF_INTEL_IPC4] = "intel/avs/adl", }, .default_tplg_path = { [SOF_IPC] = "intel/sof-tplg", + [SOF_INTEL_IPC4] = "intel/avs-tplg", }, .default_fw_filename = "sof-adl.ri", .nocodec_tplg_filename = "sof-adl-nocodec.tplg",
sound/soc/sof/intel/pci-tng.c +2 -0
@@ -215,6 +215,8 @@ static const struct sof_dev_desc tng_desc = { .resindex_imr_base = 0, .irqindex_host_ipc = -1, .chip_info = &tng_chip_info, + .ipc_supported_mask = BIT(SOF_IPC), + .ipc_default = SOF_IPC, .default_fw_path = { [SOF_IPC] = "intel/sof", },
sound/soc/sof/mediatek/mt8195/mt8195.c +2 -0
@@ -440,6 +440,8 @@ static const struct snd_sof_dsp_ops sof_mt8195_ops = { };static const struct sof_dev_desc sof_of_mt8195_desc = { + .ipc_supported_mask =BIT (SOF_IPC ), + .ipc_default =SOF_IPC , .default_fw_path = { [SOF_IPC ] ="mediatek/sof" , },
Signature · 1 line
2.30.2
PATCH 4/16 ASoC: SOF: add IPC-dependent file names
In reply to Pierre-Louis BossartTo avoid misleading file names, use different names for INTEL_IPC4 firmware files.
--- include/sound/sof.h | 2 +- sound/soc/sof/amd/pci-rn.c | 4 +++- sound/soc/sof/imx/imx8.c | 8 ++++++-- sound/soc/sof/imx/imx8m.c | 4 +++- sound/soc/sof/intel/bdw.c | 4 +++- sound/soc/sof/intel/byt.c | 12 +++++++++--- sound/soc/sof/intel/hda.c | 2 +- sound/soc/sof/intel/pci-apl.c | 10 ++++++++-- sound/soc/sof/intel/pci-cnl.c | 15 ++++++++++++--- sound/soc/sof/intel/pci-icl.c | 10 ++++++++-- sound/soc/sof/intel/pci-tgl.c | 25 ++++++++++++++++++++----- sound/soc/sof/intel/pci-tng.c | 4 +++- sound/soc/sof/mediatek/mt8195/mt8195.c | 4 +++- sound/soc/sof/sof-acpi-dev.c | 2 +- sound/soc/sof/sof-of-dev.c | 2 +- sound/soc/sof/sof-pci-dev.c | 10 ++++++---- 16 files changed, 88 insertions(+), 30 deletions(-)
include/sound/sof.h +1 -1
@@ -133,7 +133,7 @@ struct sof_dev_desc {const char *default_tplg_path[SOF_IPC_TYPE_COUNT ];/* default firmware name */ -const char *default_fw_filename; +const char *default_fw_filename[SOF_IPC_TYPE_COUNT ];const struct snd_sof_dsp_ops *ops; };
sound/soc/sof/amd/pci-rn.c +3 -1
@@ -62,7 +62,9 @@ static const struct sof_dev_desc renoir_desc = { .default_tplg_path = { [SOF_IPC] = "amd/sof-tplg", }, - .default_fw_filename = "sof-rn.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-rn.ri", + }, .nocodec_tplg_filename = "sof-acp.tplg", .ops = &sof_renoir_ops, };
sound/soc/sof/imx/imx8.c +6 -2
@@ -621,7 +621,9 @@ static struct sof_dev_desc sof_of_imx8qxp_desc = { .default_tplg_path = { [SOF_IPC] = "imx/sof-tplg", }, - .default_fw_filename = "sof-imx8x.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-imx8x.ri", + }, .nocodec_tplg_filename = "sof-imx8-nocodec.tplg", .ops = &sof_imx8x_ops, };
@@ -635,7 +637,9 @@ static struct sof_dev_desc sof_of_imx8qm_desc = { .default_tplg_path = { [SOF_IPC] = "imx/sof-tplg", }, - .default_fw_filename = "sof-imx8.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-imx8.ri", + }, .nocodec_tplg_filename = "sof-imx8-nocodec.tplg", .ops = &sof_imx8_ops, };
sound/soc/sof/imx/imx8m.c +3 -1
@@ -481,7 +481,9 @@ static struct sof_dev_desc sof_of_imx8mp_desc = { .default_tplg_path = { [SOF_IPC] = "imx/sof-tplg", }, - .default_fw_filename = "sof-imx8m.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-imx8m.ri", + }, .nocodec_tplg_filename = "sof-imx8-nocodec.tplg", .ops = &sof_imx8m_ops, };
sound/soc/sof/intel/bdw.c +3 -1
@@ -654,7 +654,9 @@ static const struct sof_dev_desc sof_acpi_broadwell_desc = { .default_tplg_path = { [SOF_IPC] = "intel/sof-tplg", }, - .default_fw_filename = "sof-bdw.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-bdw.ri", + }, .nocodec_tplg_filename = "sof-bdw-nocodec.tplg", .ops = &sof_bdw_ops, };
sound/soc/sof/intel/byt.c +9 -3
@@ -396,7 +396,9 @@ static const struct sof_dev_desc sof_acpi_baytrailcr_desc = { .default_tplg_path = { [SOF_IPC] = "intel/sof-tplg", }, - .default_fw_filename = "sof-byt.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-byt.ri", + }, .nocodec_tplg_filename = "sof-byt-nocodec.tplg", .ops = &sof_byt_ops, };
@@ -416,7 +418,9 @@ static const struct sof_dev_desc sof_acpi_baytrail_desc = { .default_tplg_path = { [SOF_IPC] = "intel/sof-tplg", }, - .default_fw_filename = "sof-byt.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-byt.ri", + }, .nocodec_tplg_filename = "sof-byt-nocodec.tplg", .ops = &sof_byt_ops, };
@@ -436,7 +440,9 @@ static const struct sof_dev_desc sof_acpi_cherrytrail_desc = { .default_tplg_path = { [SOF_IPC] = "intel/sof-tplg", }, - .default_fw_filename = "sof-cht.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-cht.ri", + }, .nocodec_tplg_filename = "sof-cht-nocodec.tplg", .ops = &sof_cht_ops, };
sound/soc/sof/intel/hda.c +1 -1
@@ -1274,7 +1274,7 @@ static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev mach->mach_params.links = mach->links; mach->mach_params.link_mask = mach->link_mask; mach->mach_params.platform =dev_name (sdev->dev); - pdata->fw_filename = pdata->desc->default_fw_filename; + pdata->fw_filename = pdata->desc->default_fw_filename[pdata->ipc_type]; pdata->tplg_filename = mach->sof_tplg_filename;/*
sound/soc/sof/intel/pci-apl.c +8 -2
@@ -37,7 +37,10 @@ static const struct sof_dev_desc bxt_desc = { [SOF_IPC] = "intel/sof-tplg", [SOF_INTEL_IPC4] = "intel/avs-tplg", }, - .default_fw_filename = "sof-apl.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-apl.ri", + [SOF_INTEL_IPC4] = "dsp_basefw.bin", + }, .nocodec_tplg_filename = "sof-apl-nocodec.tplg", .ops = &sof_apl_ops, };
@@ -60,7 +63,10 @@ static const struct sof_dev_desc glk_desc = { [SOF_IPC] = "intel/sof-tplg", [SOF_INTEL_IPC4] = "intel/avs-tplg", }, - .default_fw_filename = "sof-glk.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-glk.ri", + [SOF_INTEL_IPC4] = "dsp_basefw.bin", + }, .nocodec_tplg_filename = "sof-glk-nocodec.tplg", .ops = &sof_apl_ops, };
sound/soc/sof/intel/pci-cnl.c +12 -3
@@ -38,7 +38,10 @@ static const struct sof_dev_desc cnl_desc = { [SOF_IPC] = "intel/sof-tplg", [SOF_INTEL_IPC4] = "intel/avs-tplg", }, - .default_fw_filename = "sof-cnl.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-cnl.ri", + [SOF_INTEL_IPC4] = "dsp_basefw.bin", + }, .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", .ops = &sof_cnl_ops, };
@@ -62,7 +65,10 @@ static const struct sof_dev_desc cfl_desc = { [SOF_IPC] = "intel/sof-tplg", [SOF_INTEL_IPC4] = "intel/avs-tplg", }, - .default_fw_filename = "sof-cfl.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-cfl.ri", + [SOF_INTEL_IPC4] = "dsp_basefw.bin", + }, .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", .ops = &sof_cnl_ops, };
@@ -86,7 +92,10 @@ static const struct sof_dev_desc cml_desc = { [SOF_IPC] = "intel/sof-tplg", [SOF_INTEL_IPC4] = "intel/avs-tplg", }, - .default_fw_filename = "sof-cml.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-cml.ri", + [SOF_INTEL_IPC4] = "dsp_basefw.bin", + }, .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", .ops = &sof_cnl_ops, };
sound/soc/sof/intel/pci-icl.c +8 -2
@@ -38,7 +38,10 @@ static const struct sof_dev_desc icl_desc = { [SOF_IPC] = "intel/sof-tplg", [SOF_INTEL_IPC4] = "intel/avs-tplg", }, - .default_fw_filename = "sof-icl.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-icl.ri", + [SOF_INTEL_IPC4] = "dsp_basefw.bin", + }, .nocodec_tplg_filename = "sof-icl-nocodec.tplg", .ops = &sof_icl_ops, };
@@ -61,7 +64,10 @@ static const struct sof_dev_desc jsl_desc = { [SOF_IPC] = "intel/sof-tplg", [SOF_INTEL_IPC4] = "intel/avs-tplg", }, - .default_fw_filename = "sof-jsl.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-jsl.ri", + [SOF_INTEL_IPC4] = "dsp_basefw.bin", + }, .nocodec_tplg_filename = "sof-jsl-nocodec.tplg", .ops = &sof_cnl_ops, };
sound/soc/sof/intel/pci-tgl.c +20 -5
@@ -38,7 +38,10 @@ static const struct sof_dev_desc tgl_desc = { [SOF_IPC] = "intel/sof-tplg", [SOF_INTEL_IPC4] = "intel/avs-tplg", }, - .default_fw_filename = "sof-tgl.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-tgl.ri", + [SOF_INTEL_IPC4] = "dsp_basefw.bin", + }, .nocodec_tplg_filename = "sof-tgl-nocodec.tplg", .ops = &sof_tgl_ops, };
@@ -62,7 +65,10 @@ static const struct sof_dev_desc tglh_desc = { [SOF_IPC] = "intel/sof-tplg", [SOF_INTEL_IPC4] = "intel/avs-tplg", }, - .default_fw_filename = "sof-tgl-h.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-tgl-h.ri", + [SOF_INTEL_IPC4] = "dsp_basefw.bin", + }, .nocodec_tplg_filename = "sof-tgl-nocodec.tplg", .ops = &sof_tgl_ops, };
@@ -85,7 +91,10 @@ static const struct sof_dev_desc ehl_desc = { [SOF_IPC] = "intel/sof-tplg", [SOF_INTEL_IPC4] = "intel/avs-tplg", }, - .default_fw_filename = "sof-ehl.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-ehl.ri", + [SOF_INTEL_IPC4] = "dsp_basefw.bin", + }, .nocodec_tplg_filename = "sof-ehl-nocodec.tplg", .ops = &sof_tgl_ops, };
@@ -109,7 +118,10 @@ static const struct sof_dev_desc adls_desc = { [SOF_IPC] = "intel/sof-tplg", [SOF_INTEL_IPC4] = "intel/avs-tplg", }, - .default_fw_filename = "sof-adl-s.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-adl-s.ri", + [SOF_INTEL_IPC4] = "dsp_basefw.bin", + }, .nocodec_tplg_filename = "sof-adl-nocodec.tplg", .ops = &sof_tgl_ops, };
@@ -133,7 +145,10 @@ static const struct sof_dev_desc adl_desc = { [SOF_IPC] = "intel/sof-tplg", [SOF_INTEL_IPC4] = "intel/avs-tplg", }, - .default_fw_filename = "sof-adl.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-adl.ri", + [SOF_INTEL_IPC4] = "dsp_basefw.bin", + }, .nocodec_tplg_filename = "sof-adl-nocodec.tplg", .ops = &sof_tgl_ops, };
sound/soc/sof/intel/pci-tng.c +3 -1
@@ -223,7 +223,9 @@ static const struct sof_dev_desc tng_desc = { .default_tplg_path = { [SOF_IPC] = "intel/sof-tplg", }, - .default_fw_filename = "sof-byt.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-byt.ri", + }, .nocodec_tplg_filename = "sof-byt.tplg", .ops = &sof_tng_ops, };
sound/soc/sof/mediatek/mt8195/mt8195.c +3 -1
@@ -448,7 +448,9 @@ static const struct sof_dev_desc sof_of_mt8195_desc = { .default_tplg_path = { [SOF_IPC] = "mediatek/sof-tplg", }, - .default_fw_filename = "sof-mt8195.ri", + .default_fw_filename = { + [SOF_IPC] = "sof-mt8195.ri", + }, .nocodec_tplg_filename = "sof-mt8195-nocodec.tplg", .ops = &sof_mt8195_ops, };
sound/soc/sof/sof-acpi-dev.c +1 -1
@@ -74,7 +74,7 @@ int sof_acpi_probe(struct platform_device *pdev, const struct sof_dev_desc *desc sof_pdata->desc = desc; sof_pdata->dev = &pdev->dev; - sof_pdata->fw_filename = desc->default_fw_filename; + sof_pdata->fw_filename = desc->default_fw_filename[SOF_IPC ];/* alternate fw and tplg filenames ? */ if (fw_path)
sound/soc/sof/sof-of-dev.c +1 -1
@@ -64,7 +64,7 @@ int sof_of_probe(struct platform_device *pdev) sof_pdata->desc = desc; sof_pdata->dev = &pdev->dev; - sof_pdata->fw_filename = desc->default_fw_filename; + sof_pdata->fw_filename = desc->default_fw_filename[SOF_IPC ];if (fw_path) sof_pdata->fw_filename_prefix = fw_path;
sound/soc/sof/sof-pci-dev.c +6 -4
@@ -173,7 +173,9 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) sof_pdata->name =pci_name (pci); sof_pdata->desc = desc; sof_pdata->dev = dev; - sof_pdata->fw_filename = desc->default_fw_filename; + + sof_pdata->ipc_type = desc->ipc_default; + sof_pdata->fw_filename = desc->default_fw_filename[sof_pdata->ipc_type];/* * for platforms using the SOF community key, change the
@@ -193,7 +195,7 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) }else if (dmi_check_system (community_key_platforms)) { sof_pdata->fw_filename_prefix =devm_kasprintf (dev,GFP_KERNEL ,"%s/%s" , - sof_pdata->desc->default_fw_path[SOF_IPC ], + sof_pdata->desc->default_fw_path[sof_pdata->ipc_type],"community" ); dev_dbg(dev,
@@ -201,14 +203,14 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) sof_pdata->fw_filename_prefix); }else { sof_pdata->fw_filename_prefix = - sof_pdata->desc->default_fw_path[SOF_IPC ]; + sof_pdata->desc->default_fw_path[sof_pdata->ipc_type]; }if (tplg_path) sof_pdata->tplg_filename_prefix = tplg_path;else sof_pdata->tplg_filename_prefix = - sof_pdata->desc->default_tplg_path[SOF_IPC ]; + sof_pdata->desc->default_tplg_path[sof_pdata->ipc_type];dmi_check_system (sof_tplg_table);if (sof_override_tplg_name)
Signature · 1 line
2.30.2
PATCH 5/16 ASoC: SOF: sof-pci-dev: add parameter to override firmware filename
In reply to Pierre-Louis BossartThe existing 'fw_path' module parameter can be used to load alternate firmware files, be it for development or to handle OEM-specific or board-specific releases. The firmware name is however non-modifiable and defined by platform-specific descriptors.
For additional flexibility during development or enable quirks, this patch adds the 'fw_filename' module parameter to override default firmware names.
--- sound/soc/sof/sof-pci-dev.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
sound/soc/sof/sof-pci-dev.c +13 -1
@@ -23,6 +23,10 @@ static char *fw_path;module_param (fw_path, charp,0444 );MODULE_PARM_DESC (fw_path,"alternate path for SOF firmware." ); +static char *fw_filename; +module_param (fw_filename, charp,0444 ); +MODULE_PARM_DESC (fw_filename,"alternate filename for SOF firmware." ); +static char *tplg_path;module_param (tplg_path, charp,0444 );MODULE_PARM_DESC (tplg_path,"alternate path for SOF topology." );
@@ -175,7 +179,15 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) sof_pdata->dev = dev; sof_pdata->ipc_type = desc->ipc_default; - sof_pdata->fw_filename = desc->default_fw_filename[sof_pdata->ipc_type]; + +if (fw_filename) { + sof_pdata->fw_filename = fw_filename; + +dev_dbg (dev,"Module parameter used, changed fw filename to %s\n" , + sof_pdata->fw_filename); + }else { + sof_pdata->fw_filename = desc->default_fw_filename[sof_pdata->ipc_type]; + }/* * for platforms using the SOF community key, change the
Signature · 1 line
2.30.2
PATCH 6/16 ASoC: SOF: sof-pci-dev: add parameter to override topology filename
In reply to Pierre-Louis BossartThe existing 'tplg_path' module parameter can be used to load alternate firmware files, be it for development or to handle OEM-specific or board-specific releases. However the topology filename is either hard-coded in machine descriptors or modified by specific DMI-quirks.
For additional flexibility, this patch adds the 'tplg_filename' module parameter to override topology names.
To avoid any confusion between DMI- and parameter-override, a variable rename is added.
--- sound/soc/sof/sof-pci-dev.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-)
sound/soc/sof/sof-pci-dev.c +20 -5
@@ -31,17 +31,21 @@ static char *tplg_path;module_param (tplg_path, charp,0444 );MODULE_PARM_DESC (tplg_path,"alternate path for SOF topology." ); +static char *tplg_filename; +module_param (tplg_filename, charp,0444 ); +MODULE_PARM_DESC (tplg_filename,"alternate filename for SOF topology." ); +static int sof_pci_debug;module_param_named (sof_pci_debug, sof_pci_debug, int,0444 );MODULE_PARM_DESC (sof_pci_debug,"SOF PCI debug options (0x0 all off)" ); -static const char *sof_override_tplg_name; +static const char *sof_dmi_override_tplg_name;#define SOF_PCI_DISABLE_PM_RUNTIME BIT(0)static int sof_tplg_cb (const struct dmi_system_id *id) { - sof_override_tplg_name = id->driver_data; + sof_dmi_override_tplg_name = id->driver_data;return 1 ; }
@@ -224,9 +228,20 @@ int sof_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) sof_pdata->tplg_filename_prefix = sof_pdata->desc->default_tplg_path[sof_pdata->ipc_type]; -dmi_check_system (sof_tplg_table); -if (sof_override_tplg_name) - sof_pdata->tplg_filename = sof_override_tplg_name; +/* +* the topology filename will be provided in the machine descriptor, unless +* it is overridden by a module parameter or DMI quirk. +*/ +if (tplg_filename) { + sof_pdata->tplg_filename = tplg_filename; + +dev_dbg (dev,"Module parameter used, changed tplg filename to %s\n" , + sof_pdata->tplg_filename); + }else { +dmi_check_system (sof_tplg_table); +if (sof_dmi_override_tplg_name) + sof_pdata->tplg_filename = sof_dmi_override_tplg_name; + }/* set callback to be called on successful device probe to enable runtime_pm */ sof_pdata->sof_probe_complete = sof_pci_probe_complete;
Signature · 1 line
2.30.2
PATCH 7/16 ASoC: SOF: sof-audio: preserve topology filename override in nocodec mode
In reply to Pierre-Louis BossartIf the topology filename is modified at a higher level, be it with a DMI quirk or a kernel module parameter, we don't want to use the default 'nocodec' topology name extracted from descriptors.
--- sound/soc/sof/sof-audio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/sof/sof-audio.c +2 -1
@@ -698,7 +698,8 @@ int sof_machine_check(struct snd_sof_dev *sdev)return -ENOMEM ; mach->drv_name ="sof-nocodec" ; - sof_pdata->tplg_filename = desc->nocodec_tplg_filename; +if (!sof_pdata->tplg_filename) + sof_pdata->tplg_filename = desc->nocodec_tplg_filename; sof_pdata->machine = mach;snd_sof_set_mach_params (mach, sdev);
Signature · 1 line
2.30.2
PATCH 8/16 ASoC: SOF: remove const qualifier for 'struct snd_sof_dsp_ops'
In reply to Pierre-Louis BossartNow that we start having multiple platforms with minor variants, the use of the const qualifier for 'dsp_ops' is starting to be
sub-optimal: the structures are copied across platforms, with only a couple of members that differ.
This patch removes the const qualifier without any functionality changes, and adds an optional initialization callback. In follow-up patches, the dsp_ops will revisited for Intel HDaudio platforms, with the differences added programmatically over a common baseline.
--- include/sound/sof.h | 4 +++- sound/soc/sof/amd/acp.h | 2 +- sound/soc/sof/amd/renoir.c | 2 +- sound/soc/sof/core.c | 3 +++ sound/soc/sof/debug.c | 2 +- sound/soc/sof/imx/imx8.c | 4 ++-- sound/soc/sof/imx/imx8m.c | 2 +- sound/soc/sof/intel/apl.c | 2 +- sound/soc/sof/intel/bdw.c | 2 +- sound/soc/sof/intel/byt.c | 4 ++-- sound/soc/sof/intel/cnl.c | 2 +- sound/soc/sof/intel/hda.h | 8 ++++---- sound/soc/sof/intel/icl.c | 2 +- sound/soc/sof/intel/pci-tng.c | 2 +- sound/soc/sof/intel/shim.h | 2 +- sound/soc/sof/intel/tgl.c | 2 +- sound/soc/sof/mediatek/mt8195/mt8195.c | 2 +- sound/soc/sof/ops.h | 6 ++++++ sound/soc/sof/pcm.c | 2 +- 19 files changed, 33 insertions(+), 22 deletions(-)
include/sound/sof.h +3 -1
@@ -16,6 +16,7 @@#include <sound/soc-acpi.h> struct snd_sof_dsp_ops ; +struct snd_sof_dev ;/** * enum sof_fw_state - DSP firmware state definitions
@@ -135,7 +136,8 @@ struct sof_dev_desc {/* default firmware name */ const char *default_fw_filename[SOF_IPC_TYPE_COUNT ]; -const struct snd_sof_dsp_ops *ops; +struct snd_sof_dsp_ops *ops; +int (*ops_init)(struct snd_sof_dev *sdev); };int sof_dai_get_mclk (struct snd_soc_pcm_runtime *rtd);
sound/soc/sof/amd/acp.h +1 -1
@@ -204,7 +204,7 @@ int acp_pcm_hw_params(struct snd_sof_dev *sdev, struct snd_pcm_substream *substrstruct snd_pcm_hw_params *params, struct snd_sof_platform_stream_params *platform_params); -extern const struct snd_sof_dsp_ops sof_renoir_ops; +extern struct snd_sof_dsp_ops sof_renoir_ops;/* Machine configuration */ int snd_amd_acp_find_config (struct pci_dev *pci);
sound/soc/sof/amd/renoir.c +1 -1
@@ -123,7 +123,7 @@ static struct snd_soc_acpi_mach *amd_sof_machine_select(struct snd_sof_dev *sdev }/* AMD Renoir DSP ops */ -const struct snd_sof_dsp_ops sof_renoir_ops = { +struct snd_sof_dsp_ops sof_renoir_ops = {/* probe and remove */ .probe = amd_sof_acp_probe, .remove = amd_sof_acp_remove,
sound/soc/sof/core.c +3 -0
@@ -357,6 +357,9 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data) sdev->first_boot = true;dev_set_drvdata (dev, sdev); +/* init ops, if necessary */ +sof_ops_init (sdev); +/* check all mandatory ops */ if (!sof_ops(sdev) || !sof_ops(sdev)->probe || !sof_ops(sdev)->run || !sof_ops(sdev)->block_read || !sof_ops(sdev)->block_write ||
sound/soc/sof/debug.c +1 -1
@@ -331,7 +331,7 @@ EXPORT_SYMBOL_GPL(snd_sof_dbg_memory_info_init);int snd_sof_dbg_init (struct snd_sof_dev *sdev) { -const struct snd_sof_dsp_ops *ops =sof_ops (sdev); +struct snd_sof_dsp_ops *ops =sof_ops (sdev);const struct snd_sof_debugfs_map *map;int i;int err;
sound/soc/sof/imx/imx8.c +2 -2
@@ -487,7 +487,7 @@ static int imx8_dsp_set_power_state(struct snd_sof_dev *sdev, }/* i.MX8 ops */ -static const struct snd_sof_dsp_ops sof_imx8_ops = { +static struct snd_sof_dsp_ops sof_imx8_ops = {/* probe and remove */ .probe = imx8_probe, .remove = imx8_remove,
@@ -550,7 +550,7 @@ static const struct snd_sof_dsp_ops sof_imx8_ops = { };/* i.MX8X ops */ -static const struct snd_sof_dsp_ops sof_imx8x_ops = { +static struct snd_sof_dsp_ops sof_imx8x_ops = {/* probe and remove */ .probe = imx8_probe, .remove = imx8_remove,
sound/soc/sof/imx/imx8m.c +1 -1
@@ -412,7 +412,7 @@ static int imx8m_dsp_suspend(struct snd_sof_dev *sdev, unsigned int target_state }/* i.MX8 ops */ -static const struct snd_sof_dsp_ops sof_imx8m_ops = { +static struct snd_sof_dsp_ops sof_imx8m_ops = {/* probe and remove */ .probe = imx8m_probe, .remove = imx8m_remove,
sound/soc/sof/intel/apl.c +1 -1
@@ -26,7 +26,7 @@ static const struct snd_sof_debugfs_map apl_dsp_debugfs[] = { };/* apollolake ops */ -const struct snd_sof_dsp_ops sof_apl_ops = { +struct snd_sof_dsp_ops sof_apl_ops = {/* probe/remove/shutdown */ .probe = hda_dsp_probe, .remove = hda_dsp_remove,
sound/soc/sof/intel/bdw.c +1 -1
@@ -567,7 +567,7 @@ static struct snd_soc_dai_driver bdw_dai[] = { };/* broadwell ops */ -static const struct snd_sof_dsp_ops sof_bdw_ops = { +static struct snd_sof_dsp_ops sof_bdw_ops = {/*Device init */ .probe = bdw_probe,
sound/soc/sof/intel/byt.c +2 -2
@@ -216,7 +216,7 @@ static int byt_acpi_probe(struct snd_sof_dev *sdev) }/* baytrail ops */ -static const struct snd_sof_dsp_ops sof_byt_ops = { +static struct snd_sof_dsp_ops sof_byt_ops = {/* device init */ .probe = byt_acpi_probe, .remove = byt_remove,
@@ -298,7 +298,7 @@ static const struct sof_intel_dsp_desc byt_chip_info = { };/* cherrytrail and braswell ops */ -static const struct snd_sof_dsp_ops sof_cht_ops = { +static struct snd_sof_dsp_ops sof_cht_ops = {/* device init */ .probe = byt_acpi_probe, .remove = byt_remove,
sound/soc/sof/intel/cnl.c +1 -1
@@ -244,7 +244,7 @@ void cnl_ipc_dump(struct snd_sof_dev *sdev) }/* cannonlake ops */ -const struct snd_sof_dsp_ops sof_cnl_ops = { +struct snd_sof_dsp_ops sof_cnl_ops = {/* probe/remove/shutdown */ .probe = hda_dsp_probe, .remove = hda_dsp_remove,
sound/soc/sof/intel/hda.h +4 -4
@@ -687,10 +687,10 @@ extern struct snd_soc_dai_driver skl_dai[];/* * Platform Specific HW abstraction Ops. */ -extern const struct snd_sof_dsp_ops sof_apl_ops; -extern const struct snd_sof_dsp_ops sof_cnl_ops; -extern const struct snd_sof_dsp_ops sof_tgl_ops; -extern const struct snd_sof_dsp_ops sof_icl_ops; +extern struct snd_sof_dsp_ops sof_apl_ops; +extern struct snd_sof_dsp_ops sof_cnl_ops; +extern struct snd_sof_dsp_ops sof_tgl_ops; +extern struct snd_sof_dsp_ops sof_icl_ops;extern const struct sof_intel_dsp_desc apl_chip_info;extern const struct sof_intel_dsp_desc cnl_chip_info;
sound/soc/sof/intel/icl.c +1 -1
@@ -88,7 +88,7 @@ static int icl_dsp_post_fw_run(struct snd_sof_dev *sdev) }/* Icelake ops */ -const struct snd_sof_dsp_ops sof_icl_ops = { +struct snd_sof_dsp_ops sof_icl_ops = {/* probe/remove/shutdown */ .probe = hda_dsp_probe, .remove = hda_dsp_remove,
sound/soc/sof/intel/pci-tng.c +1 -1
@@ -132,7 +132,7 @@ static int tangier_pci_probe(struct snd_sof_dev *sdev)return ret; } -const struct snd_sof_dsp_ops sof_tng_ops = { +struct snd_sof_dsp_ops sof_tng_ops = {/* device init */ .probe = tangier_pci_probe,
sound/soc/sof/intel/shim.h +1 -1
@@ -173,7 +173,7 @@ struct sof_intel_dsp_desc {bool (*check_sdw_irq)(struct snd_sof_dev *sdev); }; -extern const struct snd_sof_dsp_ops sof_tng_ops; +extern struct snd_sof_dsp_ops sof_tng_ops;extern const struct sof_intel_dsp_desc tng_chip_info;
sound/soc/sof/intel/tgl.c +1 -1
@@ -59,7 +59,7 @@ static int tgl_dsp_core_put(struct snd_sof_dev *sdev, int core) }/* Tigerlake ops */ -const struct snd_sof_dsp_ops sof_tgl_ops = { +struct snd_sof_dsp_ops sof_tgl_ops = {/* probe/remove/shutdown */ .probe = hda_dsp_probe, .remove = hda_dsp_remove,
sound/soc/sof/mediatek/mt8195/mt8195.c +1 -1
@@ -393,7 +393,7 @@ static struct snd_soc_dai_driver mt8195_dai[] = { };/* mt8195 ops */ -static const struct snd_sof_dsp_ops sof_mt8195_ops = { +static struct snd_sof_dsp_ops sof_mt8195_ops = {/* probe and remove */ .probe = mt8195_dsp_probe, .remove = mt8195_dsp_remove,
sound/soc/sof/ops.h +6 -0
@@ -21,6 +21,12 @@#define sof_ops (sdev) \ ((sdev)->pdata->desc->ops) +static inline void sof_ops_init (struct snd_sof_dev *sdev) +{ +if (sdev->pdata->desc->ops_init) + sdev->pdata->desc->ops_init (sdev); +} +/* Mandatory operations are verified during probing */ /* init */
sound/soc/sof/pcm.c +1 -1
@@ -393,7 +393,7 @@ static int sof_pcm_open(struct snd_soc_component *component,struct snd_soc_pcm_runtime *rtd =asoc_substream_to_rtd (substream);struct snd_pcm_runtime *runtime = substream->runtime;struct snd_sof_dev *sdev =snd_soc_component_get_drvdata (component); -const struct snd_sof_dsp_ops *ops =sof_ops (sdev); +struct snd_sof_dsp_ops *ops =sof_ops (sdev);struct snd_sof_pcm *spcm;struct snd_soc_tplg_stream_caps *caps;int ret;
Signature · 1 line
2.30.2
PATCH 9/16 ASoC: SOF: Intel: hda: use common ops across platforms
In reply to Pierre-Louis BossartThe dsp_ops are mostly common between platforms. Introduce a common structure and an init function to set platform-specific values.
--- sound/soc/sof/core.c | 5 +- sound/soc/sof/intel/Makefile | 2 +- sound/soc/sof/intel/apl.c | 104 +++++--------------------- sound/soc/sof/intel/cnl.c | 106 +++++--------------------- sound/soc/sof/intel/hda-common-ops.c | 107 ++++++++++++++++++++++++++ sound/soc/sof/intel/hda.h | 7 +- sound/soc/sof/intel/icl.c | 108 +++++---------------------- sound/soc/sof/intel/pci-apl.c | 2 + sound/soc/sof/intel/pci-cnl.c | 3 + sound/soc/sof/intel/pci-icl.c | 2 + sound/soc/sof/intel/pci-tgl.c | 6 +- sound/soc/sof/intel/tgl.c | 108 +++++---------------------- sound/soc/sof/ops.h | 6 +- 13 files changed, 211 insertions(+), 355 deletions(-) create mode 100644 sound/soc/sof/intel/hda-common-ops.c
sound/soc/sof/core.c +4 -1
@@ -342,6 +342,7 @@ static void sof_probe_work(struct work_struct *work)int snd_sof_device_probe (struct device *dev,struct snd_sof_pdata *plat_data) {struct snd_sof_dev *sdev; +int ret; sdev =devm_kzalloc (dev,sizeof (*sdev),GFP_KERNEL );if (!sdev)
@@ -358,7 +359,9 @@ int snd_sof_device_probe(struct device *dev, struct snd_sof_pdata *plat_data)dev_set_drvdata (dev, sdev);/* init ops, if necessary */ -sof_ops_init (sdev); + ret =sof_ops_init (sdev); +if (ret <0 ) +return ret;/* check all mandatory ops */ if (!sof_ops(sdev) || !sof_ops(sdev)->probe || !sof_ops(sdev)->run ||
sound/soc/sof/intel/Makefile +1 -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 + apl.o cnl.o tgl.o icl.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
sound/soc/sof/intel/apl.c +18 -86
126 lines not on this page · raw message
sound/soc/sof/intel/cnl.c +19 -87
127 lines not on this page · raw message
sound/soc/sof/intel/hda-common-ops.c new file +107 -0
107 lines not on this page · raw message
sound/soc/sof/intel/hda.h +6 -1
@@ -687,14 +687,19 @@ extern struct snd_soc_dai_driver skl_dai[];/* * Platform Specific HW abstraction Ops. */ +extern struct snd_sof_dsp_ops sof_hda_common_ops; +extern struct snd_sof_dsp_ops sof_apl_ops; +int sof_apl_ops_init (struct snd_sof_dev *sdev);extern struct snd_sof_dsp_ops sof_cnl_ops; +int sof_cnl_ops_init (struct snd_sof_dev *sdev);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 const struct sof_intel_dsp_desc apl_chip_info;extern const struct sof_intel_dsp_desc cnl_chip_info; -extern const struct sof_intel_dsp_desc skl_chip_info;extern const struct sof_intel_dsp_desc icl_chip_info;extern const struct sof_intel_dsp_desc tgl_chip_info;extern const struct sof_intel_dsp_desc tglh_chip_info;
sound/soc/sof/intel/icl.c +20 -88
129 lines not on this page · raw message
sound/soc/sof/intel/pci-apl.c +2 -0
@@ -43,6 +43,7 @@ static const struct sof_dev_desc bxt_desc = { }, .nocodec_tplg_filename = "sof-apl-nocodec.tplg", .ops = &sof_apl_ops, + .ops_init = sof_apl_ops_init, };static const struct sof_dev_desc glk_desc = {
@@ -69,6 +70,7 @@ static const struct sof_dev_desc glk_desc = { }, .nocodec_tplg_filename = "sof-glk-nocodec.tplg", .ops = &sof_apl_ops, + .ops_init = sof_apl_ops_init, };/* PCI IDs */
sound/soc/sof/intel/pci-cnl.c +3 -0
@@ -44,6 +44,7 @@ static const struct sof_dev_desc cnl_desc = { }, .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", .ops = &sof_cnl_ops, + .ops_init = sof_cnl_ops_init, };static const struct sof_dev_desc cfl_desc = {
@@ -71,6 +72,7 @@ static const struct sof_dev_desc cfl_desc = { }, .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", .ops = &sof_cnl_ops, + .ops_init = sof_cnl_ops_init, };static const struct sof_dev_desc cml_desc = {
@@ -98,6 +100,7 @@ static const struct sof_dev_desc cml_desc = { }, .nocodec_tplg_filename = "sof-cnl-nocodec.tplg", .ops = &sof_cnl_ops, + .ops_init = sof_cnl_ops_init, };/* PCI IDs */
sound/soc/sof/intel/pci-icl.c +2 -0
@@ -44,6 +44,7 @@ static const struct sof_dev_desc icl_desc = { }, .nocodec_tplg_filename = "sof-icl-nocodec.tplg", .ops = &sof_icl_ops, + .ops_init = sof_icl_ops_init, };static const struct sof_dev_desc jsl_desc = {
@@ -70,6 +71,7 @@ static const struct sof_dev_desc jsl_desc = { }, .nocodec_tplg_filename = "sof-jsl-nocodec.tplg", .ops = &sof_cnl_ops, + .ops_init = sof_cnl_ops_init, };/* PCI IDs */
sound/soc/sof/intel/pci-tgl.c +5 -1
@@ -44,6 +44,7 @@ static const struct sof_dev_desc tgl_desc = { }, .nocodec_tplg_filename = "sof-tgl-nocodec.tplg", .ops = &sof_tgl_ops, + .ops_init = sof_tgl_ops_init, };static const struct sof_dev_desc tglh_desc = {
@@ -71,6 +72,7 @@ static const struct sof_dev_desc tglh_desc = { }, .nocodec_tplg_filename = "sof-tgl-nocodec.tplg", .ops = &sof_tgl_ops, + .ops_init = sof_tgl_ops_init, };static const struct sof_dev_desc ehl_desc = {
@@ -97,6 +99,7 @@ static const struct sof_dev_desc ehl_desc = { }, .nocodec_tplg_filename = "sof-ehl-nocodec.tplg", .ops = &sof_tgl_ops, + .ops_init = sof_tgl_ops_init, };static const struct sof_dev_desc adls_desc = {
@@ -124,6 +127,7 @@ static const struct sof_dev_desc adls_desc = { }, .nocodec_tplg_filename = "sof-adl-nocodec.tplg", .ops = &sof_tgl_ops, + .ops_init = sof_tgl_ops_init, };static const struct sof_dev_desc adl_desc = {
@@ -151,6 +155,7 @@ static const struct sof_dev_desc adl_desc = { }, .nocodec_tplg_filename = "sof-adl-nocodec.tplg", .ops = &sof_tgl_ops, + .ops_init = sof_tgl_ops_init, };/* PCI IDs */
@@ -195,4 +200,3 @@ module_pci_driver(snd_sof_pci_intel_tgl_driver);MODULE_LICENSE ("Dual BSD/GPL" );MODULE_IMPORT_NS (SND_SOC_SOF_INTEL_HDA_COMMON );MODULE_IMPORT_NS (SND_SOC_SOF_PCI_DEV ); -
sound/soc/sof/intel/tgl.c +20 -88
129 lines not on this page · raw message
sound/soc/sof/ops.h +4 -2
@@ -21,10 +21,12 @@#define sof_ops (sdev) \ ((sdev)->pdata->desc->ops) -static inline void sof_ops_init (struct snd_sof_dev *sdev) +static inline int sof_ops_init (struct snd_sof_dev *sdev) {if (sdev->pdata->desc->ops_init) - sdev->pdata->desc->ops_init (sdev); +return sdev->pdata->desc->ops_init (sdev); + +return 0 ; }/* Mandatory operations are verified during probing */
Signature · 1 line
2.30.2
PATCH 10/16 ASoC: SOF: Intel: move HDA_CL_STREAM_FORMAT definition to header
In reply to Pierre-Louis BossartFrom: Ranjani Sridharan <[email protected]>
Use the definition of the HDA_CL_STREAM_FORMAT macro from the header file.
--- sound/soc/sof/intel/hda-loader.c | 2 -- sound/soc/sof/intel/hda.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-)
sound/soc/sof/intel/hda-loader.c +0 -2
@@ -24,8 +24,6 @@#include "../sof-priv.h" #include "hda.h" -#define HDA_CL_STREAM_FORMAT 0x40 -static void hda_ssp_set_cbp_cfp (struct snd_sof_dev *sdev) {struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
sound/soc/sof/intel/hda.h +1 -0
@@ -588,6 +588,7 @@ int hda_dsp_ipc_cmd_done(struct snd_sof_dev *sdev, int dir);*/ int hda_dsp_cl_boot_firmware (struct snd_sof_dev *sdev);int hda_dsp_cl_boot_firmware_iccmax (struct snd_sof_dev *sdev); +#define HDA_CL_STREAM_FORMAT 0x40/* pre and post fw run ops */ int hda_dsp_pre_fw_run (struct snd_sof_dev *sdev);
Signature · 1 line
2.30.2
PATCH 11/16 ASoC: SOF: Intel: hda: use BIT() macros for consistency
In reply to Pierre-Louis BossartBIT() macros should be used for all ADSPIC/IS registers.
--- sound/soc/sof/intel/hda.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/sof/intel/hda.h +4 -4
@@ -223,8 +223,8 @@#define HDA_DSP_REG_POLL_INTERVAL_US 500/* 0.5 msec */ #define HDA_DSP_REG_POLL_RETRY_COUNT 50 -#define HDA_DSP_ADSPIC_IPC 1 -#define HDA_DSP_ADSPIS_IPC 1 +#define HDA_DSP_ADSPIC_IPC BIT(0) +#define HDA_DSP_ADSPIS_IPC BIT(0)/* Intel HD Audio General DSP Registers */ #define HDA_DSP_GEN_BASE 0x0
@@ -268,8 +268,8 @@/* HIPCTE */ #define HDA_DSP_REG_HIPCTE_MSG_MASK 0x3FFFFFFF -#define HDA_DSP_ADSPIC_CL_DMA 0x2 -#define HDA_DSP_ADSPIS_CL_DMA 0x2 +#define HDA_DSP_ADSPIC_CL_DMA BIT(1) +#define HDA_DSP_ADSPIS_CL_DMA BIT(1)/* Delay before scheduling D0i3 entry */ #define BXT_D0I3_DELAY 5000
Signature · 1 line
2.30.2
PATCH 12/16 ASoC: SOF: Intel: hda: define check_ipc_irq op
In reply to Pierre-Louis BossartFrom: Ranjani Sridharan <[email protected]>
Define the check_ipc_irq op for HDA platforms and use it when checking if it is an IPC IRQ.
--- sound/soc/sof/intel/apl.c | 1 + sound/soc/sof/intel/cnl.c | 2 ++ sound/soc/sof/intel/hda.c | 13 ++++++++++++- sound/soc/sof/intel/icl.c | 1 + sound/soc/sof/intel/shim.h | 1 + sound/soc/sof/intel/tgl.c | 4 ++++ 6 files changed, 21 insertions(+), 1 deletion(-)
sound/soc/sof/intel/apl.c +1 -0
@@ -75,5 +75,6 @@ const struct sof_intel_dsp_desc apl_chip_info = { .ssp_count = APL_SSP_COUNT, .ssp_base_offset = APL_SSP_BASE_OFFSET, .quirks = SOF_INTEL_PROCEN_FMT_QUIRK, + .check_ipc_irq = hda_dsp_check_ipc_irq, };EXPORT_SYMBOL_NS (apl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
sound/soc/sof/intel/cnl.c +2 -0
@@ -295,6 +295,7 @@ const struct sof_intel_dsp_desc cnl_chip_info = { .sdw_shim_base = SDW_SHIM_BASE, .sdw_alh_base = SDW_ALH_BASE, .check_sdw_irq = hda_common_check_sdw_irq, + .check_ipc_irq = hda_dsp_check_ipc_irq, };EXPORT_SYMBOL_NS (cnl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
@@ -321,5 +322,6 @@ const struct sof_intel_dsp_desc jsl_chip_info = { .sdw_shim_base = SDW_SHIM_BASE, .sdw_alh_base = SDW_ALH_BASE, .check_sdw_irq = hda_common_check_sdw_irq, + .check_ipc_irq = hda_dsp_check_ipc_irq, };EXPORT_SYMBOL_NS (jsl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
sound/soc/sof/intel/hda.c +12 -1
@@ -493,6 +493,17 @@ void hda_dsp_dump(struct snd_sof_dev *sdev, u32 flags) } } +static bool hda_check_ipc_irq (struct snd_sof_dev *sdev) +{ +const struct sof_intel_dsp_desc *chip; + + chip =get_chip_info (sdev->pdata); +if (chip && chip->check_ipc_irq) +return chip->check_ipc_irq (sdev); + +return false; +} +void hda_ipc_irq_dump (struct snd_sof_dev *sdev) {struct hdac_bus *bus =sof_to_bus (sdev);
@@ -816,7 +827,7 @@ static irqreturn_t hda_dsp_interrupt_thread(int irq, void *context)if (hda_dsp_check_stream_irq (sdev))hda_dsp_stream_threaded_handler (irq, sdev); -if (hda_dsp_check_ipc_irq (sdev)) +if (hda_check_ipc_irq (sdev))sof_ops (sdev)->irq_thread (irq, sdev);if (hda_dsp_check_sdw_irq (sdev))
sound/soc/sof/intel/icl.c +1 -0
@@ -140,5 +140,6 @@ const struct sof_intel_dsp_desc icl_chip_info = { .sdw_shim_base = SDW_SHIM_BASE, .sdw_alh_base = SDW_ALH_BASE, .check_sdw_irq = hda_common_check_sdw_irq, + .check_ipc_irq = hda_dsp_check_ipc_irq, };EXPORT_SYMBOL_NS (icl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
sound/soc/sof/intel/shim.h +1 -0
@@ -171,6 +171,7 @@ struct sof_intel_dsp_desc {u32 sdw_alh_base;u32 quirks;bool (*check_sdw_irq)(struct snd_sof_dev *sdev); +bool (*check_ipc_irq)(struct snd_sof_dev *sdev); };extern struct snd_sof_dsp_ops sof_tng_ops;
sound/soc/sof/intel/tgl.c +4 -0
@@ -111,6 +111,7 @@ const struct sof_intel_dsp_desc tgl_chip_info = { .sdw_shim_base = SDW_SHIM_BASE, .sdw_alh_base = SDW_ALH_BASE, .check_sdw_irq = hda_common_check_sdw_irq, + .check_ipc_irq = hda_dsp_check_ipc_irq, };EXPORT_SYMBOL_NS (tgl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
@@ -130,6 +131,7 @@ const struct sof_intel_dsp_desc tglh_chip_info = { .sdw_shim_base = SDW_SHIM_BASE, .sdw_alh_base = SDW_ALH_BASE, .check_sdw_irq = hda_common_check_sdw_irq, + .check_ipc_irq = hda_dsp_check_ipc_irq, };EXPORT_SYMBOL_NS (tglh_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
@@ -149,6 +151,7 @@ const struct sof_intel_dsp_desc ehl_chip_info = { .sdw_shim_base = SDW_SHIM_BASE, .sdw_alh_base = SDW_ALH_BASE, .check_sdw_irq = hda_common_check_sdw_irq, + .check_ipc_irq = hda_dsp_check_ipc_irq, };EXPORT_SYMBOL_NS (ehl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
@@ -168,5 +171,6 @@ const struct sof_intel_dsp_desc adls_chip_info = { .sdw_shim_base = SDW_SHIM_BASE, .sdw_alh_base = SDW_ALH_BASE, .check_sdw_irq = hda_common_check_sdw_irq, + .check_ipc_irq = hda_dsp_check_ipc_irq, };EXPORT_SYMBOL_NS (adls_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
Signature · 1 line
2.30.2
PATCH 13/16 ASoC: SOF: Intel: hda: Define rom_status_reg in sof_intel_dsp_desc
In reply to Pierre-Louis BossartFrom: Ranjani Sridharan <[email protected]>
Add the rom_status_reg field to struct sof_intel_dsp_desc and define it for HDA platforms. This will be used to check the ROM status during FW boot.
--- sound/soc/sof/intel/apl.c | 1 + sound/soc/sof/intel/cnl.c | 2 ++ sound/soc/sof/intel/hda-loader.c | 14 ++++++++------ sound/soc/sof/intel/hda.c | 8 ++++++-- sound/soc/sof/intel/icl.c | 1 + sound/soc/sof/intel/shim.h | 1 + sound/soc/sof/intel/tgl.c | 4 ++++ 7 files changed, 23 insertions(+), 8 deletions(-)
sound/soc/sof/intel/apl.c +1 -0
@@ -71,6 +71,7 @@ const struct sof_intel_dsp_desc apl_chip_info = { .ipc_ack = HDA_DSP_REG_HIPCIE, .ipc_ack_mask = HDA_DSP_REG_HIPCIE_DONE, .ipc_ctl = HDA_DSP_REG_HIPCCTL, + .rom_status_reg = HDA_DSP_SRAM_REG_ROM_STATUS, .rom_init_timeout = 150, .ssp_count = APL_SSP_COUNT, .ssp_base_offset = APL_SSP_BASE_OFFSET,
sound/soc/sof/intel/cnl.c +2 -0
@@ -289,6 +289,7 @@ const struct sof_intel_dsp_desc cnl_chip_info = { .ipc_ack = CNL_DSP_REG_HIPCIDA, .ipc_ack_mask = CNL_DSP_REG_HIPCIDA_DONE, .ipc_ctl = CNL_DSP_REG_HIPCCTL, + .rom_status_reg = HDA_DSP_SRAM_REG_ROM_STATUS, .rom_init_timeout = 300, .ssp_count = CNL_SSP_COUNT, .ssp_base_offset = CNL_SSP_BASE_OFFSET,
@@ -316,6 +317,7 @@ const struct sof_intel_dsp_desc jsl_chip_info = { .ipc_ack = CNL_DSP_REG_HIPCIDA, .ipc_ack_mask = CNL_DSP_REG_HIPCIDA_DONE, .ipc_ctl = CNL_DSP_REG_HIPCCTL, + .rom_status_reg = HDA_DSP_SRAM_REG_ROM_STATUS, .rom_init_timeout = 300, .ssp_count = ICL_SSP_COUNT, .ssp_base_offset = CNL_SSP_BASE_OFFSET,
sound/soc/sof/intel/hda-loader.c +8 -6
@@ -171,7 +171,7 @@ static int cl_dsp_init(struct snd_sof_dev *sdev, int stream_tag)/* step 7: wait for ROM init */ ret = snd_sof_dsp_read_poll_timeout(sdev, HDA_DSP_BAR, - HDA_DSP_SRAM_REG_ROM_STATUS, status, + chip->rom_status_reg, status, ((status & HDA_DSP_ROM_STS_MASK) == HDA_DSP_ROM_INIT), HDA_DSP_REG_POLL_INTERVAL_US,
@@ -188,8 +188,8 @@ static int cl_dsp_init(struct snd_sof_dev *sdev, int stream_tag)if (hda->boot_iteration ==HDA_FW_BOOT_ATTEMPTS )dev_err (sdev->dev, -"error: %s: timeout HDA_DSP_SRAM_REG_ROM_STATUS read\n" , - __func__); +"%s: timeout with rom_status_reg (%#x) read\n" , + __func__, chip->rom_status_reg); err: flags =SOF_DBG_DUMP_PCI |SOF_DBG_DUMP_MBOX |SOF_DBG_DUMP_OPTIONAL ;
@@ -268,6 +268,8 @@ static int cl_cleanup(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab,static int cl_copy_fw (struct snd_sof_dev *sdev,struct hdac_ext_stream *hext_stream) { +struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata; +const struct sof_intel_dsp_desc *chip = hda->desc;unsigned int reg;int ret, status;
@@ -278,7 +280,7 @@ static int cl_copy_fw(struct snd_sof_dev *sdev, struct hdac_ext_stream *hext_str } status = snd_sof_dsp_read_poll_timeout(sdev, HDA_DSP_BAR, - HDA_DSP_SRAM_REG_ROM_STATUS, reg, + chip->rom_status_reg, reg, ((reg & HDA_DSP_ROM_STS_MASK) == HDA_DSP_ROM_FW_ENTERED), HDA_DSP_REG_POLL_INTERVAL_US,
@@ -291,8 +293,8 @@ static int cl_copy_fw(struct snd_sof_dev *sdev, struct hdac_ext_stream *hext_strif (status <0 ) {dev_err (sdev->dev, -"error: %s: timeout HDA_DSP_SRAM_REG_ROM_STATUS read\n" , - __func__); +"%s: timeout with rom_status_reg (%#x) read\n" , + __func__, chip->rom_status_reg); } ret =cl_trigger (sdev, hext_stream,SNDRV_PCM_TRIGGER_STOP );
sound/soc/sof/intel/hda.c +6 -2
@@ -406,11 +406,13 @@ static const struct hda_dsp_msg_code hda_dsp_rom_msg[] = {static void hda_dsp_get_status (struct snd_sof_dev *sdev,const char *level) { +const struct sof_intel_dsp_desc *chip;u32 status;int i; + chip =get_chip_info (sdev->pdata); status =snd_sof_dsp_read (sdev,HDA_DSP_BAR , -HDA_DSP_SRAM_REG_ROM_STATUS ); + chip->rom_status_reg);for (i =0 ; i <ARRAY_SIZE (hda_dsp_rom_msg); i++) {if (status == hda_dsp_rom_msg[i].code) {
@@ -456,13 +458,15 @@ static void hda_dsp_get_registers(struct snd_sof_dev *sdev,static void hda_dsp_dump_ext_rom_status (struct snd_sof_dev *sdev,const char *level,u32 flags) { +const struct sof_intel_dsp_desc *chip;char msg[128 ];int len =0 ;u32 value;int i; + chip =get_chip_info (sdev->pdata);for (i =0 ; i <HDA_EXT_ROM_STATUS_SIZE ; i++) { - value =snd_sof_dsp_read (sdev,HDA_DSP_BAR ,HDA_DSP_SRAM_REG_ROM_STATUS + i *0x4 ); + value =snd_sof_dsp_read (sdev,HDA_DSP_BAR , chip->rom_status_reg + i *0x4 ); len +=snprintf (msg + len,sizeof (msg) - len," 0x%x" , value); }
sound/soc/sof/intel/icl.c +1 -0
@@ -134,6 +134,7 @@ const struct sof_intel_dsp_desc icl_chip_info = { .ipc_ack = CNL_DSP_REG_HIPCIDA, .ipc_ack_mask = CNL_DSP_REG_HIPCIDA_DONE, .ipc_ctl = CNL_DSP_REG_HIPCCTL, + .rom_status_reg = HDA_DSP_SRAM_REG_ROM_STATUS, .rom_init_timeout = 300, .ssp_count = ICL_SSP_COUNT, .ssp_base_offset = CNL_SSP_BASE_OFFSET,
sound/soc/sof/intel/shim.h +1 -0
@@ -164,6 +164,7 @@ struct sof_intel_dsp_desc {int ipc_ack;int ipc_ack_mask;int ipc_ctl; +int rom_status_reg;int rom_init_timeout;int ssp_count;/* ssp count of the platform */ int ssp_base_offset;/* base address of the SSPs */
sound/soc/sof/intel/tgl.c +4 -0
@@ -105,6 +105,7 @@ const struct sof_intel_dsp_desc tgl_chip_info = { .ipc_ack = CNL_DSP_REG_HIPCIDA, .ipc_ack_mask = CNL_DSP_REG_HIPCIDA_DONE, .ipc_ctl = CNL_DSP_REG_HIPCCTL, + .rom_status_reg = HDA_DSP_SRAM_REG_ROM_STATUS, .rom_init_timeout = 300, .ssp_count = ICL_SSP_COUNT, .ssp_base_offset = CNL_SSP_BASE_OFFSET,
@@ -125,6 +126,7 @@ const struct sof_intel_dsp_desc tglh_chip_info = { .ipc_ack = CNL_DSP_REG_HIPCIDA, .ipc_ack_mask = CNL_DSP_REG_HIPCIDA_DONE, .ipc_ctl = CNL_DSP_REG_HIPCCTL, + .rom_status_reg = HDA_DSP_SRAM_REG_ROM_STATUS, .rom_init_timeout = 300, .ssp_count = ICL_SSP_COUNT, .ssp_base_offset = CNL_SSP_BASE_OFFSET,
@@ -145,6 +147,7 @@ const struct sof_intel_dsp_desc ehl_chip_info = { .ipc_ack = CNL_DSP_REG_HIPCIDA, .ipc_ack_mask = CNL_DSP_REG_HIPCIDA_DONE, .ipc_ctl = CNL_DSP_REG_HIPCCTL, + .rom_status_reg = HDA_DSP_SRAM_REG_ROM_STATUS, .rom_init_timeout = 300, .ssp_count = ICL_SSP_COUNT, .ssp_base_offset = CNL_SSP_BASE_OFFSET,
@@ -165,6 +168,7 @@ const struct sof_intel_dsp_desc adls_chip_info = { .ipc_ack = CNL_DSP_REG_HIPCIDA, .ipc_ack_mask = CNL_DSP_REG_HIPCIDA_DONE, .ipc_ctl = CNL_DSP_REG_HIPCCTL, + .rom_status_reg = HDA_DSP_SRAM_REG_ROM_STATUS, .rom_init_timeout = 300, .ssp_count = ICL_SSP_COUNT, .ssp_base_offset = CNL_SSP_BASE_OFFSET,
Signature · 1 line
2.30.2
PATCH 14/16 ASoC: SOF: Intel: hda: expose some codeloader functions
In reply to Pierre-Louis BossartFrom: Ranjani Sridharan <[email protected]>
Expose the code loader functions for re-use in new platforms
--- sound/soc/sof/intel/hda-loader.c | 27 ++++++++++++++------------- sound/soc/sof/intel/hda.h | 6 ++++++ 2 files changed, 20 insertions(+), 13 deletions(-)
sound/soc/sof/intel/hda-loader.c +14 -13
@@ -41,9 +41,9 @@ static void hda_ssp_set_cbp_cfp(struct snd_sof_dev *sdev) } } -static struct hdac_ext_stream *cl_stream_prepare (struct snd_sof_dev *sdev,unsigned int format, -unsigned int size,struct snd_dma_buffer *dmab, -int direction) +struct hdac_ext_stream *hda_cl_stream_prepare (struct snd_sof_dev *sdev,unsigned int format, +unsigned int size,struct snd_dma_buffer *dmab, +int direction) {struct hdac_ext_stream *hext_stream;struct hdac_stream *hstream;
@@ -234,8 +234,8 @@ static int cl_trigger(struct snd_sof_dev *sdev, } } -static int cl_cleanup (struct snd_sof_dev *sdev,struct snd_dma_buffer *dmab, -struct hdac_ext_stream *hext_stream) +int hda_cl_cleanup (struct snd_sof_dev *sdev,struct snd_dma_buffer *dmab, +struct hdac_ext_stream *hext_stream) {struct hdac_stream *hstream = &hext_stream->hstream;int sd_offset =SOF_STREAM_SD_OFFSET (hstream);
@@ -266,7 +266,7 @@ static int cl_cleanup(struct snd_sof_dev *sdev, struct snd_dma_buffer *dmab,return ret; } -static int cl_copy_fw (struct snd_sof_dev *sdev,struct hdac_ext_stream *hext_stream) +int hda_cl_copy_fw (struct snd_sof_dev *sdev,struct hdac_ext_stream *hext_stream) {struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;const struct sof_intel_dsp_desc *chip = hda->desc;
@@ -328,8 +328,8 @@ int hda_dsp_cl_boot_firmware_iccmax(struct snd_sof_dev *sdev) stripped_firmware.size = plat_data->fw->size - plat_data->fw_offset;/* prepare capture stream for ICCMAX */ - iccmax_stream =cl_stream_prepare (sdev,HDA_CL_STREAM_FORMAT , stripped_firmware.size, - &dmab_bdl,SNDRV_PCM_STREAM_CAPTURE ); + iccmax_stream =hda_cl_stream_prepare (sdev,HDA_CL_STREAM_FORMAT , stripped_firmware.size, + &dmab_bdl,SNDRV_PCM_STREAM_CAPTURE );if (IS_ERR (iccmax_stream)) {dev_err (sdev->dev,"error: dma prepare for ICCMAX stream failed\n" );return PTR_ERR (iccmax_stream);
@@ -341,7 +341,7 @@ int hda_dsp_cl_boot_firmware_iccmax(struct snd_sof_dev *sdev)* Perform iccmax stream cleanup. This should be done even if firmware loading fails. * If the cleanup also fails, we return the initial error */ - ret1 =cl_cleanup (sdev, &dmab_bdl, iccmax_stream); + ret1 =hda_cl_cleanup (sdev, &dmab_bdl, iccmax_stream);if (ret1 <0 ) {dev_err (sdev->dev,"error: ICCMAX stream cleanup failed\n" );
@@ -420,8 +420,9 @@ int hda_dsp_cl_boot_firmware(struct snd_sof_dev *sdev)init_waitqueue_head (&sdev->boot_wait);/* prepare DMA for code loader stream */ - hext_stream =cl_stream_prepare (sdev,HDA_CL_STREAM_FORMAT , stripped_firmware.size, - &dmab,SNDRV_PCM_STREAM_PLAYBACK ); + hext_stream =hda_cl_stream_prepare (sdev,HDA_CL_STREAM_FORMAT , + stripped_firmware.size, + &dmab,SNDRV_PCM_STREAM_PLAYBACK );if (IS_ERR (hext_stream)) {dev_err (sdev->dev,"error: dma prepare for fw loading failed\n" );return PTR_ERR (hext_stream);
@@ -475,7 +476,7 @@ int hda_dsp_cl_boot_firmware(struct snd_sof_dev *sdev)* Continue with code loading and firmware boot */ hda->boot_iteration =HDA_FW_BOOT_ATTEMPTS ; - ret =cl_copy_fw (sdev, hext_stream); + ret =hda_cl_copy_fw (sdev, hext_stream);if (!ret)dev_dbg (sdev->dev,"Firmware download successful, booting...\n" );else
@@ -488,7 +489,7 @@ int hda_dsp_cl_boot_firmware(struct snd_sof_dev *sdev)* This should be done even if firmware loading fails. * If the cleanup also fails, we return the initial error */ - ret1 =cl_cleanup (sdev, &dmab, hext_stream); + ret1 =hda_cl_cleanup (sdev, &dmab, hext_stream);if (ret1 <0 ) {dev_err (sdev->dev,"error: Code loader DSP cleanup failed\n" );
sound/soc/sof/intel/hda.h +6 -0
@@ -588,6 +588,12 @@ int hda_dsp_ipc_cmd_done(struct snd_sof_dev *sdev, int dir);*/ int hda_dsp_cl_boot_firmware (struct snd_sof_dev *sdev);int hda_dsp_cl_boot_firmware_iccmax (struct snd_sof_dev *sdev); +int hda_cl_copy_fw (struct snd_sof_dev *sdev,struct hdac_ext_stream *hext_stream); +struct hdac_ext_stream *hda_cl_stream_prepare (struct snd_sof_dev *sdev,unsigned int format, +unsigned int size,struct snd_dma_buffer *dmab, +int direction); +int hda_cl_cleanup (struct snd_sof_dev *sdev,struct snd_dma_buffer *dmab, +struct hdac_ext_stream *hext_stream);#define HDA_CL_STREAM_FORMAT 0x40/* pre and post fw run ops */
Signature · 1 line
2.30.2
PATCH 15/16 ASoC: SOF: Intel: add initial SKL/KBL hardware support
In reply to Pierre-Louis BossartIn preparation of the IPCv4 IPC support, this patch adds support for SkyLake and KabyLake boot and code loader and descriptors used when probing the PCI driver.
The work was initially contributed in 2018 by Liam Girdwood and Zhu Yingjiang, and abandoned due to firmware signature issues. With the upcoming support of IPC v4, and hence the Intel closed-source firmware, it's time to re-add this capability.
The SKL ops are left empty at this time since the driver cannot be tested with the SOF firmware. The ops will be populated when the IPC4 is added during the next kernel cycles.
Tested with the IPC4 and closed-source firmware on Dell XPS 9350 and KBL NUC with HDaudio codecs. The SSP and DMIC interfaces are not supported at this time.
--- sound/soc/sof/intel/Kconfig | 24 ++ sound/soc/sof/intel/Makefile | 4 + sound/soc/sof/intel/hda-dsp.c | 4 +- sound/soc/sof/intel/hda-ipc.c | 8 + sound/soc/sof/intel/hda-loader-skl.c | 583 +++++++++++++++++++++++++++ sound/soc/sof/intel/hda.c | 2 + sound/soc/sof/intel/hda.h | 12 + sound/soc/sof/intel/pci-skl.c | 89 ++++ sound/soc/sof/intel/skl.c | 69 ++++ 9 files changed, 793 insertions(+), 2 deletions(-) create mode 100644 sound/soc/sof/intel/hda-loader-skl.c create mode 100644 sound/soc/sof/intel/pci-skl.c create mode 100644 sound/soc/sof/intel/skl.c
sound/soc/sof/intel/Kconfig +24 -0
@@ -92,6 +92,30 @@ config SND_SOC_SOF_MERRIFIELD Say Y if you have such a device. If unsure select "N". +config SND_SOC_SOF_INTEL_SKL + tristate + select SND_SOC_SOF_HDA_COMMON + +config SND_SOC_SOF_SKYLAKE + tristate "SOF support for SkyLake" + default SND_SOC_SOF_PCI + select SND_SOC_SOF_INTEL_SKL + help + This adds support for the Intel(R) platforms using the SkyLake processors. + Say Y if you have such a device. + If unsure select "N". + This is intended only for developers and not a recommend option for distros. + +config SND_SOC_SOF_KABYLAKE + tristate "SOF support for KabyLake" + default SND_SOC_SOF_PCI + select SND_SOC_SOF_INTEL_SKL + help + This adds support for the Intel(R) platforms using the KabyLake processors. + Say Y if you have such a device. + If unsure select "N". + This is intended only for developers and not a recommend option for distros. + config SND_SOC_SOF_INTEL_APL tristate select SND_SOC_SOF_HDA_COMMON
sound/soc/sof/intel/Makefile +4 -0
@@ -6,7 +6,9 @@ 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 \ + skl.o hda-loader-skl.o \ apl.o cnl.o tgl.o icl.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
@@ -20,12 +22,14 @@ obj-$(CONFIG_SND_SOC_SOF_HDA_COMMON) += snd-sof-intel-hda-common.o obj-$(CONFIG_SND_SOC_SOF_HDA) += snd-sof-intel-hda.o snd-sof-pci-intel-tng-objs := pci-tng.o +snd-sof-pci-intel-skl-objs := pci-skl.o 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 obj-$(CONFIG_SND_SOC_SOF_MERRIFIELD) += snd-sof-pci-intel-tng.o +obj-$(CONFIG_SND_SOC_SOF_INTEL_SKL) += snd-sof-pci-intel-skl.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
sound/soc/sof/intel/hda-dsp.c +2 -2
@@ -113,7 +113,7 @@ static int hda_dsp_core_reset_leave(struct snd_sof_dev *sdev, unsigned int core_return ret; } -static int hda_dsp_core_stall_reset (struct snd_sof_dev *sdev,unsigned int core_mask) +int hda_dsp_core_stall_reset (struct snd_sof_dev *sdev,unsigned int core_mask) {/* stall core */ snd_sof_dsp_update_bits_unlocked(sdev, HDA_DSP_BAR,
@@ -125,7 +125,7 @@ static int hda_dsp_core_stall_reset(struct snd_sof_dev *sdev, unsigned int core_return hda_dsp_core_reset_enter (sdev, core_mask); } -static bool hda_dsp_core_is_enabled (struct snd_sof_dev *sdev,unsigned int core_mask) +bool hda_dsp_core_is_enabled (struct snd_sof_dev *sdev,unsigned int core_mask) {int val;bool is_enable;
sound/soc/sof/intel/hda-ipc.c +8 -0
@@ -214,6 +214,7 @@ irqreturn_t hda_dsp_ipc_irq_thread(int irq, void *context)/* Check if an IPC IRQ occurred */ bool hda_dsp_check_ipc_irq (struct snd_sof_dev *sdev) { +struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;bool ret = false;u32 irq_status;
@@ -229,6 +230,13 @@ bool hda_dsp_check_ipc_irq(struct snd_sof_dev *sdev)if (irq_status &HDA_DSP_ADSPIS_IPC ) ret = true; +/* CLDMA message ? */ +if (irq_status &HDA_DSP_ADSPIS_CL_DMA ) { + hda->code_loading =0 ; +wake_up (&hda->waitq); + ret = false; + } + out:return ret; }
sound/soc/sof/intel/hda-loader-skl.c new file +583 -0
583 lines not on this page · raw message
sound/soc/sof/intel/hda.c +2 -0
@@ -999,6 +999,8 @@ int hda_dsp_probe(struct snd_sof_dev *sdev)INIT_DELAYED_WORK (&hdev->d0i3_work, hda_dsp_d0i3_work); +init_waitqueue_head (&hdev->waitq); +return 0 ; free_ipc_irq:
sound/soc/sof/intel/hda.h +12 -0
@@ -359,6 +359,7 @@#endif /* Intel HD Audio SRAM Window 0*/ +#define HDA_DSP_SRAM_REG_ROM_STATUS_SKL 0x8000#define HDA_ADSP_SRAM0_BASE_SKL 0x8000/* Firmware status window */
@@ -449,6 +450,9 @@ struct sof_intel_hda_dev {/* FW clock config, 0:HPRO, 1:LPRO */ bool clk_config_lpro; + +wait_queue_head_t waitq; +bool code_loading; };static inline struct hdac_bus *sof_to_bus (struct snd_sof_dev *s)
@@ -497,6 +501,7 @@ int hda_dsp_core_reset_power_down(struct snd_sof_dev *sdev,int hda_dsp_core_get (struct snd_sof_dev *sdev,int core);void hda_dsp_ipc_int_enable (struct snd_sof_dev *sdev);void hda_dsp_ipc_int_disable (struct snd_sof_dev *sdev); +bool hda_dsp_core_is_enabled (struct snd_sof_dev *sdev,unsigned int core_mask);int hda_dsp_set_power_state (struct snd_sof_dev *sdev,const struct sof_dsp_power_state *target_state);
@@ -696,6 +701,8 @@ extern struct snd_soc_dai_driver skl_dai[];*/ extern struct snd_sof_dsp_ops sof_hda_common_ops; +extern struct snd_sof_dsp_ops sof_skl_ops; +int sof_skl_ops_init (struct snd_sof_dev *sdev);extern struct snd_sof_dsp_ops sof_apl_ops;int sof_apl_ops_init (struct snd_sof_dev *sdev);extern struct snd_sof_dsp_ops sof_cnl_ops;
@@ -705,6 +712,7 @@ 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 const struct sof_intel_dsp_desc skl_chip_info;extern const struct sof_intel_dsp_desc apl_chip_info;extern const struct sof_intel_dsp_desc cnl_chip_info;extern const struct sof_intel_dsp_desc icl_chip_info;
@@ -754,4 +762,8 @@ int hda_ctrl_dai_widget_free(struct snd_soc_dapm_widget *w, unsigned int quirk_fextern int sof_hda_position_quirk; +/* SKL/KBL */ +int hda_dsp_cl_boot_firmware_skl (struct snd_sof_dev *sdev); +int hda_dsp_core_stall_reset (struct snd_sof_dev *sdev,unsigned int core_mask); +#endif
sound/soc/sof/intel/pci-skl.c new file +89 -0
89 lines not on this page · raw message
sound/soc/sof/intel/skl.c new file +69 -0
69 lines not on this page · raw message
Signature · 1 line
2.30.2
Re: [PATCH 15/16] ASoC: SOF: Intel: add initial SKL/KBL hardware support
Quoted 33 lines · Pierre-Louis Bossart
In preparation of the IPCv4 IPC support, this patch adds support for SkyLake and KabyLake boot and code loader and descriptors used when probing the PCI driver.
The work was initially contributed in 2018 by Liam Girdwood and Zhu Yingjiang, and abandoned due to firmware signature issues. With the upcoming support of IPC v4, and hence the Intel closed-source firmware, it's time to re-add this capability.
The SKL ops are left empty at this time since the driver cannot be tested with the SOF firmware. The ops will be populated when the IPC4 is added during the next kernel cycles.
Tested with the IPC4 and closed-source firmware on Dell XPS 9350 and KBL NUC with HDaudio codecs. The SSP and DMIC interfaces are not supported at this time.
Co-developed-by Ranjani Sridharan <[email protected]>Signed-off-by Ranjani Sridharan <[email protected]>Signed-off-by Pierre-Louis Bossart <[email protected]>Reviewed-by Péter Ujfalusi <[email protected]>Reviewed-by Ranjani Sridharan <[email protected]>--- sound/soc/sof/intel/Kconfig | 24 ++ sound/soc/sof/intel/Makefile | 4 + sound/soc/sof/intel/hda-dsp.c | 4 +- sound/soc/sof/intel/hda-ipc.c | 8 + sound/soc/sof/intel/hda-loader-skl.c | 583 +++++++++++++++++++++++++++ sound/soc/sof/intel/hda.c | 2 + sound/soc/sof/intel/hda.h | 12 + sound/soc/sof/intel/pci-skl.c | 89 ++++ sound/soc/sof/intel/skl.c | 69 ++++ 9 files changed, 793 insertions(+), 2 deletions(-)
Quoted 3 lines
create mode 100644
sound/soc/sof/intel/hda-loader-skl.ccreate mode 100644sound/soc/sof/intel/pci-skl.ccreate mode 100644sound/soc/sof/intel/skl.c
Regardless if this piece should be or not, let's not hide the code-loading implementation behind "initial hardware support". It would have been better to split this change into two - one for CL, one for "initial hardware support".
Regards,
Czarek
PATCH 16/16 ASoC: SOF: Intel: add IP identifier
In reply to Pierre-Louis BossartThis patch adds an IP identifier for each Intel platform. The identifier will be used to select different code branches or constants.
--- sound/soc/sof/intel/apl.c | 1 + sound/soc/sof/intel/bdw.c | 1 + sound/soc/sof/intel/byt.c | 2 ++ sound/soc/sof/intel/cnl.c | 2 ++ sound/soc/sof/intel/icl.c | 1 + sound/soc/sof/intel/pci-tng.c | 1 + sound/soc/sof/intel/shim.h | 12 ++++++++++++ sound/soc/sof/intel/skl.c | 1 + sound/soc/sof/intel/tgl.c | 4 ++++ 9 files changed, 25 insertions(+)
sound/soc/sof/intel/apl.c +1 -0
@@ -77,5 +77,6 @@ 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, + .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/bdw.c +1 -0
@@ -637,6 +637,7 @@ static struct snd_sof_dsp_ops sof_bdw_ops = {static const struct sof_intel_dsp_desc bdw_chip_info = { .cores_num =1 , .host_managed_cores_mask =1 , + .hw_ip_version =SOF_INTEL_BROADWELL , };static const struct sof_dev_desc sof_acpi_broadwell_desc = {
sound/soc/sof/intel/byt.c +2 -0
@@ -295,6 +295,7 @@ static struct snd_sof_dsp_ops sof_byt_ops = {static const struct sof_intel_dsp_desc byt_chip_info = { .cores_num =1 , .host_managed_cores_mask =1 , + .hw_ip_version =SOF_INTEL_BAYTRAIL , };/* cherrytrail and braswell ops */
@@ -378,6 +379,7 @@ static struct snd_sof_dsp_ops sof_cht_ops = {static const struct sof_intel_dsp_desc cht_chip_info = { .cores_num =1 , .host_managed_cores_mask =1 , + .hw_ip_version =SOF_INTEL_BAYTRAIL , };/* BYTCR uses different IRQ index */
sound/soc/sof/intel/cnl.c +2 -0
@@ -297,6 +297,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, + .hw_ip_version = SOF_INTEL_CAVS_1_8, };EXPORT_SYMBOL_NS (cnl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
@@ -325,5 +326,6 @@ 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, + .hw_ip_version = SOF_INTEL_CAVS_2_0, };EXPORT_SYMBOL_NS (jsl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
sound/soc/sof/intel/icl.c +1 -0
@@ -142,5 +142,6 @@ 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, + .hw_ip_version = SOF_INTEL_CAVS_2_0, };EXPORT_SYMBOL_NS (icl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
sound/soc/sof/intel/pci-tng.c +1 -0
@@ -206,6 +206,7 @@ struct snd_sof_dsp_ops sof_tng_ops = {const struct sof_intel_dsp_desc tng_chip_info = { .cores_num =1 , .host_managed_cores_mask =1 , + .hw_ip_version =SOF_INTEL_TANGIER , };static const struct sof_dev_desc tng_desc = {
sound/soc/sof/intel/shim.h +12 -0
@@ -11,6 +11,17 @@#ifndef __SOF_INTEL_SHIM_H#define __SOF_INTEL_SHIM_H +enum sof_intel_hw_ip_version { +SOF_INTEL_TANGIER , +SOF_INTEL_BAYTRAIL , +SOF_INTEL_BROADWELL , +SOF_INTEL_CAVS_1_5 ,/* SkyLake, KabyLake, AmberLake */ +SOF_INTEL_CAVS_1_5_PLUS ,/* ApolloLake, GeminiLake */ +SOF_INTEL_CAVS_1_8 ,/* CannonLake, CometLake, CoffeeLake */ +SOF_INTEL_CAVS_2_0 ,/* IceLake, JasperLake */ +SOF_INTEL_CAVS_2_5 ,/* TigerLake, AlderLake */ +}; +/* * SHIM registers for BYT, BSW, CHT, BDW */
@@ -171,6 +182,7 @@ struct sof_intel_dsp_desc {u32 sdw_shim_base;u32 sdw_alh_base;u32 quirks; +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); };
sound/soc/sof/intel/skl.c +1 -0
@@ -65,5 +65,6 @@ const struct sof_intel_dsp_desc skl_chip_info = { .rom_status_reg = HDA_DSP_SRAM_REG_ROM_STATUS_SKL, .rom_init_timeout = 300, .check_ipc_irq = hda_dsp_check_ipc_irq, + .hw_ip_version = SOF_INTEL_CAVS_1_5, };EXPORT_SYMBOL_NS (skl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
sound/soc/sof/intel/tgl.c +4 -0
@@ -113,6 +113,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, + .hw_ip_version = SOF_INTEL_CAVS_2_5, };EXPORT_SYMBOL_NS (tgl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
@@ -134,6 +135,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, + .hw_ip_version = SOF_INTEL_CAVS_2_5, };EXPORT_SYMBOL_NS (tglh_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
@@ -155,6 +157,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, + .hw_ip_version = SOF_INTEL_CAVS_2_5, };EXPORT_SYMBOL_NS (ehl_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
@@ -176,5 +179,6 @@ 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, + .hw_ip_version = SOF_INTEL_CAVS_2_5, };EXPORT_SYMBOL_NS (adls_chip_info,SND_SOC_SOF_INTEL_HDA_COMMON );
Signature · 1 line
2.30.2
Quoted 33 lines · Pierre-Louis Bossart
The
INTEL_IPC4protocol and firmware architecture will rely on different sets of firmware binary and topology files. Some platforms will only supportINTEL_IPC4, some will support bothINTEL_IPC4andSOF_IPCfor development, and some will stay with the existingSOF_IPC.This patchset adds new IPC definitions, and search paths for firmware and topology files, along with means to override the default IPC type and search paths for development. The firmware binary names are aligned with those used by the Intel AVS driver to avoid duplicate firmware installs, but the topology will have to differ due to driver architecture differences.
In addition, this patchset adds basic hardware support for SKL/KBL with HDaudio codecs, which requires a dedicated code loader and manifest support. Plain HDAudio was tested on Dell XPS 9350 and Intel NUC devices. HDAudio+DMIC support was tested on more recent UpExtreme (WHL and TGL variants).
Pierre-Louis Bossart (12):
ASoC: SOF: add definitions for different IPC types
ASoC: SOF: add path indirection to each IPC type
ASoC: SOF: add default IPC capability and file paths
ASoC: SOF: add IPC-dependent file names
ASoC: SOF: sof-pci-dev: add parameter to override firmware filename
ASoC: SOF: sof-pci-dev: add parameter to override topology filename
ASoC: SOF: sof-audio: preserve topology filename override in nocodec
mode
ASoC: SOF: remove const qualifier for 'structsnd_sof_dsp_ops'
ASoC: SOF: Intel: hda: use common ops across platforms
ASoC: SOF: Intel: hda: useBIT()macros for consistency
ASoC: SOF: Intel: add initial SKL/KBL hardware support
ASoC: SOF: Intel: add IP identifier
Quoted 5 lines
Ranjani Sridharan (4):
ASoC: SOF: Intel: moveHDA_CL_STREAM_FORMATdefinition to header
ASoC: SOF: Intel: hda: definecheck_ipc_irqop
ASoC: SOF: Intel: hda: Definerom_status_reginsof_intel_dsp_desc
ASoC: SOF: Intel: hda: expose some codeloader functions
Hmm.. I'd have expected this sent as a RFC first, especially the SKL/KBL bits. That's because we already have dedicated solution for said platforms - avs-driver - and this series seems to be adding support while using 1:1 firmware as the mentioned avs-driver. Looks to me as an unnecessary maintenance cost increase.
Essentially, patches 14, 15, 16 should not be part of this series. You can always have a IPC4 preparation first, and a dedicated topic for SKL/KBL later.
Regards,
Czarek