All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: hda: fix SND_INTEL_DSP_CONFIG dependency
@ 2021-01-03 13:52 ` Arnd Bergmann
  0 siblings, 0 replies; 32+ messages in thread
From: Arnd Bergmann @ 2021-01-03 13:52 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown
  Cc: Arnd Bergmann, Jaroslav Kysela, Takashi Iwai,
	Pierre-Louis Bossart, Ranjani Sridharan, Kai Vehmanen,
	Daniel Baluta, alsa-devel, linux-kernel, sound-open-firmware

From: Arnd Bergmann <arnd@arndb.de>

The sof-pci-dev driver fails to link when built into the kernel
and CONFIG_SND_INTEL_DSP_CONFIG is set to =m:

arm-linux-gnueabi-ld: sound/soc/sof/sof-pci-dev.o: in function `sof_pci_probe':
sof-pci-dev.c:(.text+0x1c): undefined reference to `snd_intel_dsp_driver_probe'

All other drivers using this interface already use a 'select
SND_INTEL_DSP_CONFIG' statement to force the it to be present, so it
seems reasonable to do the same here.

The stub implementation in the header makes the problem harder to find,
as it avoids the link error when SND_INTEL_DSP_CONFIG is completely
disabled, without any obvious upsides. Remove these stubs to make it
clearer that the driver is in fact needed here.

Fixes: 82d9d54a6c0e ("ALSA: hda: add Intel DSP configuration / probe code")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/sound/intel-dsp-config.h | 17 -----------------
 sound/soc/sof/Kconfig            |  2 ++
 2 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/include/sound/intel-dsp-config.h b/include/sound/intel-dsp-config.h
index d4609077c258..94667e870029 100644
--- a/include/sound/intel-dsp-config.h
+++ b/include/sound/intel-dsp-config.h
@@ -18,24 +18,7 @@ enum {
 	SND_INTEL_DSP_DRIVER_LAST = SND_INTEL_DSP_DRIVER_SOF
 };
 
-#if IS_ENABLED(CONFIG_SND_INTEL_DSP_CONFIG)
-
 int snd_intel_dsp_driver_probe(struct pci_dev *pci);
 int snd_intel_acpi_dsp_driver_probe(struct device *dev, const u8 acpi_hid[ACPI_ID_LEN]);
 
-#else
-
-static inline int snd_intel_dsp_driver_probe(struct pci_dev *pci)
-{
-	return SND_INTEL_DSP_DRIVER_ANY;
-}
-
-static inline
-int snd_intel_acpi_dsp_driver_probe(struct device *dev, const u8 acpi_hid[ACPI_ID_LEN])
-{
-	return SND_INTEL_DSP_DRIVER_ANY;
-}
-
-#endif
-
 #endif
diff --git a/sound/soc/sof/Kconfig b/sound/soc/sof/Kconfig
index 031dad5fc4c7..051fd3d27047 100644
--- a/sound/soc/sof/Kconfig
+++ b/sound/soc/sof/Kconfig
@@ -12,6 +12,7 @@ if SND_SOC_SOF_TOPLEVEL
 config SND_SOC_SOF_PCI
 	tristate "SOF PCI enumeration support"
 	depends on PCI
+	select SND_INTEL_DSP_CONFIG
 	select SND_SOC_SOF
 	select SND_SOC_ACPI if ACPI
 	help
@@ -23,6 +24,7 @@ config SND_SOC_SOF_PCI
 config SND_SOC_SOF_ACPI
 	tristate "SOF ACPI enumeration support"
 	depends on ACPI || COMPILE_TEST
+	select SND_INTEL_DSP_CONFIG
 	select SND_SOC_SOF
 	select SND_SOC_ACPI if ACPI
 	select IOSF_MBI if X86 && PCI
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2021-01-12 21:58 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-03 13:52 [PATCH] ALSA: hda: fix SND_INTEL_DSP_CONFIG dependency Arnd Bergmann
2021-01-03 13:52 ` Arnd Bergmann
2021-01-04 14:09 ` Takashi Iwai
2021-01-04 14:09   ` Takashi Iwai
2021-01-04 14:13   ` Mark Brown
2021-01-04 14:13     ` Mark Brown
2021-01-04 15:00 ` Jaroslav Kysela
2021-01-04 15:00   ` Jaroslav Kysela
2021-01-04 15:05   ` Takashi Iwai
2021-01-04 15:05     ` Takashi Iwai
2021-01-05 13:43     ` Arnd Bergmann
2021-01-05 13:43       ` Arnd Bergmann
2021-01-05 15:39       ` Kai Vehmanen
2021-01-05 15:39         ` Kai Vehmanen
2021-01-05 19:06         ` Arnd Bergmann
2021-01-05 19:06           ` Arnd Bergmann
2021-01-05 19:07           ` [PATCH] ASoC: SOF: Intel: avoid reverse module dependency Arnd Bergmann
2021-01-05 19:07             ` Arnd Bergmann
2021-01-06  9:30             ` Arnd Bergmann
2021-01-06  9:30               ` Arnd Bergmann
2021-01-07 11:45               ` Kai Vehmanen
2021-01-07 11:45                 ` Kai Vehmanen
2021-01-11 19:54             ` Pierre-Louis Bossart
2021-01-11 19:54               ` Pierre-Louis Bossart
2021-01-12 13:55               ` Takashi Iwai
2021-01-12 13:55                 ` Takashi Iwai
2021-01-12 20:17                 ` [Sound-open-firmware] " Pierre-Louis Bossart
2021-01-12 20:17                   ` Pierre-Louis Bossart
2021-01-12 20:31                   ` Arnd Bergmann
2021-01-12 20:31                     ` Arnd Bergmann
2021-01-05 13:30   ` [PATCH] ALSA: hda: fix SND_INTEL_DSP_CONFIG dependency Arnd Bergmann
2021-01-05 13:30     ` Arnd Bergmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.