OSDN Git Service

ALSA: USB-audio: Adjust max packet size calculation for tx_length_quirk
authorRicard Wanderlof <ricard.wanderlof@axis.com>
Mon, 19 Oct 2015 06:52:54 +0000 (08:52 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 19 Oct 2015 10:38:10 +0000 (12:38 +0200)
commit759c90fe0129f23a4ff2a7c92e1bd30d41ac829c
tree79a56b713394bd214f79ca08143ab443d12aae15
parente05704467736231199503e5a21c587e7ec36b829
ALSA: USB-audio: Adjust max packet size calculation for tx_length_quirk

For the Zoom R16/24 (tx_length_quirk set), when calculating the maximum
sample frequency, consideration must be made for the fact that four bytes
of the packet contain a length descriptor and consequently must not be
counted as part of the audio data.

This is corroborated by the wMaxPacketSize for this device, which is 108
bytes according for the USB playback endpoint descriptor. The frame size
is 8 bytes (2 channels of 4 bytes each), and the 108 bytes thus work out
as 13 * 8 + 4, i.e. corresponding to 13 frames plus the additional 4 byte
length descriptor.

Signed-off-by: Ricard Wanderlof <ricardw@axis.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/endpoint.c