]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ASoC: wm_adsp: select CONFIG_SND_SOC_WM_ADSP from all users
authorArnd Bergmann <arnd@arndb.de>
Fri, 20 Mar 2026 15:17:31 +0000 (16:17 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 23 Mar 2026 14:36:01 +0000 (14:36 +0000)
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>
Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260320151752.3439218-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/Kconfig

index f9e6a83e55c6be7e68a64e6e0defb34c9e470919..d6104796db4f603e73ce37dac27923bc507c3ac5 100644 (file)
@@ -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