Skip to contentSkip to conversation

ASoC: fix unmet dependencies on GPIOLIB for SND_SOC_DMIC

PATCH RESEND In review Julian Braha 3 participants 6 messages Oct 27, 2021 – Oct 28, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 ASoC: fix unmet dependencies on GPIOLIB for SND_SOC_DMIC

When SND_SOC_AMD_RENOIR_MACH or SND_SOC_AMD_RV_RT5682_MACH are selected, and GPIOLIB is not selected, Kbuild gives the following warnings, respectively:

WARNING: unmet direct dependencies detected for SND_SOC_DMIC
Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && GPIOLIB [=n]
Selected by [y]:
- SND_SOC_AMD_RENOIR_MACH [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_AMD_RENOIR [=y]

and

WARNING: unmet direct dependencies detected for SND_SOC_MAX98357A
Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && GPIOLIB [=n]
Selected by [y]:
- SND_SOC_AMD_RV_RT5682_MACH [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_AMD_ACP3x [=y] && I2C [=y] && CROS_EC [=y]

This is because SND_SOC_DMIC and SND_SOC_MAX98357A are
selected by SND_SOC_AMD_RV_RT5682_MACH and SND_SOC_AMD_RENOIR_MACH, respectively. However, neither of the selectors depend on or select GPIOLIB, despite their selectees depending on GPIOLIB.

These unmet dependency bugs were detected by Kismet, a static analysis tool for Kconfig. Please advise if this is not the appropriate solution.

---
 sound/soc/amd/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/amd/Kconfig +2 -2
index 56e7c079deac..2c6af3f8f296 100644
@@ -38,7 +38,7 @@ config SND_SOC_AMD_RV_RT5682_MACH
 	select I2C_CROS_EC_TUNNEL
 	select SND_SOC_RT1015
 	select SND_SOC_RT1015P
-	depends on SND_SOC_AMD_ACP3x && I2C && CROS_EC
+	depends on SND_SOC_AMD_ACP3x && I2C && CROS_EC && GPIOLIB
 	help
 	 This option enables machine driver for RT5682 and MAX9835.
 
@@ -51,7 +51,7 @@ config SND_SOC_AMD_RENOIR
 config SND_SOC_AMD_RENOIR_MACH
 	tristate "AMD Renoir support for DMIC"
 	select SND_SOC_DMIC
-	depends on SND_SOC_AMD_RENOIR
+	depends on SND_SOC_AMD_RENOIR && GPIOLIB
 	help
 	 This option enables machine driver for DMIC
 

--
2.30.2

maintainer
#1 lore raw
Quoted 3 lines · Julian Braha

When SND_SOC_AMD_RENOIR_MACH or SND_SOC_AMD_RV_RT5682_MACH are selected, and GPIOLIB is not selected, Kbuild gives the following warnings, respectively:

I can't seem to find any indication that this has been sent before...

#2 lore raw
Quoted 7 lines · EDT you
Quoted 3 lines · Julian Braha

When SND_SOC_AMD_RENOIR_MACH or SND_SOC_AMD_RV_RT5682_MACH are selected, and GPIOLIB is not selected, Kbuild gives the following warnings, respectively:

I can't seem to find any indication that this has been sent before...

Hi Mark,

When I previously submitted this patch, I did not send it to all relevant maintainers. Also the subject line was flawed.
Here's the original:
https://lore.kernel.org/lkml/[email protected]/

- Julian Braha

maintainer
#3 lore raw
In reply to Julian Braha
Quoted 44 lines · Julian Braha

When SND_SOC_AMD_RENOIR_MACH or SND_SOC_AMD_RV_RT5682_MACH are selected, and GPIOLIB is not selected, Kbuild gives the following warnings, respectively:

WARNING: unmet direct dependencies detected for SND_SOC_DMIC
Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && GPIOLIB [=n]
Selected by [y]:
- SND_SOC_AMD_RENOIR_MACH [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_AMD_RENOIR [=y]

and

WARNING: unmet direct dependencies detected for SND_SOC_MAX98357A
Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && GPIOLIB [=n]
Selected by [y]:
- SND_SOC_AMD_RV_RT5682_MACH [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_AMD_ACP3x [=y] && I2C [=y] && CROS_EC [=y]

This is because SND_SOC_DMIC and SND_SOC_MAX98357A are
selected by SND_SOC_AMD_RV_RT5682_MACH and SND_SOC_AMD_RENOIR_MACH, respectively. However, neither of the selectors depend on or select GPIOLIB, despite their selectees depending on GPIOLIB.

These unmet dependency bugs were detected by Kismet, a static analysis tool for Kconfig. Please advise if this is not the appropriate solution.

---
 sound/soc/amd/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/amd/Kconfig +1 -1
index 56e7c079deac..2c6af3f8f296 100644
@@ -38,7 +38,7 @@ config SND_SOC_AMD_RV_RT5682_MACH
 	select I2C_CROS_EC_TUNNEL
 	select SND_SOC_RT1015
 	select SND_SOC_RT1015P
-	depends on SND_SOC_AMD_ACP3x && I2C && CROS_EC
+	depends on SND_SOC_AMD_ACP3x && I2C && CROS_EC && GPIOLIB
 	help
 	 This option enables machine driver for RT5682 and MAX9835.
 

sound/soc/amd/Kconfig config SND_SOC_AMD_RENOIR · line 54

Quoted 5 lines
sound/soc/amd/Kconfig +1 -1
@@ -51,7 +51,7 @@ config SND_SOC_AMD_RENOIR
 config SND_SOC_AMD_RENOIR_MACH
 	tristate "AMD Renoir support for DMIC"
 	select SND_SOC_DMIC
-	depends on SND_SOC_AMD_RENOIR
+	depends on SND_SOC_AMD_RENOIR && GPIOLIB

For Renoir platform, DMIC driver selected for registering codec dai with ASOC. No additional functionality handled related to GPIO. Do you still see necessity adding GPIOLIB dependency?

Quoted 6 lines
sound/soc/amd/Kconfig +0 -1
 	help
 	 This option enables machine driver for DMIC
 
--

2.30.2

#4 lore raw
Quoted 3 lines

For Renoir platform, DMIC driver selected for registering codec dai with ASOC. No additional functionality handled related to GPIO. Do you still see necessity adding GPIOLIB dependency?

Hi Vijendar,

While most users are unlikely to encounter this, we still do not want unmet dependency bugs in the build system. Adding the GPIOLIB dependency just ensures that nobody tries to build an "illegal configuration" of the kernel.

- Julian Braha

maintainer
#5 lore raw
In reply to Julian Braha
Quoted 10 lines · Julian Braha

When SND_SOC_AMD_RENOIR_MACH or SND_SOC_AMD_RV_RT5682_MACH are selected, and GPIOLIB is not selected, Kbuild gives the following warnings, respectively:

WARNING: unmet direct dependencies detected for SND_SOC_DMIC
Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && GPIOLIB [=n]
Selected by [y]:
- SND_SOC_AMD_RENOIR_MACH [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_SOC_AMD_RENOIR [=y]

[...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: fix unmet dependencies on GPIOLIB for SND_SOC_DMIC

      commit: 5c7dee4407dcd3522a133acdd90d64bf41d00986

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