From: Daniel Mack <zonque@gmail.com>
To: torvalds@linux-foundation.org
Cc: tiwai@suse.de, linux-kernel@vger.kernel.org,
Daniel Mack <zonque@gmail.com>,
stable@kernel.org
Subject: [PATCH] ALSA: snd-usb: fix next_packet_size calls for pause case
Date: Thu, 27 Sep 2012 10:26:01 +0200 [thread overview]
Message-ID: <1348734361-13352-1-git-send-email-zonque@gmail.com> (raw)
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
---
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(-)
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index a83a18d..d9de667 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -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;
--
1.7.11.4
reply other threads:[~2012-09-27 8:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1348734361-13352-1-git-send-email-zonque@gmail.com \
--to=zonque@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@kernel.org \
--cc=tiwai@suse.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox