From: Takashi Iwai Date: Mon, 27 Dec 2004 18:47:01 +0000 (+0000) Subject: Fix periods_max setting X-Git-Tag: v1.0.8~5 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=acca20e09f1cfdbccd7ed6263859357a66b4ac2a;p=alsa-oss.git Fix periods_max setting Fixed the setting of periods_max not to be below periods_min. --- diff --git a/alsa/pcm.c b/alsa/pcm.c index f01fa34..d8d7644 100644 --- a/alsa/pcm.c +++ b/alsa/pcm.c @@ -267,7 +267,8 @@ static int oss_dsp_hw_params(oss_dsp_t *dsp) if (err < 0) return err; if (dsp->maxfrags > 0) { - unsigned int periods_max = dsp->maxfrags; + unsigned int periods_max = periods_min > dsp->maxfrags + ? periods_min : dsp->maxfrags; err = snd_pcm_hw_params_set_periods_max(pcm, hw, &periods_max, 0); if (err < 0)