ASoC: rt5575: Fix undefined references to SPI functions
PATCH 1/1 ASoC: rt5575: Fix undefined references to SPI functions
The kernel test robot reported the following build errors:
sparc64-linux-ld: sound/soc/codecs/rt5575.o: in function
`rt5575_fw_load_by_spi':
Quoted 1 line
Quoted 1 line
rt5575.c:(.text+0x254): undefined reference to
`rt5575_spi_get_device'
Quoted 1 line
Quoted 1 line
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.
Closes:
https://lore.kernel.org/oe-kbuild-all/[email protected]/
--- sound/soc/codecs/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/Kconfig +2 -2
@@ -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
Signature · 1 line
2.52.0
Mark Brown
maintainerQuoted 1 line · Oder Chiou
The kernel test robot reported the following build errors:
This breaks an x86 allmodconfig build:
ERROR: modpost: "rt5575_spi_fw_load" [sound/soc/codecs/snd-soc-rt5575.ko] undefi ned!
ERROR: modpost: "rt5575_spi_get_device" [sound/soc/codecs/snd-soc-rt5575.ko] und efined!
Quoted 13 lines
-----Original Message-----
From: Mark Brown <[email protected]>
Sent: Tuesday, January 27, 2026 5:22 AM
To: Oder Chiou <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; Flove(HsinFu) <[email protected]>; Shuming [范 書銘] <[email protected]>; Jack Yu <[email protected]>; Derek [方德 義] <[email protected]>; kernel test robot <[email protected]>
Subject: Re: [PATCH] ASoC: rt5575: Fix undefined references to SPI functionsQuoted 1 line · Oder Chiou
The kernel test robot reported the following build errors:
Quoted 8 lines
This breaks an x86 allmodconfig build:
ERROR: modpost: "
rt5575_spi_fw_load" [sound/soc/codecs/snd-soc-rt5575.ko] undefi
ned!
ERROR: modpost: "rt5575_spi_get_device" [sound/soc/codecs/snd-soc-rt5575.ko] und
efined!
I tried to reproduce the reported modpost error with make allmodconfig on my local machine, but the build passed successfully.
In my generated .config from allmodconfig, I have:CONFIG_SND_SOC_RT5575=m CONFIG_SND_SOC_RT5575_SPI=y
I also attempted to manually force CONFIG_SND_SOC_RT5575_SPI=m to see if that triggered the issue. However, Kbuild produced the following warning and automatically reverted it to 'y' (since it is a boolean in Kconfig):
.config:11393:warning: symbol value 'm' invalid for SND_SOC_RT5575_SPI
Could you please check if there might be a mismatch in the applied patches or a specific .config state I should be aware of? I want to make sure I am testing under the same conditions.
Thanks