[wdmaudiodev] Re: USB MIDI

  • From: wade <wdawson61@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Thu, 11 Oct 2007 08:00:29 -0700 (PDT)


Tim Roberts <timr@xxxxxxxxx> wrote:  wade wrote:     Hi Tim.  Not pretty but 
here it is:
  
This is helpful.  Your MIDI descriptors are virtually identical to the ones in 
appendix B of the spec.  And when you plug this in and start a MIDI program, 
you see bulk transfers happening?
   
  With MidiOx open, the host is issuing INs once every ~9uS


    ;CS_MIDI_DESC_START
  ;*** Class Specific MS Interface Header Desriptor
  db 007h ;bLength
  db 024h ;bDescriptorType (CS_INTERFACE)
  db 001h ;bDescriptorSubtype
  db 000h ;bcdMSC
  db 001h ;bcdMSC
  db 63 ; Size-LSB
  db 0 ; Size - MSB
  
How did you get 63 for the size?  Shouldn't it be 7+6+6+8+8 = 35?
   
  I was having problems early on getting XP to recognize the MIDI portion of 
the device so I made our MIDI descriptors violate 6.1.2.1 just like the 
example.  Turns out the issue was related to not handling audio feature unit 
requets correctly.  I never changed them back.  I just changedit back and Vista 
and  XP seem to be fine with it.
   
   
  IBy the way, I'm convinced the USB MIDI spec has a mistake in this descriptor 
in the sample.  They show 0x0041 for the size in section B.4.2, but based on 
the description in 6.1.2.1, it should be 7+6+6+9+9 = 0x0025.  To get 0x0041, 
you have to include the endpoint descriptors, and that doesn't meet 6.1.2.1.  
However, apparently no one checks this.

Aparently not!

    ;*** MIDI Out Jack Descriptor - MIDIJACK(OUT,EMB,2)->IN(ID2/PIN1) --> To USB
  db 008h ;bLength
  db 024h ;bDescriptorType
  db 003h ;bDescriptorSubtype (MIDI_OUT_JACK)
  db 001h ;bJackType (EMBEDDED)
  db 003h ;bJackId
  db 001h ;bNrInputPins
  db 002h ;baSourceID(1)
  db 001h ;baSourcePin(1)
  ;*** MIDI Out Jack Descriptor - MIDIJACK(OUT,EXT,4)->IN(ID1/PIN1)
  db 008h ;bLength
  db 024h ;bDescriptorType
  db 003h ;bDescriptorSubtype (MIDI_OUT_JACK)
  db 002h ;bJackType (EXTERNAL)
  db 004h ;bJackId
  db 001h ;bNrInputPins
  db 001h ;baSourceID(1)
  db 001h ;baSourcePin(1)
  
The spec shows these as being 9 bytes long, with a string descriptor ordinal at 
the end.  If this works for you in XP, then I guess usbaudio.sys must not care.
   
  Oops.
   

--   Tim Roberts, timr@xxxxxxxxx  Providenza & Boekelheide, Inc.  


       
---------------------------------
Tonight's top picks. What will you watch tonight? Preview the hottest shows on 
Yahoo! TV.    

Other related posts: