diff options
author | Jaroslav Kysela <perex@perex.cz> | 2010-01-26 11:08:24 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2010-01-26 11:50:50 -0500 |
commit | e7636925789b042ff9d98c51d48392e8c5549480 (patch) | |
tree | 4462f95057322b7d63d3b625644abd1f8fef6d7a /include/sound | |
parent | fd0b092a7b14559e2ff17ef3aaefb5d8adc7e15f (diff) |
ALSA: pcm_lib - return back hw_ptr_interrupt
Clemens Ladisch noted for hw_ptr_removal in "cleanup & merge hw_ptr
update functions" commit:
"It is possible for the status/delay ioctls to be called when the sound
card's pointer register alreay shows a position at the beginning of the
new period, but immediately before the interrupt is actually executed.
(This happens regularly on a SMP machine with mplayer.) When that
happens, the code thinks that the position must be at least one period
ahead of the current position and drops an entire buffer of data."
Return back the hw_ptr_interrupt variable. The last interrupt pointer
is always computed from the latest hw_ptr instead of tracking it
separately (in this case all hw_ptr checks and modifications might
influence also hw_ptr_interrupt and it is difficult to keep it
consistent).
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'include/sound')
-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 3bc9bca771ec..13bc83ca35fb 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -271,6 +271,7 @@ struct snd_pcm_runtime { | |||
271 | int overrange; | 271 | int overrange; |
272 | snd_pcm_uframes_t avail_max; | 272 | snd_pcm_uframes_t avail_max; |
273 | snd_pcm_uframes_t hw_ptr_base; /* Position at buffer restart */ | 273 | snd_pcm_uframes_t hw_ptr_base; /* Position at buffer restart */ |
274 | snd_pcm_uframes_t hw_ptr_interrupt; /* Position at interrupt time */ | ||
274 | unsigned long hw_ptr_jiffies; /* Time when hw_ptr is updated */ | 275 | unsigned long hw_ptr_jiffies; /* Time when hw_ptr is updated */ |
275 | snd_pcm_sframes_t delay; /* extra delay; typically FIFO size */ | 276 | snd_pcm_sframes_t delay; /* extra delay; typically FIFO size */ |
276 | 277 | ||