]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: seq: Fix time account regression
authorTakashi Iwai <tiwai@suse.de>
Tue, 25 Oct 2016 13:56:35 +0000 (15:56 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 25 Oct 2016 14:00:46 +0000 (16:00 +0200)
commitd12b54c129920bd3787639fa15a431ff8e69fa20
tree5a352f4afed811ce33b0a8ea378c36b89df1b6a7
parent9255bd040742fcb8e6662a5b8193ce3cc4fb5531
ALSA: seq: Fix time account regression

The recent rewrite of the sequencer time accounting using timespec64
in the commit [c37af5fddc56: ALSA: seq_timer: use monotonic times
internally] introduced a bad regression.  Namely, the time reported
back doesn't increase but goes back and forth.

The culprit was obvious: the delta is stored to the result (cur_time =
delta), instead of adding the delta (cur_time += delta)!

Let's fix it.

Fixes: c37af5fddc56 ('ALSA: seq_timer: use monotonic times internally')
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=177571
Reported-by: Yves Guillemot <yc.guillemot@wanadoo.fr>
Cc: <stable@vger.kernel.org> # v4.8+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/seq/seq_timer.c