selftests/alsa: Add a test for the sequencer UMP conversion of RPN/NRPN
Subsystems (3)
PATCH 1/1 selftests/alsa: Add a test for the sequencer UMP conversion of RPN/NRPN
The sequencer converts MIDI 1.0 CC and CONTROL14 events to UMP for UMP clients. Add a test that sends such events from a legacy client to a UMP MIDI 2.0 client and checks the RPN/NRPN packets it receives, and one that checks that a UMP MIDI 1.0 client gets the CCs as they are.
The cases cover switching between RPN and NRPN, Data Entry sent with nothing selected, repeated Data Entry, Null RPN and NRPN, and the CONTROL14 path. Some of them come from the KUnit test in Alyandra Zahran Nadhir's patch.
The test skips when /dev/snd/seq can't be opened or the kernel has no UMP support in the sequencer.
---
This depends on the RPN/NRPN series [1]. Without it, 11 of the 22 tests fail.
[1] https://lore.kernel.org/all/[email protected]/
Prepared with Claude Code (Claude Opus 5.5). Tested on x86_64 under
qemu: 22/22 pass with the series applied.
tools/testing/selftests/alsa/.gitignore | 1 + tools/testing/selftests/alsa/Makefile | 3 +- tools/testing/selftests/alsa/seq-ump-test.c | 452 ++++++++++++++++++++ 3 files changed, 455 insertions(+), 1 deletion(-) create mode 100644 tools/testing/selftests/alsa/seq-ump-test.c
tools/testing/selftests/alsa/.gitignore +1 -0
@@ -2,5 +2,6 @@ aloop-test global-timer mixer-test pcm-test +seq-ump-test test-pcmtest-driver utimer-test
tools/testing/selftests/alsa/Makefile +2 -1
@@ -16,7 +16,8 @@ LDLIBS+=-lpthread OVERRIDE_TARGETS = 1 -TEST_GEN_PROGS := aloop-test mixer-test pcm-test test-pcmtest-driver utimer-test +TEST_GEN_PROGS := aloop-test mixer-test pcm-test seq-ump-test test-pcmtest-driver \ + utimer-test TEST_GEN_PROGS_EXTENDED := libatest.so global-timer
tools/testing/selftests/alsa/seq-ump-test.c new file +452 -0
452 lines not on this page · raw message
Signature · 1 line
2.43.0
Takashi Iwai
AppliedQuoted 11 lines · HyeongJun An
The sequencer converts MIDI 1.0 CC and CONTROL14 events to UMP for UMP clients. Add a test that sends such events from a legacy client to a UMP MIDI 2.0 client and checks the RPN/NRPN packets it receives, and one that checks that a UMP MIDI 1.0 client gets the CCs as they are.
The cases cover switching between RPN and NRPN, Data Entry sent with nothing selected, repeated Data Entry, Null RPN and NRPN, and the CONTROL14 path. Some of them come from the KUnit test in Alyandra Zahran Nadhir's patch.
Quoted 5 lines
The test skips when
/dev/snd/seqcan't be opened or the kernel has no UMP support in the sequencer.
Applied to for-next branch now. Thanks.
Takashi