From: Arnd Bergmann <arnd@kernel.org>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>,
ChiYuan Huang <cy_huang@richtek.com>,
Zhang Yi <zhangyi@everest-semi.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ASoC: wm_adsp: select CONFIG_SND_SOC_WM_ADSP from all users
Date: Fri, 20 Mar 2026 16:17:31 +0100 [thread overview]
Message-ID: <20260320151752.3439218-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
The addition of the kunit test made it possible to enable the WM_ADSP
driver even when there are no users. However, an unintended side-effect
was that it is also possible to turn it off when it is actually required,
leading to build failures:
ERROR: modpost: "wm_halo_init" [sound/soc/codecs/snd-soc-cs35l45.ko] undefined!
ERROR: modpost: "wm_adsp2_remove" [sound/soc/codecs/snd-soc-cs35l45.ko] undefined!
ERROR: modpost: "wm_adsp_hibernate" [sound/soc/codecs/snd-soc-cs35l45.ko] undefined!
ERROR: modpost: "wm_adsp2_component_probe" [sound/soc/codecs/snd-soc-cs35l45.ko] undefined!
Reverse the logic to replace the ununual list of 'default y if ....' with
the regular 'select' that do the same thing but prevent it from being
disabled if that would break the build.
Fixes: bf2d44d07de7 ("ASoC: wm_adsp: Add kunit test for firmware file search")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
sound/soc/codecs/Kconfig | 31 +++++++++----------------------
1 file changed, 9 insertions(+), 22 deletions(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index f9e6a83e55c6..d6104796db4f 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -401,28 +401,6 @@ config SND_SOC_WM_ADSP
tristate "Cirrus Logic wm_adsp driver" if KUNIT
select FW_CS_DSP
select SND_SOC_COMPRESS
- default y if SND_SOC_MADERA=y
- default y if SND_SOC_CS47L24=y
- default y if SND_SOC_WM5102=y
- default y if SND_SOC_WM5110=y
- default y if SND_SOC_WM2200=y
- default y if SND_SOC_CS35L41_SPI=y
- default y if SND_SOC_CS35L41_I2C=y
- default y if SND_SOC_CS35L45_SPI=y
- default y if SND_SOC_CS35L45_I2C=y
- default y if SND_SOC_CS35L56=y
- default y if SND_SOC_CS48L32=y
- default m if SND_SOC_MADERA=m
- default m if SND_SOC_CS47L24=m
- default m if SND_SOC_WM5102=m
- default m if SND_SOC_WM5110=m
- default m if SND_SOC_WM2200=m
- default m if SND_SOC_CS35L41_SPI=m
- default m if SND_SOC_CS35L41_I2C=m
- default m if SND_SOC_CS35L45_SPI=m
- default m if SND_SOC_CS35L45_I2C=m
- default m if SND_SOC_CS35L56=m
- default m if SND_SOC_CS48L32=m
config SND_SOC_WM_ADSP_TEST
tristate "KUnit tests for Cirrus Logic wm_adsp" if !KUNIT_ALL_TESTS
@@ -834,6 +812,7 @@ config SND_SOC_CS35L41_LIB
config SND_SOC_CS35L41
tristate
+ select SND_SOC_WM_ADSP
config SND_SOC_CS35L41_SPI
tristate "Cirrus Logic CS35L41 CODEC (SPI)"
@@ -852,6 +831,7 @@ config SND_SOC_CS35L41_I2C
config SND_SOC_CS35L45
tristate
select REGMAP_IRQ
+ select SND_SOC_WM_ADSP
config SND_SOC_CS35L45_SPI
tristate "Cirrus Logic CS35L45 CODEC (SPI)"
@@ -875,6 +855,7 @@ config SND_SOC_CS35L45_I2C
config SND_SOC_CS35L56
tristate
+ select SND_SOC_WM_ADSP
config SND_SOC_CS35L56_SHARED
select SND_SOC_CS_AMP_LIB
@@ -1112,6 +1093,7 @@ config SND_SOC_CS47L15
config SND_SOC_CS47L24
tristate
depends on MFD_CS47L24 && MFD_ARIZONA
+ select SND_SOC_WM_ADSP
config SND_SOC_CS47L35
tristate
@@ -1133,6 +1115,7 @@ config SND_SOC_CS48L32
tristate "Cirrus Logic CS48L32 audio DSP"
depends on SPI_MASTER
select REGMAP_SPI
+ select SND_SOC_WM_ADSP
help
Build the codec driver for the Cirrus Logic CS48L32 audio DSP.
@@ -1391,6 +1374,7 @@ config SND_SOC_LOCHNAGAR_SC
config SND_SOC_MADERA
tristate
+ select SND_SOC_WM_ADSP
default y if SND_SOC_CS47L15=y
default y if SND_SOC_CS47L35=y
default y if SND_SOC_CS47L85=y
@@ -2489,6 +2473,7 @@ config SND_SOC_WM2000
config SND_SOC_WM2200
tristate
depends on I2C
+ select SND_SOC_WM_ADSP
config SND_SOC_WM5100
tristate
@@ -2497,10 +2482,12 @@ config SND_SOC_WM5100
config SND_SOC_WM5102
tristate
depends on MFD_WM5102 && MFD_ARIZONA
+ select SND_SOC_WM_ADSP
config SND_SOC_WM5110
tristate
depends on MFD_WM5110 && MFD_ARIZONA
+ select SND_SOC_WM_ADSP
config SND_SOC_WM8350
tristate
--
2.39.5
next reply other threads:[~2026-03-20 15:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 15:17 Arnd Bergmann [this message]
2026-03-23 9:57 ` [PATCH] ASoC: wm_adsp: select CONFIG_SND_SOC_WM_ADSP from all users Richard Fitzgerald
2026-03-23 14:37 ` Mark Brown
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=20260320151752.3439218-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=cy_huang@richtek.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=rf@opensource.cirrus.com \
--cc=srinivas.kandagatla@oss.qualcomm.com \
--cc=tiwai@suse.com \
--cc=zhangyi@everest-semi.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