kselftest/alsa: pcm - move more configuration to configuration files
authorJaroslav Kysela <perex@perex.cz>
Tue, 27 Dec 2022 17:06:47 +0000 (17:06 +0000)
committerTakashi Iwai <tiwai@suse.de>
Mon, 2 Jan 2023 14:07:35 +0000 (15:07 +0100)
commit348d09fcd1b6ba455141882daf1d50ff33cd0bf8
tree4e1484104f83397cfd1ef538debd505671787adc
parentc48cafc241bff09d7ea682982ff96d532e64e2ed
kselftest/alsa: pcm - move more configuration to configuration files

Obtain all test parameters from the configuration files. The defaults
are defined in the pcm-test.conf file. The test count and parameters
may be variable per specific hardware.

Also, handle alt_formats field now (with the fixes in the format loop).
It replaces the original "automatic" logic which is not so universal.

The code may be further extended to skip various tests based
on the configuration hints, if the exact PCM hardware parameters
are not available for the given hardware.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20221208-alsa-pcm-test-hacks-v4-2-5a152e65b1e1@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
tools/testing/selftests/alsa/Makefile
tools/testing/selftests/alsa/alsa-local.h
tools/testing/selftests/alsa/conf.c
tools/testing/selftests/alsa/conf.d/Lenovo_ThinkPad_P1_Gen2.conf
tools/testing/selftests/alsa/pcm-test.c
tools/testing/selftests/alsa/pcm-test.conf [new file with mode: 0644]