]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ALSA: seq: oss: Send fragmented SysEx messages immediately
authorTakashi Iwai <tiwai@suse.de>
Tue, 31 Dec 2024 11:55:18 +0000 (12:55 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 31 Dec 2024 11:56:01 +0000 (12:56 +0100)
commit20ce9ded8c596d046813762e362929dfbcb28567
treec6e737178090f6d735764cc4ed3a85447f3b5d1e
parent41d11d6e1aa167ae8c4849905b338b60db98be44
ALSA: seq: oss: Send fragmented SysEx messages immediately

The recent bug report spotted on the old OSS sequencer code that tries
to combine incoming SysEx messages to a single sequencer event.  This
is good, per se, but it has more demerits:

- The sysex message delivery is delayed until the very last event
- The use of internal buffer forced the serialization

The recent fix in commit 0179488ca992 ("ALSA: seq: oss: Fix races at
processing SysEx messages") addressed the latter, but a better fix is
to handle the sysex messages immediately, i.e. just send each incoming
fragmented sysex message as is.  And this patch implements that.
This resulted in a significant cleanup as well.

Note that the only caller of snd_seq_oss_synth_sysex() is
snd_seq_oss_process_event(), and all its callers dispatch the event
immediately, so we can just put the passed buffer pointer to the event
record to be handled.

Reported-and-tested-by: Kun Hu <huk23@m.fudan.edu.cn>
Link: https://lore.kernel.org/2B7E93E4-B13A-4AE4-8E87-306A8EE9BBB7@m.fudan.edu.cn
Link: https://patch.msgid.link/20241231115523.15796-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/seq/oss/seq_oss_device.h
sound/core/seq/oss/seq_oss_synth.c