mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
[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>
This commit is contained in:
parent
17f48ec3f1
commit
6ed5eff025
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue