diff options
author | Jaroslav Kysela <perex@perex.cz> | 2010-01-05 17:19:34 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2010-01-07 15:47:38 +0100 |
commit | f240406babfe1526998e10583ea5eccc2676a433 (patch) | |
tree | 311f0dd33f0ec87bd0ac48d4871f67ad78b9ee36 /sound/core/pcm_native.c | |
parent | 4d96eb255c53ab5e39b37fd4d484ea3dc39ab456 (diff) | |
download | op-kernel-dev-f240406babfe1526998e10583ea5eccc2676a433.zip op-kernel-dev-f240406babfe1526998e10583ea5eccc2676a433.tar.gz |
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>
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r-- | sound/core/pcm_native.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index 29ab46a1..8e777f7 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c @@ -1247,8 +1247,6 @@ static int snd_pcm_do_reset(struct snd_pcm_substream *substream, int state) if (err < 0) return err; runtime->hw_ptr_base = 0; - runtime->hw_ptr_interrupt = runtime->status->hw_ptr - - runtime->status->hw_ptr % runtime->period_size; runtime->silence_start = runtime->status->hw_ptr; runtime->silence_filled = 0; return 0; |