UPSTREAM: ALSA: timer: Call notifier in the same spinlock
authorTakashi Iwai <tiwai@suse.de>
Wed, 10 Feb 2016 11:47:03 +0000 (12:47 +0100)
committerDanny Wood <danwood76@gmail.com>
Fri, 11 Jan 2019 07:53:48 +0000 (07:53 +0000)
commit75a628896676cd252f15d060cb779c17be50fd99
treee8c4e7ce32d1755b11e1aedb0fda2a680d61b52c
parent0bb920f6422137cb3614360ddfb23caf5ec17958
UPSTREAM: ALSA: timer: Call notifier in the same spinlock

snd_timer_notify1() is called outside the spinlock and it retakes the
lock after the unlock.  This is rather racy, and it's safer to move
snd_timer_notify() call inside the main spinlock.

The patch also contains a slight refactoring / cleanup of the code.
Now all start/stop/continue/pause look more symmetric and a bit better
readable.

Bug: 37240993
Change-Id: Ib90099f88c8b04928a8cdd2808cd9e16da6d519c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Siqi Lin <siqilin@google.com>
sound/core/timer.c