diff options
author | Andrej Krutak <dev@andree.sk> | 2016-09-18 20:59:23 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2016-09-19 23:00:10 +0200 |
commit | 7a0f55aeeb8f1fa32a119d34ddfefc6100936692 (patch) | |
tree | c09d5ec340198bad9fde8f47f9098233cb6859ab /sound/usb/line6/capture.c | |
parent | ALSA: line6: Add high-speed USB support (diff) | |
download | linux-7a0f55aeeb8f1fa32a119d34ddfefc6100936692.tar.xz linux-7a0f55aeeb8f1fa32a119d34ddfefc6100936692.zip |
ALSA: line6: Support assymetrical in/out configurations
Splits max_packet_size to max_packet_size_in/out (e.g. for
different channel counts).
Signed-off-by: Andrej Krutak <dev@andree.sk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/line6/capture.c')
-rw-r--r-- | sound/usb/line6/capture.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/usb/line6/capture.c b/sound/usb/line6/capture.c index 596bc53d0775..8f9647853acd 100644 --- a/sound/usb/line6/capture.c +++ b/sound/usb/line6/capture.c @@ -44,13 +44,13 @@ static int submit_audio_in_urb(struct snd_line6_pcm *line6pcm) struct usb_iso_packet_descriptor *fin = &urb_in->iso_frame_desc[i]; fin->offset = urb_size; - fin->length = line6pcm->max_packet_size; - urb_size += line6pcm->max_packet_size; + fin->length = line6pcm->max_packet_size_in; + urb_size += line6pcm->max_packet_size_in; } urb_in->transfer_buffer = line6pcm->in.buffer + - index * LINE6_ISO_PACKETS * line6pcm->max_packet_size; + index * LINE6_ISO_PACKETS * line6pcm->max_packet_size_in; urb_in->transfer_buffer_length = urb_size; urb_in->context = line6pcm; @@ -173,10 +173,10 @@ static void audio_in_callback(struct urb *urb) fbuf = urb->transfer_buffer + fin->offset; fsize = fin->actual_length; - if (fsize > line6pcm->max_packet_size) { + if (fsize > line6pcm->max_packet_size_in) { dev_err(line6pcm->line6->ifcdev, "driver and/or device bug: packet too large (%d > %d)\n", - fsize, line6pcm->max_packet_size); + fsize, line6pcm->max_packet_size_in); } length += fsize; |