aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_lib.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-01-26 12:13:04 -0500
committerTakashi Iwai <tiwai@suse.de>2010-01-26 12:13:04 -0500
commitd0d2c38e3963f4f86a9e62d74f45a371458f2787 (patch)
tree8ab868d67fcd4151e9b7a8158edc0cb2e1a19f66 /sound/core/pcm_lib.c
parentcf944ee55cc318bdb1d4b2f3f5cce3257f7c07b3 (diff)
parente7636925789b042ff9d98c51d48392e8c5549480 (diff)
Merge remote branch 'alsa/devel' into topic/misc
Diffstat (limited to 'sound/core/pcm_lib.c')
-rw-r--r--sound/core/pcm_lib.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 272f15d19017..b546ac2660f9 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -325,8 +325,7 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
325 if (in_interrupt) { 325 if (in_interrupt) {
326 /* we know that one period was processed */ 326 /* we know that one period was processed */
327 /* delta = "expected next hw_ptr" for in_interrupt != 0 */ 327 /* delta = "expected next hw_ptr" for in_interrupt != 0 */
328 delta = old_hw_ptr - (old_hw_ptr % runtime->period_size) 328 delta = runtime->hw_ptr_interrupt + runtime->period_size;
329 + runtime->period_size;
330 if (delta > new_hw_ptr) { 329 if (delta > new_hw_ptr) {
331 hw_base += runtime->buffer_size; 330 hw_base += runtime->buffer_size;
332 if (hw_base >= runtime->boundary) 331 if (hw_base >= runtime->boundary)
@@ -437,6 +436,10 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
437 runtime->silence_size > 0) 436 runtime->silence_size > 0)
438 snd_pcm_playback_silence(substream, new_hw_ptr); 437 snd_pcm_playback_silence(substream, new_hw_ptr);
439 438
439 if (in_interrupt) {
440 runtime->hw_ptr_interrupt = new_hw_ptr -
441 (new_hw_ptr % runtime->period_size);
442 }
440 runtime->hw_ptr_base = hw_base; 443 runtime->hw_ptr_base = hw_base;
441 runtime->status->hw_ptr = new_hw_ptr; 444 runtime->status->hw_ptr = new_hw_ptr;
442 runtime->hw_ptr_jiffies = jiffies; 445 runtime->hw_ptr_jiffies = jiffies;