diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2006-07-17 10:50:56 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-09-23 04:37:58 -0400 |
commit | 17f48ec3f15ddb8080b151304ee887c68f7e4650 (patch) | |
tree | 05d420b98cff7b2c28c0051be74db0196b6edd1e /sound/core | |
parent | 7bc5ba7e02f63a5732fdf99e7471f54738f6f918 (diff) |
[ALSA] system timer: fix lost ticks correction adjustment
Fix the adjustment of the lost ticks correction variable in the case
when the correction has been fully taken into account in the next timer
expiration value. Subtracting the scheduled ticks value would result in
an underflow.
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 7e5e562fe356..86357007259d 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c | |||
@@ -987,7 +987,7 @@ static int snd_timer_s_start(struct snd_timer * timer) | |||
987 | njiff++; | 987 | njiff++; |
988 | } else { | 988 | } else { |
989 | njiff += timer->sticks - priv->correction; | 989 | njiff += timer->sticks - priv->correction; |
990 | priv->correction -= timer->sticks; | 990 | priv->correction = 0; |
991 | } | 991 | } |
992 | priv->last_expires = priv->tlist.expires = njiff; | 992 | priv->last_expires = priv->tlist.expires = njiff; |
993 | add_timer(&priv->tlist); | 993 | add_timer(&priv->tlist); |