From: Clemens Ladisch Date: Mon, 17 Jul 2006 14:53:57 +0000 (+0200) Subject: [ALSA] timer: fix timer rescheduling X-Git-Tag: v2.6.19-rc1~1270^2~129 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd93fe4770ca607c7f39260c02941deccbd77b8b;p=linux-2.6 [ALSA] timer: fix timer rescheduling When checking whether a hardware timer needs to be rescheduled, we have to compare against the previously scheduled interval and not against the actual interval between the last two interrupts. Signed-off-by: Clemens Ladisch Signed-off-by: Jaroslav Kysela --- diff --git a/sound/core/timer.c b/sound/core/timer.c index 4fcc8549e4..3a2f8e2ca4 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -718,7 +718,7 @@ void snd_timer_interrupt(struct snd_timer * timer, unsigned long ticks_left) } } if (timer->flags & SNDRV_TIMER_FLG_RESCHED) - snd_timer_reschedule(timer, ticks_left); + snd_timer_reschedule(timer, timer->sticks); if (timer->running) { if (timer->hw.flags & SNDRV_TIMER_HW_STOP) { timer->hw.stop(timer);