diff options
author | Takashi Iwai <tiwai@suse.de> | 2017-02-07 16:22:44 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-02-07 16:27:42 +0100 |
commit | 8d8c9aec9ae31b17d9c8ceec8eaa2a0192b6de52 (patch) | |
tree | 4e934dca3a62eaac7902bc592561092946969773 /drivers | |
parent | 40ce4b5d70b0c7e70c3e831e56d2586b57b54915 (diff) |
ALSA: x86: Avoid unconditional call of snd_pcm_period_elapsed()
At the interrupt handler, we usually call snd_pcm_period_elapsed() to
inform the PCM core to proceed the hwptr. However, the hwptr update
might have been already processed by the explicit call of PCM pointer
callback via another thread. If both happen concurrently, the call of
snd_pcm_period_elapsed() might be wrong.
Here is the fix for this slightly possible race: had_process_ringbuf()
returns the number of processed BDs, and the irq handler calls
snd_pcm_period_elapsed() only when it's not zero.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions