[PATCH] ASoC: fix kconfig dependency warnings for SND_SOC_WM8731

From: Necip Fazil Yildiran
Date: Fri Sep 18 2020 - 09:14:11 EST


SND_SOC_WM8731 was made visible and dependent on other symbols with commit
1291e14175e6 ("ASoC: codecs: Make OF supported CODECs visible in Kconfig").
To this respect, the symbols selecting SND_SOC_WM8731 turned out to be
overlooking its dependencies.

For example, enabling SND_SOC_DB1200 and disabling SND_SOC_I2C_AND_SPI
results in the following Kconfig warning since SND_SOC_DB1200 selects
SND_SOC_WM8731 but does not account for its dependencies:

WARNING: unmet direct dependencies detected for SND_SOC_WM8731
Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_I2C_AND_SPI [=n]
Selected by [y]:
- SND_SOC_DB1200 [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_AU1XPSC [=y]

Switch reverse dependencies on SND_SOC_WM8731 to normal dependencies.

Fixes: 1291e14175e6 ("ASoC: codecs: Make OF supported CODECs visible in Kconfig")
Signed-off-by: Necip Fazil Yildiran <fazilyildiran@xxxxxxxxx>
---
sound/soc/atmel/Kconfig | 7 +++----
sound/soc/au1x/Kconfig | 3 +--
sound/soc/pxa/Kconfig | 4 ++--
3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/sound/soc/atmel/Kconfig b/sound/soc/atmel/Kconfig
index 71f2d42188c4..abb1284835c0 100644
--- a/sound/soc/atmel/Kconfig
+++ b/sound/soc/atmel/Kconfig
@@ -44,8 +44,8 @@ config SND_AT91_SOC_SAM9G20_WM8731
tristate "SoC Audio support for WM8731-based At91sam9g20 evaluation board"
depends on ARCH_AT91 || COMPILE_TEST
depends on ATMEL_SSC && SND_SOC_I2C_AND_SPI
+ depends on SND_SOC_WM8731
select SND_ATMEL_SOC_SSC_PDC
- select SND_SOC_WM8731
help
Say Y if you want to add support for SoC audio on WM8731-based
AT91sam9g20 evaluation board.
@@ -64,8 +64,8 @@ config SND_AT91_SOC_SAM9X5_WM8731
tristate "SoC Audio support for WM8731-based at91sam9x5 board"
depends on ARCH_AT91 || COMPILE_TEST
depends on ATMEL_SSC && SND_SOC_I2C_AND_SPI
+ depends on SND_SOC_WM8731
select SND_ATMEL_SOC_SSC_DMA
- select SND_SOC_WM8731
help
Say Y if you want to add support for audio SoC on an
at91sam9x5 based board that is using WM8731 codec.
@@ -110,8 +110,7 @@ config SND_ATMEL_SOC_I2S
config SND_SOC_MIKROE_PROTO
tristate "Support for Mikroe-PROTO board"
depends on OF
- depends on SND_SOC_I2C_AND_SPI
- select SND_SOC_WM8731
+ depends on SND_SOC_I2C_AND_SPI && SND_SOC_WM8731
help
Say Y or M if you want to add support for MikroElektronika PROTO Audio
Board. This board contains the WM8731 codec, which can be configured
diff --git a/sound/soc/au1x/Kconfig b/sound/soc/au1x/Kconfig
index 38de7c0efbc7..749e59fddfcd 100644
--- a/sound/soc/au1x/Kconfig
+++ b/sound/soc/au1x/Kconfig
@@ -53,12 +53,11 @@ config SND_SOC_DB1000

config SND_SOC_DB1200
tristate "DB1200/DB1300/DB1550 Audio support"
- depends on SND_SOC_AU1XPSC
+ depends on SND_SOC_AU1XPSC && SND_SOC_WM8731
select SND_SOC_AU1XPSC_AC97
select SND_SOC_AC97_CODEC
select SND_SOC_WM9712
select SND_SOC_AU1XPSC_I2S
- select SND_SOC_WM8731
help
Select this option to enable audio (AC97 and I2S) on the
Alchemy/AMD/RMI/NetLogic Db1200, Db1550 and Db1300 evaluation boards.
diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig
index 0ac85eada75c..eeb1dde59468 100644
--- a/sound/soc/pxa/Kconfig
+++ b/sound/soc/pxa/Kconfig
@@ -44,8 +44,8 @@ config SND_MMP_SOC_SSPA
config SND_PXA2XX_SOC_CORGI
tristate "SoC Audio support for Sharp Zaurus SL-C7x0"
depends on SND_PXA2XX_SOC && PXA_SHARP_C7xx && I2C
+ depends on SND_SOC_WM8731
select SND_PXA2XX_SOC_I2S
- select SND_SOC_WM8731
help
Say Y if you want to add support for SoC audio on Sharp
Zaurus SL-C7x0 models (Corgi, Shepherd, Husky).
@@ -70,8 +70,8 @@ config SND_PXA2XX_SOC_Z2
config SND_PXA2XX_SOC_POODLE
tristate "SoC Audio support for Poodle"
depends on SND_PXA2XX_SOC && MACH_POODLE && I2C
+ depends on SND_SOC_WM8731
select SND_PXA2XX_SOC_I2S
- select SND_SOC_WM8731
help
Say Y if you want to add support for SoC audio on Sharp
Zaurus SL-5600 model (Poodle).
--
2.25.1