#4463: Add multi-ports support to USB MIDI driver ---------------------------+---------------------------- Reporter: Pete | Owner: phoudoin Type: enhancement | Status: in-progress Priority: normal | Milestone: R1 Component: Drivers/USB | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: Has a Patch: 1 | Platform: All ---------------------------+---------------------------- Comment (by Pete): Replying to [comment:30 phoudoin]: > Patch applied with small changes (coding style, missing sanity checks) in r41874. > I can't test it myself, so please you lucky guys with multi-ports usb midi device report any result. Thanks for doing this, Philippe. I guess you never actually compiled your changeset, though...? (:-)) You forgot that it's bloody C (:-)) and moved a declaration (with assignment) after a "statement"! (Happens that the "statement" was just the semicolon after a debug macro, but it was enough...) I'm not sure what the best procedure here is. Doesn't seem worth attaching a complete new patch, so I'll just put the text of the fix here: {{{ --- /BFS_User/haiku/haiku/CHANGESET41874/haiku/trunk/src/add- ons/kernel/drivers/midi/usb_midi/usb_midi.c 2011-06-03 02:30:02.036700160 -0700 +++ usb_midi.c 2011-06-04 21:53:09.073400320 -0700 @@ -199,11 +199,12 @@ size_t bytes_left = midiDevice->actual_length; while (bytes_left) { /* buffer may have several packets */ int pktlen = CINbytes[packet->cin]; + usbmidi_port_info* port = midiDevice->ports[packet->cn]; + DPRINTF_DEBUG((MY_ID "received packet %x:%d %x %x %x\n", packet->cin, packet->cn, packet->midi[0], packet->midi[1], packet->midi[2])); - usbmidi_port_info* port = midiDevice->ports[packet->cn]; /* port matching 'cable' */ if (port == NULL) { DPRINTF_ERR((MY_ID "no port matching cable number %d!\n", }}} Can you do whatever's needed, please? Once I edited as above, and built it, it works fine with my MidiSport 2x2 Thanks again. -- Ticket URL: <http://dev.haiku-os.org/ticket/4463#comment:31> Haiku <http://dev.haiku-os.org> Haiku - the operating system.