From acca20e09f1cfdbccd7ed6263859357a66b4ac2a Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 27 Dec 2004 18:47:01 +0000 Subject: [PATCH] Fix periods_max setting Fixed the setting of periods_max not to be below periods_min. --- alsa/pcm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- 2.47.1