Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6533
b: refs/heads/master
c: 9624ea8
h: refs/heads/master
i:
  6531: b4195fb
v: v3
  • Loading branch information
Clemens Ladisch authored and Jaroslav Kysela committed Aug 30, 2005
1 parent 2c34320 commit 47c3e89
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7efd8bc800324a967a37e8a425433468b7f06adb
refs/heads/master: 9624ea812c7afd2e403c56366cadddb9ecfb88c6
8 changes: 7 additions & 1 deletion trunk/sound/usb/usbaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ struct snd_usb_substream {
unsigned int curframesize; /* current packet size in frames (for capture) */
unsigned int fill_max: 1; /* fill max packet size always */
unsigned int fmt_type; /* USB audio format type (1-3) */
unsigned int packs_per_ms; /* packets per millisecond (for playback) */

unsigned int running: 1; /* running status */

Expand Down Expand Up @@ -537,9 +538,13 @@ static int prepare_playback_urb(snd_usb_substream_t *subs,
urb->iso_frame_desc[i].length = 0;
urb->number_of_packets++;
}
break;
}
break;
}
/* finish at the frame boundary at/after the period boundary */
if (period_elapsed &&
(i & (subs->packs_per_ms - 1)) == subs->packs_per_ms - 1)
break;
}
if (subs->hwptr_done + offs > runtime->buffer_size) {
/* err, the transferred area goes over buffer boundary. */
Expand Down Expand Up @@ -907,6 +912,7 @@ static int init_substream_urbs(snd_usb_substream_t *subs, unsigned int period_by
packs_per_ms = 8 >> subs->datainterval;
else
packs_per_ms = 1;
subs->packs_per_ms = packs_per_ms;

if (is_playback) {
urb_packs = nrpacks;
Expand Down

0 comments on commit 47c3e89

Please sign in to comment.