projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1250932
)
ALSA: pcm_lib: fix "something must be really wrong" condition
author
Jaroslav Kysela
<perex@perex.cz>
Fri, 8 Jan 2010 07:43:01 +0000
(08:43 +0100)
committer
Jaroslav Kysela
<perex@perex.cz>
Fri, 8 Jan 2010 07:46:45 +0000
(08:46 +0100)
When runtime->periods == 1 or when pointer crosses end of ring buffer,
the delta might be greater than buffer_size.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
sound/core/pcm_lib.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/core/pcm_lib.c
b/sound/core/pcm_lib.c
index a63226232ef4e60988ae129f2c65080328055c8a..c7b35b20e65992048f40e616b2812829e1760ee9 100644
(file)
--- a/
sound/core/pcm_lib.c
+++ b/
sound/core/pcm_lib.c
@@
-362,7
+362,7
@@
static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
(unsigned long)runtime->hw_ptr_base);
}
/* something must be really wrong */
- if (delta >= runtime->buffer_size) {
+ if (delta >= runtime->buffer_size
+ runtime->period_size
) {
hw_ptr_error(substream,
"Unexpected hw_pointer value %s"
"(stream=%i, pos=%ld, new_hw_ptr=%ld, "