aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2006-07-17 16:51:37 +0200
committerJaroslav Kysela <perex@suse.cz>2006-09-23 10:38:03 +0200
commit6ed5eff025b72cb84a884d4be05f854f13b1542f (patch)
treec6cf92ad2e646b8134367c2db40168f5e4c651d4
parent17f48ec3f15ddb8080b151304ee887c68f7e4650 (diff)
[ALSA] system timer: accumulate correction for multiple lost ticks
When multiple timer interrupts arrive too late, correct for all delays instead of ignoring the earlier ones. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
-rw-r--r--sound/core/timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c
index 86357007259..0f6e6727ff7 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -971,7 +971,7 @@ static void snd_timer_s_function(unsigned long data)
struct snd_timer_system_private *priv = timer->private_data;
unsigned long jiff = jiffies;
if (time_after(jiff, priv->last_expires))
- priv->correction = (long)jiff - (long)priv->last_expires;
+ priv->correction += (long)jiff - (long)priv->last_expires;
snd_timer_interrupt(timer, (long)jiff - (long)priv->last_jiffies);
}