On Saturday 03 November 2012, Tim E. Real wrote:
On November 2, 2012 01:29:18 PM Pedro Lopez-Cabanillas
wrote:
On Friday 02 November 2012, Clemens Ladisch
wrote:
Tim E. Real wrote:
I believe there is an RTC/HPET library now.
We should probably try to use it instead of this awkward /sys tree
stuff, eh?
For four years, ALSA's default has been the high-resolution timer, so
you don't need to try to use anything.
This is true when a program (properly) uses the ALSA Sequencer
scheduled output for MIDI playback, but the last time I've checked
MusE it didn't.
Are you saying that we can't have our ALSA timer usage and make it
high-res as well?
No. I am not saying that. I've said that this ALSA's default setting is only
applicable when you use ALSA sequencer scheduled output.
And this setting is available as a kernel configuration option
(CONFIG_SND_SEQ_HRTIMER_DEFAULT) so it may be changed by the distros, or the
user compiling the kernel.
Or we must first jump through a few hoops - ie those
settings? ie the ALSA scheduler does not require you to poke the /sys
tree, or wherever?
ALSA timer interface can also be used to get access to high resolution
timers, but you need to request this global timer class explicitly.
If you want an example, look at drumstick-timertest:
http://drumstick.sourceforge.net/docs/timertest.cpp-example.html
This program
uses the ALSA timer interface, and immediate MIDI output.
Yes. I noticed that long ago. I'm not knowledgeable enough (or patient?)
to implement ALSA scheduling but I did read up on it.
Sometimes it's hard to follow docs of various projects when they
don't (can't) show links to kernel header information, or other headers.
But yeah, scheduler definitely much cooler - let ALSA handle all the
timing. Better for high-res, eh?
Question: If we implemented ALSA scheduling instead of 'direct',
that would allow us to remove our ALSA timer usage completely, right?
Yes.
I mentioned one of our devs is trying to get MusE
running on BSD.
It has a stripped ALSA support package, also found in other distros,
oddly labeled as being specifically for DSSI yet is obviously useful for
everyone. Apparently there are no ALSA timers in this package.
So he made the good point that ALSA needs to be a MusE compile option,
to let Jack handle the particular sound system (OSS).
Slowly getting to that point. I still do remember when I announced our
Jack Midi support that someone in LAD urged the very same, I haven't
forgotten...
Actually our dev asked about removing our ALSA support altogether,
but there are benefits to having a native ALSA driver.
Thanks.
Tim.
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user(a)lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-user