Subject: kern/32441: umidi input dropped data fix, plus quirks for Midiman Midisport 2x4
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <nbgnats@anastigmatix.net>
List: netbsd-bugs
Date: 01/03/2006 01:40:00
>Number:         32441
>Category:       kern
>Synopsis:       umidi input dropped data fix, plus quirks for Midiman Midisport 2x4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 03 01:40:00 +0000 2006
>Originator:     Chapman Flack
>Release:        2.0
>Organization:
>Environment:
NetBSD lundestad.anastigmatix.net 2.0 NetBSD 2.0 (lundestad) #30: Mon Jan  2 19:13:25 EST 2006  xxx@xxx:/usr/src/sys/arch/i386/compile/lundestad i386
>Description:
Some time ago I added umidi quirks for the Midiman Midisport 2x4, a fairly
inexpensive (some places) 2 in / 4 out USB to MIDI adapter, and never got
around to submitting the patch.  Here it is (link below) with respect to
2.0 sources, but I see in webcvs there's been so little activity on the
affected files it should be a breeze to apply.

Once I got the thing to work, I noticed that MIDI output was pretty
reliable but input wasn't; just playing a simple chord on the keyboard was
enough to get data dropped (very annoying in MIDI, because it might lose
the message for a key release, or get stuck reading velocities as notes
and vice versa).  That turned out to be because umidi was doing input in
transfers of size 4 rather than wMaxPacketSize; after fixing that today, I
haven't been able to see a single dropped byte, even sending memory dumps
from the keyboard and such. This should improve input performance for
any umidi device, not just the Midiman.
>How-To-Repeat:

>Fix:
http://www.anastigmatix.net/cvsweb.cgi/NetBSD/midiman.pat