From 35d328081b2a0a5395624116caa898939b01967a Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Thu, 27 Sep 2012 10:26:01 +0200 Subject: [PATCH] --- yaml --- r: 323199 b: refs/heads/master c: 8dce30c89113e314d29d3b8f362aadff8087fccb h: refs/heads/master i: 323197: cfc08ad19714b4aa7251f5fd7d9994264601070c 323195: ec10818885ab5262d5b0704be87aadd0cd91588a 323191: 0a9306a1797306420011c14fb6beb580e0ce4cb1 323183: e4b48c7e0d9e7107f99eb619adea46e9d87eb47f 323167: abb72ff0c7879c4b37c3e2e5ac3985fcc4dd553c 323135: 61f6bc5b1e2bf77dda98d3d4b8264480553a2077 323071: a69bee5d9dd594819a860f1289d3906d15b1a148 v: v3 --- [refs] | 2 +- trunk/sound/usb/endpoint.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 1f667c0e8b82..119f5af09df2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9a7c590930c1d669a032c1b30cc8d95c069dc020 +refs/heads/master: 8dce30c89113e314d29d3b8f362aadff8087fccb diff --git a/trunk/sound/usb/endpoint.c b/trunk/sound/usb/endpoint.c index d6e2bb49c59c..060dccb9ec75 100644 --- a/trunk/sound/usb/endpoint.c +++ b/trunk/sound/usb/endpoint.c @@ -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]; + 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;