lkml.org 
[lkml]   [2002]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Alsa-devel] Timer?
On Wed, 6 Mar 2002, Paul Davis wrote:

> >Is there any documentation on the timer api that goes beyond what's on the als
> >a-project pages? We're trying to sync Video and Audio, and all we need is a wa
> >y to query the current time relative to some arbitrary start point.
>
> i don't believe that the timer API has much to do with this. its more
> a way of getting a trigger from a timer, not of reading time per se.
>
> to sync audio + video you have to keep track of the number of frames
> you've delivered to both streams. the audio stream is giving you
> exactly the same timing info (albeit implicitly) as it would do if you
> used as a timer.

You're right. But it would be really nice to have a continuous timer
source in some resolution (microseconds?) available for all platforms
to satisfy synchronization requirements.

It's not probably required exactly for this example where timing from one
audio target is sufficient, but I can imagine several applications
synchronized together. As far as I know, Linux has not a continous timer.
I am ready to work on this issue. It is very simple to create an interface
with one ioctl returning struct timeval with the absolute timer value
measured from system boot on i386 using rdtsc instruction.

Perhaps, I'm trying to reinvent wheel, so please, let me know, if someone
solved this issue.

Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project http://www.alsa-project.org
SuSE Linux http://www.suse.com



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.054 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site