aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/pcm.h
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2009-04-10 06:28:58 -0400
committerJaroslav Kysela <perex@perex.cz>2009-04-10 06:28:58 -0400
commitbbf6ad1399e9516b0a95de3ad58ffbaed670e4cc (patch)
treee8803b502eb20956537718e09430d97fec970457 /include/sound/pcm.h
parentfa00e046b41663cbda9b1affc0594669e5f14219 (diff)
[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/pcm.h')
-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 {
268 int overrange; 268 int overrange;
269 snd_pcm_uframes_t avail_max; 269 snd_pcm_uframes_t avail_max;
270 snd_pcm_uframes_t hw_ptr_base; /* Position at buffer restart */ 270 snd_pcm_uframes_t hw_ptr_base; /* Position at buffer restart */
271 snd_pcm_uframes_t hw_ptr_interrupt; /* Position at interrupt time*/ 271 snd_pcm_uframes_t hw_ptr_interrupt; /* Position at interrupt time */
272 unsigned long hw_ptr_jiffies; /* Time when hw_ptr is updated */
272 273
273 /* -- HW params -- */ 274 /* -- HW params -- */
274 snd_pcm_access_t access; /* access mode */ 275 snd_pcm_access_t access; /* access mode */