aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_lib.c
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2007-12-13 04:19:42 -0500
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:29:31 -0500
commitb751eef1fdffca5532344285f2fad0c60d2f0158 (patch)
treed504104c6315a8abc4b3f657f8f4828fb55a8795 /sound/core/pcm_lib.c
parent25543fa785a32ce22e7374ba403eb6d38854d037 (diff)
[ALSA] Use posix clock monotonic for PCM and timer timestamps
We need an accurate and continuous (monotonic) time sources to do accurate synchronization among more timing sources. This patch allows to enable monotonic timestamps for ALSA PCM devices and enables monotonic timestamps for ALSA timer devices. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/core/pcm_lib.c')
-rw-r--r--sound/core/pcm_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 93d7ca50273..db3d7e934ec 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -188,7 +188,7 @@ static inline int snd_pcm_update_hw_ptr_interrupt(struct snd_pcm_substream *subs
188 snd_pcm_sframes_t delta; 188 snd_pcm_sframes_t delta;
189 189
190 if (runtime->tstamp_mode == SNDRV_PCM_TSTAMP_MMAP) 190 if (runtime->tstamp_mode == SNDRV_PCM_TSTAMP_MMAP)
191 getnstimeofday((struct timespec *)&runtime->status->tstamp); 191 snd_pcm_gettime(runtime, (struct timespec *)&runtime->status->tstamp);
192 pos = snd_pcm_update_hw_ptr_pos(substream, runtime); 192 pos = snd_pcm_update_hw_ptr_pos(substream, runtime);
193 if (pos == SNDRV_PCM_POS_XRUN) { 193 if (pos == SNDRV_PCM_POS_XRUN) {
194 xrun(substream); 194 xrun(substream);