aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/usbaudio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c
index c709b9563226..417d557ed641 100644
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -525,7 +525,7 @@ static int snd_usb_audio_next_packet_size(struct snd_usb_substream *subs)
525/* 525/*
526 * Prepare urb for streaming before playback starts or when paused. 526 * Prepare urb for streaming before playback starts or when paused.
527 * 527 *
528 * We don't have any data, so we send a frame of silence. 528 * We don't have any data, so we send silence.
529 */ 529 */
530static int prepare_nodata_playback_urb(struct snd_usb_substream *subs, 530static int prepare_nodata_playback_urb(struct snd_usb_substream *subs,
531 struct snd_pcm_runtime *runtime, 531 struct snd_pcm_runtime *runtime,
@@ -537,13 +537,13 @@ static int prepare_nodata_playback_urb(struct snd_usb_substream *subs,
537 537
538 offs = 0; 538 offs = 0;
539 urb->dev = ctx->subs->dev; 539 urb->dev = ctx->subs->dev;
540 urb->number_of_packets = subs->packs_per_ms; 540 for (i = 0; i < ctx->packets; ++i) {
541 for (i = 0; i < subs->packs_per_ms; ++i) {
542 counts = snd_usb_audio_next_packet_size(subs); 541 counts = snd_usb_audio_next_packet_size(subs);
543 urb->iso_frame_desc[i].offset = offs * stride; 542 urb->iso_frame_desc[i].offset = offs * stride;
544 urb->iso_frame_desc[i].length = counts * stride; 543 urb->iso_frame_desc[i].length = counts * stride;
545 offs += counts; 544 offs += counts;
546 } 545 }
546 urb->number_of_packets = ctx->packets;
547 urb->transfer_buffer_length = offs * stride; 547 urb->transfer_buffer_length = offs * stride;
548 memset(urb->transfer_buffer, 548 memset(urb->transfer_buffer,
549 subs->cur_audiofmt->format == SNDRV_PCM_FORMAT_U8 ? 0x80 : 0, 549 subs->cur_audiofmt->format == SNDRV_PCM_FORMAT_U8 ? 0x80 : 0,