sound: usb-audio: do not make URBs longer than sync packet interval
[safe/jmp/linux-2.6] / sound / usb / usbaudio.c
index 44b9cdc..fa3f7a1 100644 (file)
@@ -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) {