mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
ANDROID: usb: gadget: f_audio_source: change max ISO packet size
Re-applying from
eb4c9d2db8
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>
This commit is contained in:
committed by
Dmitry Shmidt
parent
64d81a260c
commit
2c4e8fed0d
@@ -24,7 +24,7 @@
|
||||
#define SAMPLE_RATE 44100
|
||||
#define FRAMES_PER_MSEC (SAMPLE_RATE / 1000)
|
||||
|
||||
#define IN_EP_MAX_PACKET_SIZE 384
|
||||
#define IN_EP_MAX_PACKET_SIZE 256
|
||||
|
||||
/* Number of requests to allocate */
|
||||
#define IN_EP_REQ_COUNT 4
|
||||
|
||||
Reference in New Issue
Block a user