aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2009-04-10 12:28:58 +0200
committerJaroslav Kysela <perex@perex.cz>2009-04-10 12:28:58 +0200
commitbbf6ad1399e9516b0a95de3ad58ffbaed670e4cc (patch)
treee8803b502eb20956537718e09430d97fec970457 /include/sound
parent[ALSA] hda_intel: fix unexpected ring buffer positions (diff)
downloadlinux-dev-bbf6ad1399e9516b0a95de3ad58ffbaed670e4cc.tar.xz
linux-dev-bbf6ad1399e9516b0a95de3ad58ffbaed670e4cc.zip
[ALSA] pcm-midlevel: Add more strict buffer position checks based on jiffies
Some drivers like Intel8x0 or Intel HDA are broken for some hardware variants. This patch adds more strict buffer position checks based on jiffies when internal hw_ptr is updated. Enable xrun_debug to see mangling of wrong positions. As a side effect, the hw_ptr interrupt update routine might do slightly better job when many interrupts are lost. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/pcm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 8904b1900d7f..c17296891617 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -268,7 +268,8 @@ struct snd_pcm_runtime {
int overrange;
snd_pcm_uframes_t avail_max;
snd_pcm_uframes_t hw_ptr_base; /* Position at buffer restart */
- snd_pcm_uframes_t hw_ptr_interrupt; /* Position at interrupt time*/
+ snd_pcm_uframes_t hw_ptr_interrupt; /* Position at interrupt time */
+ unsigned long hw_ptr_jiffies; /* Time when hw_ptr is updated */
/* -- HW params -- */
snd_pcm_access_t access; /* access mode */