diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/usb/usbaudio.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index f853b627cf43..defe9913cbb2 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c @@ -1095,9 +1095,8 @@ static int init_substream_urbs(struct snd_usb_substream *subs, unsigned int peri total_packs = 2 * packs_per_ms; } else { /* and we don't want too long a queue either */ - maxpacks = max((unsigned int)MAX_QUEUE, urb_packs * 2); - if (total_packs > maxpacks * packs_per_ms) - total_packs = maxpacks * packs_per_ms; + maxpacks = max(MAX_QUEUE * packs_per_ms, urb_packs * 2); + total_packs = min(total_packs, maxpacks); } } else { total_packs = MAX_URBS * urb_packs; |