Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ASoC: rt5575: Fix undefined references to SPI functions
@ 2026-01-26  5:17 Oder Chiou
  2026-01-26 21:22 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Oder Chiou @ 2026-01-26  5:17 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: linux-sound, alsa-devel, flove, shumingf, jack.yu, derek.fang,
	Oder Chiou, kernel test robot

The kernel test robot reported the following build errors:

   sparc64-linux-ld: sound/soc/codecs/rt5575.o: in function
`rt5575_fw_load_by_spi':
>> rt5575.c:(.text+0x254): undefined reference to
`rt5575_spi_get_device'
>> sparc64-linux-ld: rt5575.c:(.text+0x2c0): undefined reference to
`rt5575_spi_fw_load'

This happens because SND_SOC_RT5575_SPI is defined as a tristate. It
allows a configuration where the main driver (SND_SOC_RT5575) is
built-in (=y), but the SPI support is compiled as a module (=m). Since
the main driver calls symbols defined in the SPI support code, the
linker fails to resolve them.

To fix this, change SND_SOC_RT5575_SPI to a bool. This ensures that the
SPI support code is always linked into the main driver object,
preventing the symbol visibility issue. Also remove the redundant
dependency on I2C.

Reported-by: kernel test robot <lkp@intel.com>
Closes:
https://lore.kernel.org/oe-kbuild-all/202601250010.EUnVkmCH-lkp@intel.com/
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
---
 sound/soc/codecs/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index d09de0ff5f22..ccdb3d0c2415 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1807,8 +1807,8 @@ config SND_SOC_RT5575
 	depends on I2C
 
 config SND_SOC_RT5575_SPI
-	tristate "Realtek ALC5575 Codec - SPI"
-	depends on SPI_MASTER && I2C
+	bool "Realtek ALC5575 Codec - SPI"
+	depends on SPI_MASTER
 	depends on SND_SOC_RT5575
 
 config SND_SOC_RT5616
-- 
2.52.0


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

end of thread, other threads:[~2026-01-28  5:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-26  5:17 [PATCH] ASoC: rt5575: Fix undefined references to SPI functions Oder Chiou
2026-01-26 21:22 ` Mark Brown
2026-01-28  5:02   ` Oder Chiou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox