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: Fri, 15 Jun 2012 05:02:38 -0500 [thread overview]
Message-ID: <4FDB083E.9060903@linux.intel.com> (raw)
In-Reply-To: <s5hfw9yqr6e.wl%tiwai@suse.de>
>> +struct azx_timecounter {
>> + cycle_t cycle_last;
>> + cycle_t mask;
>> + cycle_t elapsed_cycles;
>> + u64 initial_time_nsec;
>> + u32 mult;
>> + u32 shift;
>> +};
>
> Any reason not using the normal struct timecounter stuff?
> Most of the open codes can be replaced gracefully with functions /
> macros there, I guess.
Yes there is a reason. The conversion from wall clock cycles to ns is a
fractional operation (125/3 ratio from 24 MHz to 1 GHz). If you do this
conversion to ns every time, you will accumulate rounding errors. That
doesn't seem like a very good design if the precision depends on the
duration of the track...
On top of this, I couldn't find a way to pass the 'chip' argument in the
cyclecounter .read() operation to map it to azx_read.
Makes sense?
-Pierre
next prev parent reply other threads:[~2012-06-15 10:02 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
2012-06-14 7:38 ` Takashi Iwai
2012-06-15 10:02 ` Pierre-Louis Bossart [this message]
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=4FDB083E.9060903@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.