OSDN Git Service

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)
commita9cf8715180b18c62addbfe6f6267b8101903119
tree3a011adf3fa7260d89649775ec52b6eb81c8c495
parentec3966268c67c4ff2fde2de5df2cb34e0ec57248
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: 132fcb460839 ("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