ASoC: wm_adsp: select CONFIG_SND_SOC_WM_ADSP from all users
PATCH 1/1 ASoC: wm_adsp: select CONFIG_SND_SOC_WM_ADSP from all users
From: Arnd Bergmann <[email protected]>
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.
--- sound/soc/codecs/Kconfig | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-)
sound/soc/codecs/Kconfig +9 -22
@@ -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
Signature · 1 line
2.39.5
Quoted 6 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The addition of the kunit test made it possible to enable the
WM_ADSPdriver 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:
Sorry, I never thought of people intentionally disabling it just because they can in a KUnit build.
Quoted 3 lines
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.
The unusual defaulting is because old kernels didn't support nested selects. So when the machine driver selected the codec driver, any selects in the codec driver would be ignored. The defaults were a workaround.
Quoted 3 lines
Fixes bf2d44d07de7 ("ASoC: wm_adsp: Add kunit test for firmware file search")Signed-off-by Arnd Bergmann <[email protected]>
Mark Brown
maintainerQuoted 1 line · Arnd Bergmann
ASoC:
wm_adsp: selectCONFIG_SND_SOC_WM_ADSPfrom all users
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.1
Thanks!
[1/1] ASoC: wm_adsp: select CONFIG_SND_SOC_WM_ADSP from all users
https://git.kernel.org/broonie/sound/c/e3f1ce073a0d
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark