From: HyeongJun An <sammiee5311@gmail.com>
To: Takashi Iwai <tiwai@suse.com>
Cc: Jaroslav Kysela <perex@perex.cz>, Mark Brown <broonie@kernel.org>,
Shuah Khan <shuah@kernel.org>,
linux-sound@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org,
HyeongJun An <sammiee5311@gmail.com>
Subject: [PATCH 2/2] selftests/alsa: Test the sequencer UMP MIDI 2.0 RPN conversion
Date: Sun, 22 Nov 2026 19:36:11 +0900 [thread overview]
Message-ID: <20261122103611.3264343-3-sammiee5311@gmail.com> (raw)
In-Reply-To: <20261122103611.3264343-1-sammiee5311@gmail.com>
Check that an RPN and an NRPN from a UMP MIDI 2.0 client reach a UMP
MIDI 1.0 client as the four CCs that select and set them. The NRPN data
has low bits set, so CC 38 is checked as well.
Signed-off-by: HyeongJun An <sammiee5311@gmail.com>
---
tools/testing/selftests/alsa/seq-ump-test.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/tools/testing/selftests/alsa/seq-ump-test.c b/tools/testing/selftests/alsa/seq-ump-test.c
index 55bb7ea5b02f..7030d061dfae 100644
--- a/tools/testing/selftests/alsa/seq-ump-test.c
+++ b/tools/testing/selftests/alsa/seq-ump-test.c
@@ -620,4 +620,24 @@ TEST_F(seq_pair, ump_midi2_to_midi1_note)
{ 0x20913c01, 0 }, { 0x20813c00, 0 });
}
+TEST_F(seq_pair, ump_midi2_to_midi1_rpn)
+{
+ int skip = 0;
+ int err;
+
+ err = open_pair(&self->dst, SNDRV_SEQ_CLIENT_UMP_MIDI_1_0,
+ &self->src, SNDRV_SEQ_CLIENT_UMP_MIDI_2_0, &skip);
+ if (skip)
+ SKIP(return, "UMP sequencer client unavailable: %s",
+ strerror(-err));
+ ASSERT_EQ(0, err);
+
+ SEND_UMP(0x40210001, 0x80000000);
+ SEND_UMP(0x40310203, 0x12345678);
+ EXPECT_MT_PACKETS(2, { 0x20b16500, 0 }, { 0x20b16401, 0 },
+ { 0x20b10640, 0 }, { 0x20b12600, 0 },
+ { 0x20b16302, 0 }, { 0x20b16203, 0 },
+ { 0x20b10609, 0 }, { 0x20b1260d, 0 });
+}
+
TEST_HARNESS_MAIN
--
2.43.0
prev parent reply other threads:[~2026-11-22 10:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 10:36 [PATCH 0/2] ALSA: seq: ump: Convert MIDI 2.0 RPN and NRPN for MIDI 1.0 clients HyeongJun An
2026-11-22 10:36 ` [PATCH 1/2] ALSA: seq: ump: Don't drop " HyeongJun An
2026-11-22 10:36 ` HyeongJun An [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261122103611.3264343-3-sammiee5311@gmail.com \
--to=sammiee5311@gmail.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=shuah@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®