[wdmaudiodev] Re: Raspberry Pi OTG Audio

  • From: Robert Bielik <Robert.Bielik@xxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Sun, 4 Feb 2018 16:56:19 +0000


Total length of listed below descriptors not match to shown in header:

AH! Thank you Genadi!

The length is computed in 
https://github.com/torvalds/linux/blob/master/drivers/usb/gadget/function/f_uac2.c#L219,
 but I see now, they have failed to include the size of the AC Interface Header 
Descriptor itself!

8 + 8 + 17 + 17 + 12 + 12 = 74 = 0x4A

AC Interface Header Descriptor:
------------------------------
0x09    bLength
0x24    bDescriptorType
0x01    bDescriptorSubtype
0x0200  bcdADC
0x08    bCategory   (IO_BOX)
0x004A  wTotalLength   (74 bytes)
*** ERROR: Invalid wTotalLength 0x004A, should be 0x0053.
0x00    bmControls

That's where the missing 9 bytes are! Ok, filing an issue with the linux kernel 
then 😊

I'll try patch this myself also see if it works out.

Regards 
/Robert

Other related posts: