selftests: alsa - add PCM test
Subsystems (3)
Jaroslav Kysela
maintainerRFC PATCH 1/1 selftests: alsa - add PCM test
This initial code does a simple sample transfer tests. By default, all PCM devices are detected and tested with short and long buffering parameters for 4 seconds. If the sample transfer timing is not in a +-100ms boundary, the test fails. Only the interleaved buffering scheme is supported in this version.
The configuration may be modified with the configuration files. A specific hardware configuration is detected and activated using the sysfs regex matching. This allows to use the DMI string (/sys/class/dmi/id/* tree) or any other system parameters exposed in sysfs for the matching for the CI automation.
The configuration file may also specify the PCM device list to detect the missing PCM devices.
--- tools/testing/selftests/alsa/Makefile | 4 +- tools/testing/selftests/alsa/conf.c | 379 +++++++++++++ .../alsa/conf.d/Lenovo_ThinkPad_P1_Gen2.conf | 76 +++ tools/testing/selftests/alsa/pcm-test.c | 523 ++++++++++++++++++ 4 files changed, 981 insertions(+), 1 deletion(-) create mode 100644 tools/testing/selftests/alsa/conf.c create mode 100644 tools/testing/selftests/alsa/conf.d/Lenovo_ThinkPad_P1_Gen2.conf create mode 100644 tools/testing/selftests/alsa/pcm-test.c
tools/testing/selftests/alsa/Makefile +3 -1
@@ -7,6 +7,8 @@ ifeq ($(LDLIBS),) LDLIBS += -lasound endif -TEST_GEN_PROGS := mixer-test +TEST_GEN_PROGS := mixer-test pcm-test + +pcm-test: pcm-test.c conf.c include ../lib.mk
tools/testing/selftests/alsa/conf.c new file +379 -0
379 lines not on this page · raw message
tools/testing/selftests/alsa/conf.d/Lenovo_ThinkPad_P1_Gen2.conf new file +76 -0
76 lines not on this page · raw message
tools/testing/selftests/alsa/pcm-test.c new file +523 -0
523 lines not on this page · raw message
Signature · 1 line
2.35.3