[haiku-bugs] Re: [Haiku] #4463: Add multi-ports support to USB MIDI driver

  • From: "Pete" <trac@xxxxxxxxxxxx>
  • Date: Sat, 19 Feb 2011 04:02:08 -0000

#4463: Add multi-ports support to USB MIDI driver
--------------------------+-----------------------------
  Reporter:  Pete         |        Owner:  nobody
      Type:  enhancement  |       Status:  assigned
  Priority:  normal       |    Milestone:  R1
 Component:  Drivers/USB  |      Version:  R1/pre-alpha1
Resolution:               |     Keywords:
Blocked By:               |  Has a Patch:  1
  Platform:  All          |     Blocking:
--------------------------+-----------------------------

Comment (by Pete):

 I think I have finally fulfilled the objective of this ticket!  The
 usb_midi driver now handles Class Oompliant USB-MIDI devices with multiple
 MIDI ports (or 'cables' as the standard calls them).  It also works
 [tested with simulation only] with devices that may be IN or OUT only,
 using Philippe's modified DeviceWatcher.cpp (r40419).  It also needs his
 updated USBx.h in r40429/r40433.

 A device/port pathname is now of the form "/dev/midi/usb/0-0" with the
 digit after the hyphen indicating the actual port.

 I've attached a complete diff (replacing earlier ones).  As the diff is
 rather larger than the combined size of the files themselves, I've
 attached the actual source code as well.  (Hope that's approved
 procedure...)  I've tried to clean up the sources a bit, but as the
 original is not exactly Haiku-Style, it still is nowhere near conformant.
 Hope that's OK.

 Anybody wishing to try this on their own USB-MIDI device, please note that
 this is only likely to work with 'Class Compliant' devices.  I've
 discovered that many are not!  [Some Communication with Clemens Ladisch,
 who wrote the Linux usb_midi driver, reveals a raft of oddballs.]  Please
 give it a try, though, and report on the results.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/4463#comment:22>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: