[wdmaudiodev] Re: USB MIDI

  • From: Tim Roberts <timr@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Wed, 10 Oct 2007 10:35:09 -0700

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?


> ;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?

By 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.


> ;*** 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.

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

Other related posts: