Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6521
b: refs/heads/master
c: d6db392
h: refs/heads/master
i:
  6519: 0e95183
v: v3
  • Loading branch information
Clemens Ladisch authored and Jaroslav Kysela committed Aug 30, 2005
1 parent 39bcedc commit 17d1e3c
Show file tree
Hide file tree
Showing 2 changed files with 10 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: 15a24c0778e9bdd48d8e1cf60a263837b5c30ed5
refs/heads/master: d6db392e9235c48bb945624798e9beede7b85b12
10 changes: 9 additions & 1 deletion trunk/sound/usb/usbaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,15 @@ static int init_substream_urbs(snd_usb_substream_t *subs, unsigned int period_by

/* decide how many packets to be used */
if (is_playback) {
total_packs = (period_bytes + maxsize - 1) / maxsize;
unsigned int minsize;
/* determine how small a packet can be */
minsize = (subs->freqn >> (16 - subs->datainterval))
* (frame_bits >> 3);
/* with sync from device, assume it can be 25% lower */
if (subs->syncpipe)
minsize -= minsize >> 2;
minsize = max(minsize, 1u);
total_packs = (period_bytes + minsize - 1) / minsize;
if (total_packs < 2 * MIN_PACKS_URB)
total_packs = 2 * MIN_PACKS_URB;
} else {
Expand Down

0 comments on commit 17d1e3c

Please sign in to comment.