]> git.karo-electronics.de Git - linux-beck.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)
commit913e4a90b6f9687ac0f543e7b632753e4f51c441
tree8a89c41df1018b09358c5d0fa9d4abef3b094d50
parent8078f314b8c8012cf36e5decc75378b803bfba4d
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