Skip to content

Commit

Permalink
sound: usb-audio: do not make URBs longer than sync packet interval
Browse files Browse the repository at this point in the history
Using more packets in one URB do avoid interrupts does not make sense
when we have a sync pipe whose packets generate interrupts more often.
Therefore, limit the URB size to the synchronization packet interval.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Clemens Ladisch authored and Takashi Iwai committed Aug 10, 2009
1 parent a65dd99 commit 765e8db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/usb/usbaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,8 @@ static int init_substream_urbs(struct snd_usb_substream *subs, unsigned int peri
} else
urb_packs = 1;
urb_packs *= packs_per_ms;
if (subs->syncpipe)
urb_packs = min(urb_packs, 1 << subs->syncinterval);

/* decide how many packets to be used */
if (is_playback) {
Expand Down

0 comments on commit 765e8db

Please sign in to comment.