From: Lennart Poettering <mznyfn@0pointer.de>
To: Takashi Iwai <tiwai@suse.de>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>
Subject: Re: snd_pcm_status_get_tstamp()
Date: Mon, 7 Jan 2008 16:21:55 +0100 [thread overview]
Message-ID: <20080107152155.GC14386@tango.0pointer.de> (raw)
In-Reply-To: <s5hejctao28.wl%tiwai@suse.de>
On Mon, 07.01.08 12:10, Takashi Iwai (tiwai@suse.de) wrote:
> > The documentation for snd_pcm_status_get_tstamp() is not really
> > enlightening. After a call to snd_pcm_status() what data does the
> > tstamp field actually carry? Some kind of system clock timestamp when
> > the data in the status struct was valid, or some kind of sound card
> > clock timestamp that is relative to the point in time where the device
> > was opened/started?
>
> In the normal mode, it's the timestamp at the moment snd_pcm_status()
> is processed. OTOH, the trigger_tstamp is the time that the trigger
> callback was called (e.g. the stream starts / stops).
> The time is the system-wide time, equivalent with the normal
> gettimeofday().
So I figure this is always CLOCK_REALTIME?
I am currently using CLOCK_MONOTONIC for most timekeeping in
PulseAudio. Would it be possible to add an API to ALSA to allow
getting those timestamps in CLOCK_MONOTONIC instead of CLOCK_REALTIME?
Maybe by adding two new time stamp modes, changeble via
snd_pcm_sw_params_set_tstamp_mode()?
Also, may I suggest to add the explanation you wrote above to the
doxygen docs?
Thanks,
Lennart
--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
next prev parent reply other threads:[~2008-01-07 15:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-31 16:53 snd_pcm_status_get_tstamp() Lennart Poettering
2008-01-07 11:10 ` snd_pcm_status_get_tstamp() Takashi Iwai
2008-01-07 15:21 ` Lennart Poettering [this message]
2008-01-07 15:27 ` snd_pcm_status_get_tstamp() Takashi Iwai
2008-01-07 15:57 ` snd_pcm_status_get_tstamp() Jaroslav Kysela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080107152155.GC14386@tango.0pointer.de \
--to=mznyfn@0pointer.de \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox