aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
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 /sound/core
parent[ALSA] system timer: fix lost ticks correction adjustment (diff)
downloadlinux-dev-6ed5eff025b72cb84a884d4be05f854f13b1542f.tar.xz
linux-dev-6ed5eff025b72cb84a884d4be05f854f13b1542f.zip
[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>
Diffstat (limited to 'sound/core')
-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 86357007259d..0f6e6727ff7c 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);
}