[ALSA] timer: fix timer rescheduling
authorClemens Ladisch <clemens@ladisch.de>
Mon, 17 Jul 2006 14:53:57 +0000 (16:53 +0200)
committerJaroslav Kysela <perex@suse.cz>
Sat, 23 Sep 2006 08:38:13 +0000 (10:38 +0200)
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 <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/core/timer.c

index 4fcc8549e4a646beffa1c33ab4545516c0c35a99..3a2f8e2ca401ec019ac69c313a27b8d99ed240bd 100644 (file)
@@ -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);