]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: f_uac2: fix packet size calculation
authorJohn Keeping <john@metanate.com>
Fri, 10 Jan 2020 11:28:14 +0000 (11:28 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Jan 2020 09:39:23 +0000 (10:39 +0100)
commitb352f107059e64b95fd35c8c5fd11da740537021
treed44825ddb368775b2d5bc467ab44553b8e2871fb
parent8c6d0e9a631ee447b306f60e02efe93c1f23c75e
usb: gadget: f_uac2: fix packet size calculation

The packet size for USB audio must always be a multiple of the frame
size, otherwise we are transmitting a partial frame which omits some
channels (and these end up at the wrong offset in the next packet).
Furthermore, it breaks the residue handling such that we end up trying
to send a packet exceeding the maximum packet size for the endpoint.

Signed-off-by: John Keeping <john@metanate.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/u_audio.c