Subject: Re: retry: NetBSD umidi driver shuns M-Audio / Midiman Midisport 2x4
To: tech-kern <tech-kern@netbsd.org>
From: Clemens Ladisch <clemens@ladisch.de>
List: tech-kern
Date: 09/02/2004 15:15:06
Chapman Flack wrote:
> So I'm guessing mine is already a midi device of sorts without
> needing firmware;

Yes.

> it just doesn't identify with the proper class and subclass to be
> recognized as one.

Unfortunately, "vendor-specific" is the correct identification.

> Of course since this midi device doesn't claim to be the interface class
> and subclass defined in that spec, there's no telling whether it really
> uses a protocol like the one in the spec or something completely different.
> If it's like the standard protocol, it's probably not hard to get the
> driver to play with it.  Otherwise ... yuck.

MidiSport devices don't use the standard protocol, but it's very
similar -- they use 4-byte packets, too, but the control byte is the
last byte (instead of the first) and contains the number of data bytes
(instead of the CIN) in the lower nibble.  See the functions
snd_usbmidi_convert_to_midiman() and snd_usbmidi_in_midiman_complete()
in the Linux driver.

As for the five endpoints, see the comment in
snd_usbmidi_create_endpoints_midiman():
/*
 * The various MidiSport devices have more or less random endpoint
 * numbers, so we have to identify the endpoints by their index in
 * the descriptor array, like the driver for that other OS does.
 *
 * There is one interrupt input endpoint for all input ports, one
 * bulk output endpoint for even-numbered ports, and one for odd-
 * numbered ports.  Both bulk output endpoints have corresponding
 * input bulk endpoints (at indices 1 and 3) which aren't used.
 */

> Does anybody know which USB MIDI products actually follow the
> standard?

Well, Roland wrote the standard, so we can assume ... oops.

All USB MIDI devices from ESI and Evolution, and at least some from
Behringer, are fully audio class compliant.

Devices from most other vendors use the standard protocol but don't
have proper descriptors and/or correct class/subclass values.  I guess
this may be related to the fact that the Windows USB Audio driver
didn't work with 'real' USB MIDI devices before XP.


Regards,
Clemens