Re: [linux-audio-dev] best method for timing

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] best method for timing
From: Nick D (nixx_AT_nixx.org.uk)
Date: Tue Apr 16 2002 - 21:14:27 EEST


On Tue, 16 Apr 2002 09:34:21 -0400
Paul Davis <pbd_AT_Op.Net> wrote:

> >I need to do some timing code - for some basic kind of sequencing..
> > [..]
> >What approaches have people used, and how successful were they?
>
> poll(2) on /dev/rtc. You will need to be root, or have CAP_RESOURCE,
> to set the frequency of the clock to a useful value, and you will need
> to run SCHED_FIFO to not have the kernel scheduler mess things up.

Cool, thanks (and rob!)

A quick aside - should /dev/rtc be user readable?
On my system (with devfs) its not, i just wondered whether the same was true for other systems?

if i'm not root, i can still set the clock to 64Hz, how bad is that for timing? (not great, i imagine.) say for doing a step sequencer, i think i could get away with that, and use the higer rate if possible.

> ardour and softwerk (which doesn't compile right now) both have code

ah, its not just me then ;-)

> for the RTC. In fact, I'll include ardour's below - its very simple
> really. Any parts that are not clear are almost certainly not
> necessary :)

> alternatively, use the ALSA sequencer and/or timer APIs.

worth a look, i just wish the docs were a bit friendlier..

cheers,

NickD d-.-b


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Apr 16 2002 - 20:01:24 EEST