On Sat, 31 Dec 2005, Ross Vandegrift wrote:
On Sat, Dec 31, 2005 at 02:11:19PM +0200, Sergei Steshenko wrote:
- I have already suggested to measure average interrupt request frequency.
If a card is playing N samples buffer with actual sampling frequency Fs, then
time between interrupts per buffer empty is (N / Fs), i.e. for two cards it
will be
(N /Fs1), (N/Fs2) respectively.
That is, average interrupt request frequency will be (Fs1/N), (Fs2/N)
respectively.
The device to measure the time can be the computer RTC (Real Time Clock)
which is independent from both Fs1, Fs2.
Hmmm, wouldn't this approach require constant playback? You need a
way to track and correct jitter, and if you're not actively playing
audio (ie, generating interrupts to be measured), you won't know
anything about what jitter has affected your time source.
This would probably work really well on multi-channel cards -
dedicated one channel to playback silence all the time and use the
results to sync playback across the two clocks. But that still
prevents people from getting a lot of channels from cheap cards.
That's the great thing about the RTC clock - it's job is just to tick!
But the problem is getting those ticks out. In particular, with the new
timer chips on the newer chipsets, rtc works by polling, which is
notoriously bad at accurate timing.
Even with interrupts, you cannot have them too often or your computer will
not do much, and the timer interrupt could be delayed. Ie, your computer
does a whole lot of stuff besides audio all of which can interfer with the
timing.
--
William G. Unruh | Canadian Institute for| Tel: +1(604)822-3273
Physics&Astronomy | Advanced Research | Fax: +1(604)822-5324
UBC, Vancouver,BC | Program in Cosmology | [EMAIL PROTECTED]
Canada V6T 1Z1 | and Gravity | www.theory.physics.ubc.ca/
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user