usb: gadget: f_audio_source: change max ISO packet size
authorAnson Jacob <ansonkuzhumbil@gmail.com>
Tue, 1 Jul 2014 10:17:20 +0000 (18:17 +0800)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:52:01 +0000 (13:52 -0800)
commitfbc1d7837f2524f5d0347c4a120594d1485fde48
tree69de3f5576ba0fda9685c696e6f8626123871599
parentb6d704d67426e8a1f90ea214097dbeb7bcb8ebed
usb: gadget: f_audio_source: change max ISO packet size

Re-applying from
https://gitorious.org/shr/linux/commit/eb4c9d2db894c3492c0a848581bd4f6790f93d5f

Most USB-AUDIO devices are limited to 256 byte for max iso buffer size.
If a IN_EP_MAX_PACKET_SIZE is bigger than a USB-AUDIO device's max iso
buffer size, it will cause noise. This patch will prevent this case as
possibe by reducing packet size. When using 44.1khz, 2ch, 16bit audio
data, if max packet size is bigger than 176 bytes, it's no problem.

Credits to: Iliyan Malchev <malchev@google.com>

Change-Id: Ic2a1c19ea65d5fb42bf12926b51b255b465d7215
Signed-off-by: Anson Jacob <ansonkuzhumbil@gmail.com>
drivers/usb/gadget/f_audio_source.c