summaryrefslogtreecommitdiff
path: root/sound/core/pcm_native.c
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2010-01-05 16:19:34 (GMT)
committerJaroslav Kysela <perex@perex.cz>2010-01-07 14:47:38 (GMT)
commitf240406babfe1526998e10583ea5eccc2676a433 (patch)
tree311f0dd33f0ec87bd0ac48d4871f67ad78b9ee36 /sound/core/pcm_native.c
parent4d96eb255c53ab5e39b37fd4d484ea3dc39ab456 (diff)
downloadlinux-fsl-qoriq-f240406babfe1526998e10583ea5eccc2676a433.tar.xz
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.c2
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;