From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Subject: Re: [PATCH 2/2] ALSA: hda: support for wallclock timestamps
Date: Thu, 14 Jun 2012 12:01:47 -0500 [thread overview]
Message-ID: <4FDA18FB.6060404@linux.intel.com> (raw)
In-Reply-To: <4FD99DA7.60206@ladisch.de>
On 6/14/2012 3:15 AM, Clemens Ladisch wrote:
>> As long as you have 2 periods or events per 179s, the wrap-around can
>> be detected without any issues. It's explicitely handled in the code.
> AFAICS there is no code that enforces the 179s restriction.
179s corresponds to a 33MB buffer for stereo 48kHz 16bit. There is
indeed nothing preventing the wrap-around at the moment but this could
be achieved by limiting the buffer size.
> And why are you using a separate wallclock timer instead of the sample
> count? Does the higher resolution result in a noticeable improvement?
The wallclock is common for each HDAudio controller, this helps you
build _one_ estimator for the drift between audio time and system
(monotonic) time. It'd help avoid what PulseAudio does today, ie a
different drift estimate per sink/source. If you work with sample
counts, you'll have separate results for each devices and possibly
different ASRC in user-space. Also the precision of sample counters is
limited to 10us for 48kHz, a lot higher than what we can get with
PTP-based schemes. The accuracy of the wall clock is 41.6 ns, order of
magnitude more precise.
>
> How should userspace detect streams whose sample clock is not
> synchronous with this wall clock, such as digital inputs?
Good point. I didn't think about this case, i need to look into it.
Thanks for your feedback, much appreciated
-Pierre
next prev parent reply other threads:[~2012-06-14 17:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-13 20:26 [PATCH 0/2] RFC: support for audio wall clock Pierre-Louis Bossart
2012-06-13 20:26 ` [PATCH 1/2] ALSA: core: add hooks for audio timestamps read from WALLCLOCK Pierre-Louis Bossart
2012-06-14 7:27 ` Takashi Iwai
2012-06-15 10:07 ` Pierre-Louis Bossart
2012-06-13 20:26 ` [PATCH 2/2] ALSA: hda: support for wallclock timestamps Pierre-Louis Bossart
2012-06-14 3:32 ` Wang Xingchao
2012-06-14 4:57 ` Pierre-Louis Bossart
2012-06-14 8:15 ` Clemens Ladisch
2012-06-14 17:01 ` Pierre-Louis Bossart [this message]
2012-06-14 7:38 ` Takashi Iwai
2012-06-15 10:02 ` Pierre-Louis Bossart
2012-06-15 10:34 ` Takashi Iwai
-- strict thread matches above, loose matches on Subject: below --
2012-06-28 21:12 [PATCH 0/2] RFC: support for audio wall clock Pierre-Louis Bossart
2012-06-28 21:12 ` [PATCH 2/2] ALSA: hda: support for wallclock timestamps Pierre-Louis Bossart
2012-09-28 8:15 [PATCH 1/2] ALSA: core: add hooks for audio timestamps Pierre-Louis Bossart
2012-09-28 8:15 ` [PATCH 2/2] ALSA: hda: support for wallclock timestamps Pierre-Louis Bossart
2012-09-28 9:33 ` Clemens Ladisch
2012-09-29 20:12 ` Pierre-Louis Bossart
2012-09-30 10:12 ` Clemens Ladisch
2012-09-29 1:47 ` Raymond Yau
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=4FDA18FB.6060404@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.