]> err.no Git - linux-2.6/commitdiff
[ALSA] usb-audio - Fix the minimum period size per transfer mode
authorTakashi Iwai <tiwai@suse.de>
Wed, 2 May 2007 10:09:48 +0000 (12:09 +0200)
committerJaroslav Kysela <perex@suse.cz>
Fri, 11 May 2007 14:56:13 +0000 (16:56 +0200)
The minimal period size is 125us for high-speed mode while
1ms for full-speed mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/usb/usbaudio.c

index b6d886373bb001b46da476a0cb1a2f3c6d44db19..78efcffce8d1ed5ae929b8b2efb5d6430c65f090 100644 (file)
@@ -1879,7 +1879,9 @@ static int setup_hw_info(struct snd_pcm_runtime *runtime, struct snd_usb_substre
 
        /* set the period time minimum 1ms */
        snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_PERIOD_TIME,
-                                    1000 * MIN_PACKS_URB,
+                                    snd_usb_get_speed(subs->dev) == USB_SPEED_FULL ?
+                                    
+                                    1000 * MIN_PACKS_URB : 125 * MIN_PACKS_URB,
                                     /*(nrpacks * MAX_URBS) * 1000*/ UINT_MAX);
 
        if (check_hw_params_convention(subs)) {