diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2006-07-17 10:51:37 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-09-23 04:38:03 -0400 |
commit | 6ed5eff025b72cb84a884d4be05f854f13b1542f (patch) | |
tree | c6cf92ad2e646b8134367c2db40168f5e4c651d4 /sound/core | |
parent | 17f48ec3f15ddb8080b151304ee887c68f7e4650 (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>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/timer.c | 2 |
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) | |||
971 | struct snd_timer_system_private *priv = timer->private_data; | 971 | struct snd_timer_system_private *priv = timer->private_data; |
972 | unsigned long jiff = jiffies; | 972 | unsigned long jiff = jiffies; |
973 | if (time_after(jiff, priv->last_expires)) | 973 | if (time_after(jiff, priv->last_expires)) |
974 | priv->correction = (long)jiff - (long)priv->last_expires; | 974 | priv->correction += (long)jiff - (long)priv->last_expires; |
975 | snd_timer_interrupt(timer, (long)jiff - (long)priv->last_jiffies); | 975 | snd_timer_interrupt(timer, (long)jiff - (long)priv->last_jiffies); |
976 | } | 976 | } |
977 | 977 | ||