Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182655
b: refs/heads/master
c: ed69c6a
h: refs/heads/master
i:
  182653: 59352ee
  182651: 7d728e0
  182647: b21ecc6
  182639: 00be9a1
  182623: 3a17387
  182591: 6169847
  182527: b993e02
v: v3
  • Loading branch information
Jaroslav Kysela committed Jan 13, 2010
1 parent 1ce1be2 commit f2a604e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c4cfe66c4c2d5a91b3734ffb4e2bad0badd5c874
refs/heads/master: ed69c6a8eef679f2783848ed624897a937a434ac
8 changes: 5 additions & 3 deletions trunk/sound/core/pcm_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
+ HZ/100);
/* move new_hw_ptr according jiffies not pos variable */
new_hw_ptr = old_hw_ptr;
hw_base = delta;
/* use loop to avoid checks for delta overflows */
/* the delta value is small or zero in most cases */
while (delta > 0) {
Expand All @@ -403,18 +404,19 @@ static int snd_pcm_update_hw_ptr0(struct snd_pcm_substream *substream,
delta--;
}
/* align hw_base to buffer_size */
hw_base = new_hw_ptr - (new_hw_ptr % runtime->buffer_size);
delta = 0;
hw_ptr_error(substream,
"hw_ptr skipping! %s"
"(pos=%ld, delta=%ld, period=%ld, "
"jdelta=%lu/%lu/%lu, hw_ptr=%ld/%ld)\n",
in_interrupt ? "[Q] " : "",
(long)pos, (long)hdelta,
(long)runtime->period_size, jdelta,
((hdelta * HZ) / runtime->rate), delta,
((hdelta * HZ) / runtime->rate), hw_base,
(unsigned long)old_hw_ptr,
(unsigned long)new_hw_ptr);
/* reset values to proper state */
delta = 0;
hw_base = new_hw_ptr - (new_hw_ptr % runtime->buffer_size);
}
no_jiffies_check:
if (delta > runtime->period_size + runtime->period_size / 2) {
Expand Down

0 comments on commit f2a604e

Please sign in to comment.