[haiku-development] Re: (USB MIDI) Device hierarchy

  • From: pete.goodeve@xxxxxxxxxxxx
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 11 Feb 2011 23:28:29 -0800

[Dealing with several arising points.  Including apologies for maybe
getting a little too conversational last night!]

On Fri, Feb 11, 2011 at 01:47:35PM +0000, Ithamar R. Adema wrote:
> 
> On Fri, 2011-02-11 at 13:09 +0100, Philippe Houdoin wrote:
> > Which means probably that both usb_hid and usb_midi kernel drivers are
> > accessing the device concurrently.
> > It should be possible, but maybe we don't support it well right now.
> > 
> > Please file a bug ticket for this issue, as it could be a deeper issue
> > than just USB MIDI support. 

I've now received a configuration dump of the KX8 from Sean (made with
usblyzer I think), that seems to show a very strange beast.  It has two
interfaces, an HID (Keyboard) interface, and a Yamaha-proprietary one,
but no actual MIDI!  MIDI must be handled in its own unique manner.
So there's really no hope of getting it working.

Why it should lock up the OS is another matter.  I assume non-standard
interfaces should be ignored?

> 
> This issue has been a common one for other devices as well, e.g. webcams
> with a microphone, having both usb_audio and usb_video use it. The best
> solution for this I have been able to come up with is using the new
> driver model, where drivers register against usb interfaces instead of
> the whole device.
As far as I can see, this is what the usb_midi driver is currently doing.
It finds the Interface, then the Endpoints in that, and connects to them.
It shouldn't see any events on another Interface, should it?

I assume the USB Stack itself merges outgoing events and demuxes the
incoming stream to the relevant interfaces, mustn't it?
> 
> It is possible to get it to work with the current usb
> stack/architecture, but it is fairly tricky to get right IIRC...

What more is needed? 

        -- Pete --


Other related posts: