]> www.infradead.org Git - users/jedix/linux-maple.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Sep 2015 17:05:38 +0000 (10:05 -0700)
commit08ccc8bb7d2a9cf6543e686b43b59f888f4782e9
tree03951fbbb72604970b4f8621ef12d8b5e788895a
parentd408e5eccd26f1efd97fdbd568f3fa6b6f95e2a0
usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth

commit 913e4a90b6f9687ac0f543e7b632753e4f51c441 upstream.

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: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_uac2.c