From bbf71b31596719c61d540513da3d8a3db20dad66 Mon Sep 17 00:00:00 2001 From: Rozhuk Ivan Date: Fri, 9 Aug 2024 21:52:17 +0300 Subject: [PATCH] sound: Fix SEQ_SYSEX() macro Correct implementation also found in Linux's soundcard.h: https://github.com/torvalds/linux/blob/master/include/uapi/linux/soundcard.h#L1178 seq_processevent() interprets event[1] as device number and does not work properly with current SEQ_SYSEX() implementation. Note: soundcard.h has its own funky style, which this commit follows Reviewed by: imp, christos Pull Request: https://github.com/freebsd/freebsd-src/pull/1374 --- sys/sys/soundcard.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/sys/soundcard.h b/sys/sys/soundcard.h index b5434b93021..304ae38c08d 100644 --- a/sys/sys/soundcard.h +++ b/sys/sys/soundcard.h @@ -1400,8 +1400,9 @@ void seqbuf_dump(void); /* This function must be provided by programs */ int i, l=(len); if (l>6)l=6;\ _SEQ_NEEDBUF(8);\ _seqbuf[_seqbufptr] = EV_SYSEX;\ - for(i=0;i