summaryrefslogtreecommitdiff
path: root/sound/pci/hda/Kconfig
diff options
context:
space:
mode:
authorRichard Fitzgerald <rf@opensource.cirrus.com>2023-09-18 12:51:29 +0300
committerTakashi Iwai <tiwai@suse.de>2023-09-18 18:49:28 +0300
commit2144833e7b41459fa2d52bb0676f0ab4920cf32c (patch)
tree24a44f3394dd2f14c63869fabc6675e62273525d /sound/pci/hda/Kconfig
parent6f03b446cbaeb3187b1df1e7e8b13c6340cd6c68 (diff)
downloadlinux-2144833e7b41459fa2d52bb0676f0ab4920cf32c.tar.xz
ALSA: hda: cirrus_scodec: Add KUnit test
Add a KUnit test for cirrus_scodec_get_speaker_id(). It is impractical to have enough hardware with every possible permutation of speaker id. So use a test harness to test all theoretically supported options. The test harness consists of: - a mock GPIO controller. - a mock struct device to represent the scodec driver - software nodes to provide the fwnode info that would normally come from ACPI. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230918095129.440-3-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/Kconfig')
-rw-r--r--sound/pci/hda/Kconfig12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig
index 2980bfef0a4c..706cdc589e6f 100644
--- a/sound/pci/hda/Kconfig
+++ b/sound/pci/hda/Kconfig
@@ -94,6 +94,18 @@ config SND_HDA_PATCH_LOADER
config SND_HDA_CIRRUS_SCODEC
tristate
+config SND_HDA_CIRRUS_SCODEC_KUNIT_TEST
+ tristate "KUnit test for Cirrus side-codec library" if !KUNIT_ALL_TESTS
+ select SND_HDA_CIRRUS_SCODEC
+ depends on KUNIT
+ default KUNIT_ALL_TESTS
+ help
+ This builds KUnit tests for the cirrus side-codec library.
+ For more information on KUnit and unit tests in general,
+ please refer to the KUnit documentation in
+ Documentation/dev-tools/kunit/.
+ If in doubt, say "N".
+
config SND_HDA_SCODEC_CS35L41
tristate
select SND_HDA_GENERIC