alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: fix kconfig dependency warnings for SND_SOC_WM8731
@ 2020-09-18 13:12 Necip Fazil Yildiran
  2020-09-18 13:32 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Necip Fazil Yildiran @ 2020-09-18 13:12 UTC (permalink / raw)
  To: broonie; +Cc: paul, alsa-devel, jeho, linux-kernel, Necip Fazil Yildiran

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@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: fix kconfig dependency warnings for SND_SOC_WM8731
  2020-09-18 13:12 [PATCH] ASoC: fix kconfig dependency warnings for SND_SOC_WM8731 Necip Fazil Yildiran
@ 2020-09-18 13:32 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2020-09-18 13:32 UTC (permalink / raw)
  To: Necip Fazil Yildiran; +Cc: paul, alsa-devel, jeho, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 621 bytes --]

On Fri, Sep 18, 2020 at 04:12:58PM +0300, Necip Fazil Yildiran wrote:
> 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.

> Switch reverse dependencies on SND_SOC_WM8731 to normal dependencies.

No, this is very user hostile - users shouldn't have to know exactly
which chips a given machine driver needs to figure out how to get the
config option visible.  Please fix the selects in the machine driver
instead.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-21  8:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-18 13:12 [PATCH] ASoC: fix kconfig dependency warnings for SND_SOC_WM8731 Necip Fazil Yildiran
2020-09-18 13:32 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).