[PATCH v2] ASoC: SOF: Intel: initial support to AlderLake-P
Add PCI id for the AlderLake-P.
Signed-off-by: Kai Vehmanen kai.vehmanen@linux.intel.com Reviewed-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com Reviewed-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Reviewed-by: Guennadi Liakhovetski guennadi.liakhovetski@linux.intel.com --- sound/soc/sof/sof-pci-dev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
V2 changes: - fix compile error if CONFIG_SND_SOC_SOF_TIGERLAKE=n and CONFIG_SND_SOC_SOF_ALDERLAKE is enabled
diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c index 63b989e3ec40..ebd58d49d570 100644 --- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c @@ -213,7 +213,7 @@ static const struct sof_dev_desc icl_desc = { }; #endif
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) +#if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) || IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE) static const struct sof_dev_desc tgl_desc = { .machines = snd_soc_acpi_intel_tgl_machines, .alt_machines = snd_soc_acpi_intel_tgl_sdw_machines, @@ -230,7 +230,9 @@ static const struct sof_dev_desc tgl_desc = { .nocodec_tplg_filename = "sof-tgl-nocodec.tplg", .ops = &sof_tgl_ops, }; +#endif
+#if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) static const struct sof_dev_desc tglh_desc = { .machines = snd_soc_acpi_intel_tgl_machines, .alt_machines = snd_soc_acpi_intel_tgl_sdw_machines, @@ -512,6 +514,8 @@ static const struct pci_device_id sof_pci_ids[] = { #if IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE) { PCI_DEVICE(0x8086, 0x7ad0), .driver_data = (unsigned long)&adls_desc}, + { PCI_DEVICE(0x8086, 0x51c8), + .driver_data = (unsigned long)&tgl_desc}, #endif { 0, } };
On Thu, 14 Jan 2021 12:55:58 +0100, Kai Vehmanen wrote:
Add PCI id for the AlderLake-P.
Signed-off-by: Kai Vehmanen kai.vehmanen@linux.intel.com Reviewed-by: Ranjani Sridharan ranjani.sridharan@linux.intel.com Reviewed-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Reviewed-by: Guennadi Liakhovetski guennadi.liakhovetski@linux.intel.com
sound/soc/sof/sof-pci-dev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
V2 changes:
- fix compile error if CONFIG_SND_SOC_SOF_TIGERLAKE=n and CONFIG_SND_SOC_SOF_ALDERLAKE is enabled
diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c index 63b989e3ec40..ebd58d49d570 100644 --- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c @@ -213,7 +213,7 @@ static const struct sof_dev_desc icl_desc = { }; #endif
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) +#if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) || IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE) static const struct sof_dev_desc tgl_desc = { .machines = snd_soc_acpi_intel_tgl_machines, .alt_machines = snd_soc_acpi_intel_tgl_sdw_machines,
I guess snd_soc_acpi_intel_tgl_* would be missing even by this patch alone if TIGERLAKE=n and ALDERLAKE=y.
IMO, the easiest fix would be to select CONFIG_SND_SOC_SOF_TIGERLAKE from CONFIG_SND_SOC_SOF_ALDERLAKE forcibly in Kconfig instead. Then no tweak of ifdef is needed.
thanks,
Takashi
Hi,
On Thu, 14 Jan 2021, Takashi Iwai wrote:
On Thu, 14 Jan 2021 12:55:58 +0100, Kai Vehmanen wrote:
--- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c
[...]
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) +#if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) || IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE) static const struct sof_dev_desc tgl_desc = { .machines = snd_soc_acpi_intel_tgl_machines, .alt_machines = snd_soc_acpi_intel_tgl_sdw_machines,
I guess snd_soc_acpi_intel_tgl_* would be missing even by this patch alone if TIGERLAKE=n and ALDERLAKE=y.
The ACPI matching tables soc-acpi-intel-match.h are not behind Kconfig ifdefs, so this is ok. I did actually test all the build combinations this time :) and the builds go through.
IMO, the easiest fix would be to select CONFIG_SND_SOC_SOF_TIGERLAKE from CONFIG_SND_SOC_SOF_ALDERLAKE forcibly in Kconfig instead. Then no tweak of ifdef is needed.
I'd rather keep this here. We may later update sof_dev_desc for ADL and no longer reuse tgl_desc, and then it's easier to cleanup if the #ifdef is only here, close to where the dependency is.
I too think the ifdefs are too finegrained, so maybe the next step is to just drop these, and/or reduce their number. We can review and discuss this when we refactor sof-pci-dev to address the concern Arnd raised.
Br, Kai
On Thu, 14 Jan 2021 14:45:10 +0100, Kai Vehmanen wrote:
Hi,
On Thu, 14 Jan 2021, Takashi Iwai wrote:
On Thu, 14 Jan 2021 12:55:58 +0100, Kai Vehmanen wrote:
--- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c
[...]
-#if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) +#if IS_ENABLED(CONFIG_SND_SOC_SOF_TIGERLAKE) || IS_ENABLED(CONFIG_SND_SOC_SOF_ALDERLAKE) static const struct sof_dev_desc tgl_desc = { .machines = snd_soc_acpi_intel_tgl_machines, .alt_machines = snd_soc_acpi_intel_tgl_sdw_machines,
I guess snd_soc_acpi_intel_tgl_* would be missing even by this patch alone if TIGERLAKE=n and ALDERLAKE=y.
The ACPI matching tables soc-acpi-intel-match.h are not behind Kconfig ifdefs, so this is ok. I did actually test all the build combinations this time :) and the builds go through.
IMO, the easiest fix would be to select CONFIG_SND_SOC_SOF_TIGERLAKE from CONFIG_SND_SOC_SOF_ALDERLAKE forcibly in Kconfig instead. Then no tweak of ifdef is needed.
I'd rather keep this here. We may later update sof_dev_desc for ADL and no longer reuse tgl_desc, and then it's easier to cleanup if the #ifdef is only here, close to where the dependency is.
I too think the ifdefs are too finegrained, so maybe the next step is to just drop these, and/or reduce their number. We can review and discuss this when we refactor sof-pci-dev to address the concern Arnd raised.
Fair enough. Thanks.
Takashi
On Thu, 14 Jan 2021 13:55:58 +0200, Kai Vehmanen wrote:
Add PCI id for the AlderLake-P.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: SOF: Intel: initial support to AlderLake-P commit: 39860fe070c97e62ae9e80addce40ce0b3c2b082
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
participants (3)
-
Kai Vehmanen
-
Mark Brown
-
Takashi Iwai