From: Oder Chiou <oder_chiou@realtek.com>
To: <broonie@kernel.org>, <lgirdwood@gmail.com>
Cc: <linux-sound@vger.kernel.org>, <alsa-devel@alsa-project.org>,
<flove@realtek.com>, <shumingf@realtek.com>,
<jack.yu@realtek.com>, <derek.fang@realtek.com>,
Oder Chiou <oder_chiou@realtek.com>,
"kernel test robot" <lkp@intel.com>
Subject: [PATCH] ASoC: rt5575: Fix undefined references to SPI functions
Date: Mon, 26 Jan 2026 13:17:58 +0800 [thread overview]
Message-ID: <20260126051758.3728312-1-oder_chiou@realtek.com> (raw)
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
next reply other threads:[~2026-01-26 5:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 5:17 Oder Chiou [this message]
2026-01-26 21:22 ` [PATCH] ASoC: rt5575: Fix undefined references to SPI functions Mark Brown
2026-01-28 5:02 ` Oder Chiou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260126051758.3728312-1-oder_chiou@realtek.com \
--to=oder_chiou@realtek.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=derek.fang@realtek.com \
--cc=flove@realtek.com \
--cc=jack.yu@realtek.com \
--cc=lgirdwood@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=lkp@intel.com \
--cc=shumingf@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox