From b751eef1fdffca5532344285f2fad0c60d2f0158 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 13 Dec 2007 10:19:42 +0100 Subject: [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 --- sound/core/pcm_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/core/pcm_lib.c') 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 snd_pcm_sframes_t delta; if (runtime->tstamp_mode == SNDRV_PCM_TSTAMP_MMAP) - getnstimeofday((struct timespec *)&runtime->status->tstamp); + snd_pcm_gettime(runtime, (struct timespec *)&runtime->status->tstamp); pos = snd_pcm_update_hw_ptr_pos(substream, runtime); if (pos == SNDRV_PCM_POS_XRUN) { xrun(substream); -- cgit v1.2.3