diff options
author | Jaroslav Kysela <perex@perex.cz> | 2010-08-18 14:16:54 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2010-08-19 09:15:24 +0200 |
commit | d7d28bc29f4ea7c2d23ed002a9973c64a92bcdb8 (patch) | |
tree | 74bd0f5fc69f1b2b937921d01dcc5e3b52b77efc /include | |
parent | 597603d615d2b19a9e451d8cfac24372856a522d (diff) | |
download | linux-d7d28bc29f4ea7c2d23ed002a9973c64a92bcdb8.tar.bz2 |
ALSA: pcm midlevel code - add time check for double interrupt acknowledge
The current code in pcm_lib.c do all checks using only the position
in the ring buffer. Unfortunately, where the interrupts gets delayed or
merged into one, we need another timing source to check when the
buffer size boundary overlaps to avoid the wrong updating of the
ring buffer pointers.
This code uses jiffies to check the right time window without any
performance impact.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'include')
-rw-r--r-- | include/sound/pcm.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index dd76cdede64d..54c4ccf6fec2 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -274,6 +274,7 @@ struct snd_pcm_runtime { snd_pcm_uframes_t hw_ptr_base; /* Position at buffer restart */ snd_pcm_uframes_t hw_ptr_interrupt; /* Position at interrupt time */ unsigned long hw_ptr_jiffies; /* Time when hw_ptr is updated */ + unsigned long hw_ptr_buffer_jiffies; /* buffer time in jiffies */ snd_pcm_sframes_t delay; /* extra delay; typically FIFO size */ /* -- HW params -- */ |