* [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
* Re: [PATCH] ASoC: rt5575: Fix undefined references to SPI functions
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
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2026-01-26 21:22 UTC (permalink / raw)
To: Oder Chiou
Cc: lgirdwood, linux-sound, alsa-devel, flove, shumingf, jack.yu,
derek.fang, kernel test robot
[-- Attachment #1: Type: text/plain, Size: 338 bytes --]
On Mon, Jan 26, 2026 at 01:17:58PM +0800, Oder Chiou wrote:
> 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!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] ASoC: rt5575: Fix undefined references to SPI functions
2026-01-26 21:22 ` Mark Brown
@ 2026-01-28 5:02 ` Oder Chiou
0 siblings, 0 replies; 3+ messages in thread
From: Oder Chiou @ 2026-01-28 5:02 UTC (permalink / raw)
To: Mark Brown
Cc: lgirdwood@gmail.com, linux-sound@vger.kernel.org, Flove(HsinFu),
Shuming [范書銘], Jack Yu,
Derek [方德義]
> -----Original Message-----
> From: Mark Brown <broonie@kernel.org>
> Sent: Tuesday, January 27, 2026 5:22 AM
> To: Oder Chiou <oder_chiou@realtek.com>
> Cc: lgirdwood@gmail.com; linux-sound@vger.kernel.org;
> alsa-devel@alsa-project.org; Flove(HsinFu) <flove@realtek.com>; Shuming [范
> 書銘] <shumingf@realtek.com>; Jack Yu <jack.yu@realtek.com>; Derek [方德
> 義] <derek.fang@realtek.com>; kernel test robot <lkp@intel.com>
> Subject: Re: [PATCH] ASoC: rt5575: Fix undefined references to SPI functions
>
> On Mon, Jan 26, 2026 at 01:17:58PM +0800, Oder Chiou wrote:
> > 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!
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
^ permalink raw reply [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