]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth
authorPeter Chen <peter.chen@freescale.com>
Thu, 30 Jul 2015 05:13:03 +0000 (13:13 +0800)
committerFelipe Balbi <balbi@ti.com>
Thu, 30 Jul 2015 16:43:38 +0000 (11:43 -0500)
commitcfe72234e6918b27951e854209818416c4cd8dfe
tree8a89c41df1018b09358c5d0fa9d4abef3b094d50
parent8a7b011dc2948e0ecf6ede3d3f8d5923b6364425
usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth

According to USB Audio Device 2.0 Spec, Ch4.10.1.1:
wMaxPacketSize is defined as follows:
Maximum packet size this endpoint is capable of sending or receiving
when this configuration is selected.
This is determined by the audio bandwidth constraints of the endpoint.

In current code, the wMaxPacketSize is defined as the maximum packet size
for ISO endpoint, and it will let the host reserve much more space than
it really needs, so that we can't let more endpoints work together at
one frame.

We find this issue when we try to let 4 f_uac2 gadgets work together [1]
at FS connection.

[1]http://www.spinics.net/lists/linux-usb/msg123478.html

Acked-by: Daniel Mack <zonque@gmail.com>
Cc: andrzej.p@samsung.com
Cc: Daniel Mack <zonque@gmail.com>
Cc: tiwai@suse.de
Cc: <stable@vger.kernel.org> #v3.18+
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/f_uac2.c