samples/Kconfig: fix dependency on top-level CONFIG_SAMPLES

Don't be creative with weird "visible if" syntax.  Simply don't include
sub-Kconfig when the top-level option is disabled.

This removes "backdoors" like:

  -DCONFIG_SAMPLE_SMART_AMP=y -DCONFIG_SAMPLES=n

"In Rome, do as the Romans do"

Fixes commit 03b80eaf44 ("audio: move test components into the
src/samples/audio dir")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2023-11-01 00:27:17 +00:00 committed by Kai Vehmanen
parent f76d9828aa
commit fd57885599
2 changed files with 4 additions and 1 deletions

View File

@ -8,6 +8,10 @@ config SAMPLES
help
Select to build sample code
if SAMPLES
rsource "audio/Kconfig"
endif
endmenu

View File

@ -1,7 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
menu "Audio component samples"
visible if SAMPLES
config SAMPLE_SMART_AMP
depends on CAVS || ACE