diff options
author | Daniel Mack <zonque@gmail.com> | 2012-09-27 04:26:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-09-27 19:46:15 -0400 |
commit | 8dce30c89113e314d29d3b8f362aadff8087fccb (patch) | |
tree | 69106b110a011c4abf5dc35c2c02cd6c49e410c2 /sound | |
parent | 9a7c590930c1d669a032c1b30cc8d95c069dc020 (diff) |
ALSA: snd-usb: fix next_packet_size calls for pause case
Also fix the calls to next_packet_size() for the pause case. This was
missed in 245baf983 ("ALSA: snd-usb: fix calls to next_packet_size").
Signed-off-by: Daniel Mack <zonque@gmail.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Reported-and-tested-by: Christian Tefzer <ctrefzer@gmx.de>
Cc: stable@kernel.org
[ Taking directly because Takashi is on vacation - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/usb/endpoint.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c index d6e2bb49c59c..060dccb9ec75 100644 --- a/sound/usb/endpoint.c +++ b/sound/usb/endpoint.c | |||
@@ -197,7 +197,13 @@ static void prepare_outbound_urb(struct snd_usb_endpoint *ep, | |||
197 | /* no data provider, so send silence */ | 197 | /* no data provider, so send silence */ |
198 | unsigned int offs = 0; | 198 | unsigned int offs = 0; |
199 | for (i = 0; i < ctx->packets; ++i) { | 199 | for (i = 0; i < ctx->packets; ++i) { |
200 | int counts = ctx->packet_size[i]; | 200 | int counts; |
201 | |||
202 | if (ctx->packet_size[i]) | ||
203 | counts = ctx->packet_size[i]; | ||
204 | else | ||
205 | counts = snd_usb_endpoint_next_packet_size(ep); | ||
206 | |||
201 | urb->iso_frame_desc[i].offset = offs * ep->stride; | 207 | urb->iso_frame_desc[i].offset = offs * ep->stride; |
202 | urb->iso_frame_desc[i].length = counts * ep->stride; | 208 | urb->iso_frame_desc[i].length = counts * ep->stride; |
203 | offs += counts; | 209 | offs += counts; |