Commit 8dce30c8 authored by Daniel Mack's avatar Daniel Mack Committed by Linus Torvalds

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 245baf98 ("ALSA: snd-usb: fix calls to next_packet_size").
Signed-off-by: default avatarDaniel Mack <>
Reviewed-by: default avatarTakashi Iwai <>
Reported-and-tested-by: default avatarChristian Tefzer <>
[ Taking directly because Takashi is on vacation  - Linus ]
Signed-off-by: default avatarLinus Torvalds <>
parent 9a7c5909
......@@ -197,7 +197,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];
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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment