[LAD] discussing HZ (kernel timer frequency) and midi timing

audio-mobster audio-mobster at gmx.de
Wed May 2 23:40:23 UTC 2007

Mulyadi Santosa schrieb:
> hello everyone
>    One thing that draws my attention is MIDI playing. So far, by using
> Timidity and ALSA, I tried to play several MIDI files and it is hard for
> me to notice any lag. I only noticed delayed notes when system is under
> busy load (I run CPU bound program with nice level above -9).
>    Things I'd like to discuss are (I am sorry if they sound dumps
> because I still study all these stuffs):
> 1. Is it me just who is not professional enough to notice any difference
> when using various kernel HZ setting (smooth playing on HZ=x, not so smooth
> when HZ=y and so on)? Or, does the delay fall in non-human-perceptible
> range thus normal human being can not see the difference?
> 2. Is it correct that recent ALSA sequencer use RTC as source timer thus
> kernel HZ is no longer relevant in the sequencer's point of view?
> 3. Related to the system load I mentioned above, I think I was seeing
> scheduling latency and not really a timing latency. If that's correct,
> could you kindly suggest what I must do to show that MIDI timing does
> have any relation with HZ?
> 4. I am also thinking about MIDI recording as a way to show HZ effect.
> Since I don't have any MIDI devices (but I plan to buy one if it's
> really neccessary), I'd like to explore the correctness of this idea
> first. Do you think it is really a proper experiment in HZ test context?
>    Thank you in advance for your help and attention and I am looking
> forward to read your feedback. Sorry if it has been discussed before,
> but I fail to completely research it until today.
> regards,
> Mulyadi
> _______________________________________________
> Linux-audio-dev mailing list
> Linux-audio-dev at lists.linuxaudio.org
> http://lists.linuxaudio.org/mailman/listinfo.cgi/linux-audio-dev
I have
dev.rtc.max-user-freq = 8192
in my sysctl.conf.
Before seq24 timing seemed to be changing between laid back and forward.
Haven't tested since setting.
cat /proc/sys/dev/rtc/max-user-freq
to see your setting now.
echo 8192 > /proc/sys/dev/rtc/max-user-freq
changes setting.


More information about the Linux-audio-dev mailing list