]> git.alsa-project.org Git - alsa-plugins.git/commitdiff
pulse - Add minmax condition for period_bytes and periods
authorTakashi Iwai <tiwai@suse.de>
Tue, 13 Nov 2007 15:21:22 +0000 (16:21 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 13 Nov 2007 15:21:22 +0000 (16:21 +0100)
Added the minmax conditions for period_bytes and periods to pulse plugin.
This fixes ALSA bug#2601.

Patch from Mike Gorse <mgorse@mgorse.dhs.org>

pulse/pcm_pulse.c

index 67f97b547e7905d38fd2fb38921700b9a6313f2f..ae55bcbd167098c9b86aa278174232fddb69fda7 100644 (file)
@@ -659,6 +659,13 @@ static int pulse_hw_constraint(snd_pcm_pulse_t *pcm)
     if (err < 0)
         return err;
 
+       err = snd_pcm_ioplug_set_param_minmax(io, SND_PCM_IOPLUG_HW_PERIOD_BYTES, 256, 1024 * 1024);
+       if (err < 0)
+               return err;
+
+       err = snd_pcm_ioplug_set_param_minmax(io, SND_PCM_IOPLUG_HW_PERIODS, 2, 1024);
+       if (err < 0)
+               return err;
     return 0;
 }