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>,
stable@vger.kernel.org
Subject: [PATCH 1/4] ALSA: seq: ump: Don't turn a zero key pressure into a Note Off
Date: Mon, 16 Nov 2026 12:03:34 +0900 [thread overview]
Message-ID: <20261116030338.422671-2-sammiee5311@gmail.com> (raw)
In-Reply-To: <20261116030338.422671-1-sammiee5311@gmail.com>
The conversion of legacy events to UMP MIDI 1.0 uses
note_ev_to_ump_midi1() for KEYPRESS events as well as for note events.
The function turns any event with zero velocity into a Note Off. So a
Polyphonic Key Pressure of 0 reaches a UMP MIDI 1.0 client as a Note Off
and ends the note.
Only a Note On with zero velocity means Note Off. To fix this, check the
status, too.
The conversion to MIDI 2.0 already sends a zero key pressure as it is.
Fixes: e9e02819a98a ("ALSA: seq: Automatic conversion of UMP events")
Cc: stable@vger.kernel.org
Signed-off-by: HyeongJun An <sammiee5311@gmail.com>
---
sound/core/seq/seq_ump_convert.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/core/seq/seq_ump_convert.c b/sound/core/seq/seq_ump_convert.c
index 62bdef6dca58..c248d87f7a83 100644
--- a/sound/core/seq/seq_ump_convert.c
+++ b/sound/core/seq/seq_ump_convert.c
@@ -630,7 +630,7 @@ static int note_ev_to_ump_midi1(const struct snd_seq_event *event,
union snd_ump_midi1_msg *data,
unsigned char status)
{
- if (!event->data.note.velocity)
+ if (status == UMP_MSG_STATUS_NOTE_ON && !event->data.note.velocity)
status = UMP_MSG_STATUS_NOTE_OFF;
data->note.status = status;
data->note.channel = event->data.note.channel & 0x0f;
--
2.43.0
next prev parent reply other threads:[~2026-11-16 3:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 3:03 [PATCH 0/4] ALSA: seq: ump: Fix Note On/Off and key pressure conversion HyeongJun An
2026-11-16 3:03 ` HyeongJun An [this message]
2026-11-16 3:03 ` [PATCH 2/4] ALSA: seq: ump: Convert a zero-velocity Note On to Note Off for MIDI 2.0 HyeongJun An
2026-11-16 3:03 ` [PATCH 3/4] ALSA: seq: ump: Keep a soft MIDI 2.0 Note On from becoming a Note Off HyeongJun An
2026-11-16 3:03 ` [PATCH 4/4] selftests/alsa: Test the sequencer UMP Note On/Off conversion HyeongJun An
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=20261116030338.422671-2-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=stable@vger.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®