]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm_lib - cleanup & merge hw_ptr update functions
authorJaroslav Kysela <perex@perex.cz>
Tue, 5 Jan 2010 16:19:34 +0000 (17:19 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 7 Jan 2010 14:47:38 +0000 (15:47 +0100)
commit842a237731064eca7abbb1efb83d1897458a7174
tree311f0dd33f0ec87bd0ac48d4871f67ad78b9ee36
parentda45909db1bb59f5d064d8577a24563fd30f61b9
ALSA: pcm_lib - cleanup & merge hw_ptr update functions

Do general cleanup in snd_pcm_update_hw_ptr*() routines and merge them.
The main change is hw_ptr_interrupt variable removal to simplify code
logic. This variable can be computed directly from hw_ptr.

Ensure that updated hw_ptr is not lower than previous one (it was possible
with old code in some obscure situations when interrupt was delayed or
the lowlevel driver returns wrong ring buffer position value).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
include/sound/pcm.h
include/sound/pcm_oss.h
sound/core/oss/pcm_oss.c
sound/core/pcm_lib.c
sound/core/pcm_native.c