]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: hda/cirrus_scodec: Make Kconfig visible if KUNIT
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Thu, 9 Jul 2026 12:12:24 +0000 (13:12 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 9 Jul 2026 16:34:21 +0000 (18:34 +0200)
commitf86a7c96406d406a66f3d7653eca86aa576fcf6b
tree16517de905084aeb875444b881dae6b1c31c44f5
parentd595255241e5fec0c94adeebf2565524398e37c5
ALSA: hda/cirrus_scodec: Make Kconfig visible if KUNIT

Make the Kconfig item for cirrus_scodec visible if CONFIG_KUNIT is
enabled. This is so that its KUnit test can be enabled by KUnit
scripts without requiring a large amount of irrelevant additional
components.

The general rule for KUNIT_ALL_TESTS is that it should only enable
tests for components that are already selected. However, the UML
environment does not support ACPI, which means the HDA codec drivers
that use cirrus_scodec cannot be selected. But cirrus_scodec does not
need ACPI.

By making the Kconfig option visible if CONFIG_KUNIT, the KUnit test
can be enabled with only the minimal set of functionality that is
required for cirrus_scodec.

This is still compliant with the KUNIT_ALL_TESTS rule "only tests
for enabled modules" because by default cirrus_scodec will only be
enabled if the drivers that use it are enabled. It must be
intentionally enabled to force it to be included for testing.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260709121224.614350-1-rf@opensource.cirrus.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/hda/codecs/side-codecs/Kconfig