Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145353
b: refs/heads/master
c: c87d973
h: refs/heads/master
i:
  145351: b4ce5b6
v: v3
  • Loading branch information
Takashi Iwai committed May 27, 2009
1 parent edcd060 commit eb144a8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 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: 6af3fb72d2437239e5eb13a59e95dc43ccab3e8f
refs/heads/master: c87d9732004b3f8fd82d729f12ccfb96c0df279e
5 changes: 5 additions & 0 deletions trunk/Documentation/sound/alsa/Procfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ card*/pcm*/xrun_debug
When this value is greater than 1, the driver will show the
stack trace additionally. This may help the debugging.

Since 2.6.30, this option also enables the hwptr check using
jiffies. This detects spontaneous invalid pointer callback
values, but can be lead to too much corrections for a (mostly
buggy) hardware that doesn't give smooth pointer updates.

card*/pcm*/sub*/info
The general information of this PCM sub-stream.

Expand Down
9 changes: 8 additions & 1 deletion trunk/sound/core/pcm_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ static int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *substream)
new_hw_ptr = hw_base + pos;
}
}

/* Do jiffies check only in xrun_debug mode */
if (!xrun_debug(substream))
goto no_jiffies_check;

/* Skip the jiffies check for hardwares with BATCH flag.
* Such hardware usually just increases the position at each IRQ,
* thus it can't give any strange position.
Expand Down Expand Up @@ -336,7 +341,9 @@ int snd_pcm_update_hw_ptr(struct snd_pcm_substream *substream)
hw_base = 0;
new_hw_ptr = hw_base + pos;
}
if (((delta * HZ) / runtime->rate) > jdelta + HZ/100) {
/* Do jiffies check only in xrun_debug mode */
if (xrun_debug(substream) &&
((delta * HZ) / runtime->rate) > jdelta + HZ/100) {
hw_ptr_error(substream,
"hw_ptr skipping! "
"(pos=%ld, delta=%ld, period=%ld, jdelta=%lu/%lu)\n",
Expand Down

0 comments on commit eb144a8

Please sign in to comment.