OSDN Git Service
(root)
/
android-x86
/
external-alsa-lib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea865bb
)
pcm: rate: fix hw_ptr exceed the boundary
author
Shengjiu Wang
<shengjiu.wang@freescale.com>
Mon, 14 Jul 2014 08:55:48 +0000
(16:55 +0800)
committer
Takashi Iwai
<tiwai@suse.de>
Mon, 14 Jul 2014 15:34:06 +0000
(17:34 +0200)
For long time test case, the hw_ptr will exceed the boundary, then cause
the avail size wrong.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_rate.c
patch
|
blob
|
history
diff --git
a/src/pcm/pcm_rate.c
b/src/pcm/pcm_rate.c
index
7f667d4
..
2563d82
100644
(file)
--- a/
src/pcm/pcm_rate.c
+++ b/
src/pcm/pcm_rate.c
@@
-574,6
+574,8
@@
static inline void snd_pcm_rate_sync_hwptr(snd_pcm_t *pcm)
rate->hw_ptr =
(slave_hw_ptr / rate->gen.slave->period_size) * pcm->period_size +
rate->ops.input_frames(rate->obj, slave_hw_ptr % rate->gen.slave->period_size);
+
+ rate->hw_ptr %= pcm->boundary;
}
static int snd_pcm_rate_hwsync(snd_pcm_t *pcm)