ALSA: snd-usb: fix next_packet_size calls for pause case
PATCH 1/1 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 <[email protected]>
Reviewed-by Takashi Iwai <[email protected]>
Reported-and-tested-by Christian Tefzer <[email protected]>
---
Hi Linus,
Takashi is currently on vacation and asked me to contact you directly for merging this patch for 3.6. FWIW, it's also available here:
git://github.com/zonque/linux.git alsa-for-3.6
Thanks,
Daniel
sound/usb/endpoint.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
sound/usb/endpoint.c +7 -1
@@ -203,7 +203,13 @@ static void prepare_outbound_urb(struct snd_usb_endpoint *ep,/* no data provider, so send silence */ unsigned int offs =0 ;for (i =0 ; i < ctx->packets; ++i) { -int counts = ctx->packet_size[i]; +int counts; + +if (ctx->packet_size[i]) + counts = ctx->packet_size[i]; +else + counts =snd_usb_endpoint_next_packet_size (ep); + urb->iso_frame_desc[i].offset = offs * ep->stride; urb->iso_frame_desc[i].length = counts * ep->stride; offs += counts;
Signature · 1 line
1.7.11.4