Re: [PATCH] ASoC: Intel: boards: Fix CONFIG_SND_SOC_SDW_MOCKUP select

From: Pierre-Louis Bossart
Date: Mon Aug 02 2021 - 17:05:24 EST




On 8/2/21 2:03 PM, Nathan Chancellor wrote:
> When CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH is enabled without
> CONFIG_EXPERT, there is a Kconfig warning about unmet dependencies:
>
> WARNING: unmet direct dependencies detected for SND_SOC_SDW_MOCKUP
> Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] &&
> EXPERT [=n] && SOUNDWIRE [=y]
> Selected by [y]:
> - SND_SOC_INTEL_SOUNDWIRE_SOF_MACH [=y] && ...
>
> Selecting a symbol does not account for dependencies so if symbol A
> selects symbol B which depends on symbol C, symbol B or its select of
> symbol A should depend on symbol C as well.
>
> Make the CONFIG_SND_SOC_SDW_MOCKUP select in
> CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH depend on CONFIG_EXPERT as the
> help text for CONFIG_SND_SOC_SDW_MOCKUP indicates it is intended to be a
> development option.
>
> Fixes: 0ccac3bcf356 ("ASoC: Intel: boards: sof_sdw: add SoundWire mockup codecs for tests")
> Signed-off-by: Nathan Chancellor <nathan@xxxxxxxxxx>
> ---
>
> An alternative here is if CONFIG_SND_SOC_INTEL_SOUNDWIRE_SOF_MACH wants
> to unconditionally select CONFIG_SND_SOC_SDW_MOCKUP, the "depends on
> EXPERT" can be moved to the prompt (tristate "..." if EXPERT). I am
> happy to send a new patch if that is what is desired.

Thanks for the patch Nathan, I added this depends on EXPERT and forgot
about it when I updated the machine driver.

Maybe a better alternate would be

imply SND_SOC_SDW_MOCKUP

We don't necessarily want the EXPERT part to be shown in the machine
driver lists.


>
> sound/soc/intel/boards/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig
> index 046955bf717c..8284c46d7435 100644
> --- a/sound/soc/intel/boards/Kconfig
> +++ b/sound/soc/intel/boards/Kconfig
> @@ -602,7 +602,7 @@ config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH
> select SND_SOC_DMIC
> select SND_SOC_INTEL_HDA_DSP_COMMON
> select SND_SOC_INTEL_SOF_MAXIM_COMMON
> - select SND_SOC_SDW_MOCKUP
> + select SND_SOC_SDW_MOCKUP if EXPERT
> help
> Add support for Intel SoundWire-based platforms connected to
> MAX98373, RT700, RT711, RT1308 and RT715
>
> base-commit: 170c0d7460fc4aa522995ae4096b5a442f50a1fc
>