Skip to content

Commit

Permalink
[ALSA] usb-audio - Fix the minimum period size per transfer mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed May 11, 2007
1 parent 27fe0f4 commit 6b9fa70
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sound/usb/usbaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 6b9fa70

Please sign in to comment.