]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: f_uac2: fix calculation of uac2->p_interval
authorPeter Chen <peter.chen@freescale.com>
Mon, 27 Jul 2015 06:51:47 +0000 (14:51 +0800)
committerFelipe Balbi <balbi@ti.com>
Mon, 27 Jul 2015 15:18:06 +0000 (10:18 -0500)
commita679f1790213ea75ab7cfeb4155ea5941f865c00
tree7ce3a4dc3d7ff403967deb6b0dabfc81bcae6fab
parentc53f72c026ec6eadbcb21e8d92c065ef7bfba547
usb: gadget: f_uac2: fix calculation of uac2->p_interval

The p_interval should be less if the 'bInterval' at the descriptor
is larger, eg, if 'bInterval' is 5 for HS, the p_interval should be
8000 / 16 = 500.

It fixes the patch da2c6b735f94 ("usb: gadget: f_uac2: send
reasonably sized packets")

Cc: <stable@vger.kernel.org> # v3.18+
Fixes: da2c6b735f94 ("usb: gadget: f_uac2: send reasonably sized packets")
Acked-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/f_uac2.c