]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: f_uac2: fix AC Interface Header Descriptor wTotalLength
authorRuslan Bilovol <ruslan.bilovol@gmail.com>
Fri, 3 Jul 2020 13:49:03 +0000 (16:49 +0300)
committerFelipe Balbi <balbi@kernel.org>
Fri, 24 Jul 2020 13:45:15 +0000 (16:45 +0300)
commit3f9837a5e4cd8c66ac4372c5bf67043975521630
tree3a011adf3fa7260d89649775ec52b6eb81c8c495
parent994985fee21217215e80303a26b913f0ac4439b1
usb: gadget: f_uac2: fix AC Interface Header Descriptor wTotalLength

As per UAC2 spec (ch. 4.7.2), wTotalLength of AC Interface
Header Descriptor "includes the combined length of this
descriptor header and all Clock Source, Unit and Terminal
descriptors."

Thus add its size to its wTotalLength.

Also after recent changes wTotalLength is calculated
dynamically, update static definition of uac2_ac_header_descriptor
accordingly

Fixes: 6049421176fb ("usb: gadget: Add Audio Class 2.0 Driver")
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
drivers/usb/gadget/function/f_uac2.c