[ALSA] Fix possible races in timer callbacks