diff options
-rw-r--r-- | sound/soc/meson/Kconfig | 2 | ||||
-rw-r--r-- | sound/soc/qcom/lpass-cpu.c | 10 | ||||
-rw-r--r-- | sound/soc/qcom/lpass-sc7180.c | 4 | ||||
-rw-r--r-- | sound/soc/qcom/lpass.h | 1 | ||||
-rw-r--r-- | sound/soc/qcom/sc7180.c | 2 | ||||
-rw-r--r-- | sound/soc/sof/intel/Kconfig | 16 | ||||
-rw-r--r-- | sound/soc/sof/intel/hda.h | 1 | ||||
-rw-r--r-- | sound/soc/sof/intel/tgl.c | 16 | ||||
-rw-r--r-- | sound/soc/sof/sof-pci-dev.c | 21 |
9 files changed, 70 insertions, 3 deletions
diff --git a/sound/soc/meson/Kconfig b/sound/soc/meson/Kconfig index 363dc3b1bbe4..ce0cbdc69b2e 100644 --- a/sound/soc/meson/Kconfig +++ b/sound/soc/meson/Kconfig @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only menu "ASoC support for Amlogic platforms" - depends on ARCH_MESON || COMPILE_TEST + depends on ARCH_MESON || (COMPILE_TEST && COMMON_CLK) config SND_MESON_AIU tristate "Amlogic AIU" diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c index 0c64deaf9374..0d9ff23d7463 100644 --- a/sound/soc/qcom/lpass-cpu.c +++ b/sound/soc/qcom/lpass-cpu.c @@ -908,5 +908,15 @@ int asoc_qcom_lpass_cpu_platform_remove(struct platform_device *pdev) } EXPORT_SYMBOL_GPL(asoc_qcom_lpass_cpu_platform_remove); +void asoc_qcom_lpass_cpu_platform_shutdown(struct platform_device *pdev) +{ + struct lpass_data *drvdata = platform_get_drvdata(pdev); + + if (drvdata->variant->exit) + drvdata->variant->exit(pdev); + +} +EXPORT_SYMBOL_GPL(asoc_qcom_lpass_cpu_platform_shutdown); + MODULE_DESCRIPTION("QTi LPASS CPU Driver"); MODULE_LICENSE("GPL v2"); diff --git a/sound/soc/qcom/lpass-sc7180.c b/sound/soc/qcom/lpass-sc7180.c index 61a208fe6875..238069e293bf 100644 --- a/sound/soc/qcom/lpass-sc7180.c +++ b/sound/soc/qcom/lpass-sc7180.c @@ -34,7 +34,8 @@ static struct snd_soc_dai_driver sc7180_lpass_cpu_dai_driver[] = { }, .capture = { .stream_name = "Primary Capture", - .formats = SNDRV_PCM_FMTBIT_S16, + .formats = SNDRV_PCM_FMTBIT_S16 | + SNDRV_PCM_FMTBIT_S32, .rates = SNDRV_PCM_RATE_48000, .rate_min = 48000, .rate_max = 48000, @@ -297,6 +298,7 @@ static struct platform_driver sc7180_lpass_cpu_platform_driver = { }, .probe = asoc_qcom_lpass_cpu_platform_probe, .remove = asoc_qcom_lpass_cpu_platform_remove, + .shutdown = asoc_qcom_lpass_cpu_platform_shutdown, }; module_platform_driver(sc7180_lpass_cpu_platform_driver); diff --git a/sound/soc/qcom/lpass.h b/sound/soc/qcom/lpass.h index b4830f353796..32a68c4fc238 100644 --- a/sound/soc/qcom/lpass.h +++ b/sound/soc/qcom/lpass.h @@ -255,6 +255,7 @@ struct lpass_variant { /* register the platform driver from the CPU DAI driver */ int asoc_qcom_lpass_platform_register(struct platform_device *); int asoc_qcom_lpass_cpu_platform_remove(struct platform_device *pdev); +void asoc_qcom_lpass_cpu_platform_shutdown(struct platform_device *pdev); int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev); int asoc_qcom_lpass_cpu_dai_probe(struct snd_soc_dai *dai); extern const struct snd_soc_dai_ops asoc_qcom_lpass_cpu_dai_ops; diff --git a/sound/soc/qcom/sc7180.c b/sound/soc/qcom/sc7180.c index e2e6567566af..de70fa792aea 100644 --- a/sound/soc/qcom/sc7180.c +++ b/sound/soc/qcom/sc7180.c @@ -316,7 +316,7 @@ static int sc7180_snd_platform_probe(struct platform_device *pdev) struct snd_soc_dai_link *link; int ret; int i; - bool no_headphone; + bool no_headphone = false; /* Allocate the private data */ data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); diff --git a/sound/soc/sof/intel/Kconfig b/sound/soc/sof/intel/Kconfig index b233302f05e4..b607dba5fb2a 100644 --- a/sound/soc/sof/intel/Kconfig +++ b/sound/soc/sof/intel/Kconfig @@ -29,6 +29,7 @@ config SND_SOC_SOF_INTEL_PCI select SND_SOC_SOF_TIGERLAKE if SND_SOC_SOF_TIGERLAKE_SUPPORT select SND_SOC_SOF_ELKHARTLAKE if SND_SOC_SOF_ELKHARTLAKE_SUPPORT select SND_SOC_SOF_JASPERLAKE if SND_SOC_SOF_JASPERLAKE_SUPPORT + select SND_SOC_SOF_ALDERLAKE if SND_SOC_SOF_ALDERLAKE_SUPPORT help This option is not user-selectable but automagically handled by 'select' statements at a higher level. @@ -269,6 +270,21 @@ config SND_SOC_SOF_JASPERLAKE This option is not user-selectable but automagically handled by 'select' statements at a higher level. +config SND_SOC_SOF_ALDERLAKE_SUPPORT + bool "SOF support for Alderlake" + help + This adds support for Sound Open Firmware for Intel(R) platforms + using the Alderlake processors. + Say Y if you have such a device. + If unsure select "N". + +config SND_SOC_SOF_ALDERLAKE + tristate + select SND_SOC_SOF_HDA_COMMON + help + This option is not user-selectable but automagically handled by + 'select' statements at a higher level + config SND_SOC_SOF_HDA_COMMON tristate select SND_INTEL_DSP_CONFIG diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h index 1bc4dabdd394..75954e642c5e 100644 --- a/sound/soc/sof/intel/hda.h +++ b/sound/soc/sof/intel/hda.h @@ -742,6 +742,7 @@ extern const struct sof_intel_dsp_desc tgl_chip_info; extern const struct sof_intel_dsp_desc tglh_chip_info; extern const struct sof_intel_dsp_desc ehl_chip_info; extern const struct sof_intel_dsp_desc jsl_chip_info; +extern const struct sof_intel_dsp_desc adls_chip_info; /* machine driver select */ void hda_machine_select(struct snd_sof_dev *sdev); diff --git a/sound/soc/sof/intel/tgl.c b/sound/soc/sof/intel/tgl.c index 0278b67de1ec..bdcc66d0df78 100644 --- a/sound/soc/sof/intel/tgl.c +++ b/sound/soc/sof/intel/tgl.c @@ -151,3 +151,19 @@ const struct sof_intel_dsp_desc tglh_chip_info = { .ssp_base_offset = CNL_SSP_BASE_OFFSET, }; EXPORT_SYMBOL_NS(tglh_chip_info, SND_SOC_SOF_INTEL_HDA_COMMON); + +const struct sof_intel_dsp_desc adls_chip_info = { + /* Alderlake-S */ + .cores_num = 2, + .init_core_mask = BIT(0), + .host_managed_cores_mask = BIT(0), + .ipc_req = CNL_DSP_REG_HIPCIDR, + .ipc_req_mask = CNL_DSP_REG_HIPCIDR_BUSY, + .ipc_ack = CNL_DSP_REG_HIPCIDA, + .ipc_ack_mask = CNL_DSP_REG_HIPCIDA_DONE, + .ipc_ctl = CNL_DSP_REG_HIPCCTL, + .rom_init_timeout = 300, + .ssp_count = ICL_SSP_COUNT, + .ssp_base_offset = CNL_SSP_BASE_OFFSET, +}; +EXPORT_SYMBOL_NS(adls_chip_info, SND_SOC_SOF_INTEL_HDA_COMMON); diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c index 8f62e3487dc1..f2a107481336 100644 --- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c @@ -284,6 +284,23 @@ static const struct sof_dev_desc jsl_desc = { }; #endif +#if IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE) +static const struct sof_dev_desc adls_desc = { + .machines = snd_soc_acpi_intel_hda_machines, + .resindex_lpe_base = 0, + .resindex_pcicfg_base = -1, + .resindex_imr_base = -1, + .irqindex_host_ipc = -1, + .resindex_dma_base = -1, + .chip_info = &adls_chip_info, + .default_fw_path = "intel/sof", + .default_tplg_path = "intel/sof-tplg", + .default_fw_filename = "sof-adl-s.ri", + .nocodec_tplg_filename = "sof-adl-nocodec.tplg", + .ops = &sof_tgl_ops, +}; +#endif + static const struct dev_pm_ops sof_pci_pm = { .prepare = snd_sof_prepare, .complete = snd_sof_complete, @@ -491,6 +508,10 @@ static const struct pci_device_id sof_pci_ids[] = { { PCI_DEVICE(0x8086, 0x4b58), .driver_data = (unsigned long)&ehl_desc}, #endif +#if IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE) + { PCI_DEVICE(0x8086, 0x7ad0), + .driver_data = (unsigned long)&adls_desc}, +#endif { 0, } }; MODULE_DEVICE_TABLE(pci, sof_pci_ids); |