FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 12-26-2009, 10:57 PM
Ralf Mardorf
 
Default HPET

Pardon Rui

Gustin and I are clueless because of HPET. Do you know any link? Or is
there an understandable answer because of the hpet_max_user_freq issue?
Just ignore this mail, if it's to hard to explain, sorry :S. I still try
to optimize Qtractor for usage with external equipment.

Gustin Johnson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Ralf Mardorf wrote:
>
>>>> I do know that MIDI jitter by Linux to equipment external the computer
>>>> will decrease when using HR timer instead of System timer. I don't know
>>>> the impact of the value for hpet_max_user_freq.
>>>>
>>>>
>>> What is the difference?
>>>
>>>
>> http://www.mail-archive.com/64studio-users@lists.64studio.com/msg01458.html
>>
>>
> To be more specific, define for me "System Timer" and "High Performance
> Event Timer" (HPET) and how they are different.
>
> Interestingly Windows XP does not support HPET even if the hardware is
> equipped with it.
>

AFAIK the system timer is using RTC and it's a programmable timer that
interrupts the hardware periodically, while HPET won't interrupt the
hardware in such a static way, because of the much higher resolution
there will be less conflicts because of interrupts, dunno how this
works. I guess to google for "tickless timer" might give some answers:

http://www.google.de/#hl=de&ei=bJo2S7L5NdH5_Aar05iMCQ&sa=X&oi=spell&res num=0&ct=result&cd=1&ved=0CBoQBSgA&q=tickless+time r&spell=1&fp=6e1a413bb204dd20

I didn't read the first link, but this one seems to be interesting and I
guess I'll read it some day:

http://kerneltrap.org/node/6750

Dunno if it's set up for my XP, but I once read a howto enable it for
XP. It was just one short line to add somewhere. I guess you need
service package 3.

I searched, but I didn't found the link:

http://www.google.de/#hl=de&q=HPET+XP+sp3&meta=&aq=f&oq=HPET+XP+sp3&fp= 6e1a413bb204dd20

There's a discussion about this issue:

http://forum.slysoft.com/archive/index.php/t-22236.html

Somewhere is a thread or Wiki about HPET on different OSs and IIRC there
is described how to enable it for XP. But if it should be enabled, it's
unclear if ASIO will use it.

>> I can't remember if I used 64 or 1024 for hpet_max_user_freq, but IIRC
>> on LAD there was the advice to build the kernel with using 64 by
>> default, even if I should have used 1024, 64 might be the better value.
>>
>
> That does not seem like good advice if we are talking about the same
> thing.
>

A shot in the dark: The frequency always is 1,000,000,000 Hz for HPET
timers, while the maximal frequency for system timers is 1,000 Hz. It
might be that hpet_max_user_freq is a value how precise an interrupt has
to be forced. If I guess correctly , HR timers don't force it when
there are no interrupts needed, while a normal timer always does this
periodically. I can imagine that a value of 64 does mean, that there are
some kind of ticks for the tickless system , e.g. ... this might be
complete nonsense ... 1,000,000,000/64=15625000, while
1,000,000,000/1024=976562.5 ... thus the higher value, will cause a less
precise resolution for sync. I also have a theory the other way around
. We should ask this on LAD, instead of puzzling over this issue.
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 12-27-2009, 04:19 AM
Gustin Johnson
 
Default HPET

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ralf Mardorf wrote:
> Pardon Rui
>
> Gustin and I are clueless because of HPET. Do you know any link? Or is

I know what an HPET is, I would to know what you mean by "HR Timer" and
"System timer".

A good primer on what an HPET is, what hardware and OSs support it, can
be found on
wikipedia:http://en.wikipedia.org/wiki/High_Precision_Event_Timer

> there an understandable answer because of the hpet_max_user_freq issue?

I have no idea what this does.

<snip>

>
> Gustin Johnson wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Ralf Mardorf wrote:
>>
>>>>> I do know that MIDI jitter by Linux to equipment external the
>>>>> computer will decrease when using HR timer instead of System timer.
>>>>> I don't know the impact of the value for hpet_max_user_freq.
>>>>>
>>>> What is the difference?
>>>>
>>> http://www.mail-archive.com/64studio-users@lists.64studio.com/msg01458.html
>>>
>>>
>>>
>> To be more specific, define for me "System Timer" and "High Performance
>> Event Timer" (HPET) and how they are different.
>>
>> Interestingly Windows XP does not support HPET even if the hardware is
>> equipped with it.
>>
>
> AFAIK the system timer is using RTC and it's a programmable timer that
> interrupts the hardware periodically, while HPET won't interrupt the
> hardware in such a static way, because of the much higher resolution
> there will be less conflicts because of interrupts, dunno how this
> works. I guess to google for "tickless timer" might give some answers:
>
> http://www.google.de/#hl=de&ei=bJo2S7L5NdH5_Aar05iMCQ&sa=X&oi=spell&res num=0&ct=result&cd=1&ved=0CBoQBSgA&q=tickless+time r&spell=1&fp=6e1a413bb204dd20
>
>
> I didn't read the first link, but this one seems to be interesting and I
> guess I'll read it some day:
>
> http://kerneltrap.org/node/6750
>
> Dunno if it's set up for my XP, but I once read a howto enable it for
> XP. It was just one short line to add somewhere. I guess you need
> service package 3.
>
> I searched, but I didn't found the link:
>
> http://www.google.de/#hl=de&q=HPET+XP+sp3&meta=&aq=f&oq=HPET+XP+sp3&fp= 6e1a413bb204dd20
>
>
> There's a discussion about this issue:
>
> http://forum.slysoft.com/archive/index.php/t-22236.html
>
> Somewhere is a thread or Wiki about HPET on different OSs and IIRC there
> is described how to enable it for XP. But if it should be enabled, it's
> unclear if ASIO will use it.
>
>>> I can't remember if I used 64 or 1024 for hpet_max_user_freq, but
>>> IIRC on LAD there was the advice to build the kernel with using 64 by
>>> default, even if I should have used 1024, 64 might be the better value.
>>>
>>
>> That does not seem like good advice if we are talking about the same
>> thing.
>>
>
> A shot in the dark: The frequency always is 1,000,000,000 Hz for HPET
> timers, while the maximal frequency for system timers is 1,000 Hz. It
> might be that hpet_max_user_freq is a value how precise an interrupt has
> to be forced. If I guess correctly , HR timers don't force it when
> there are no interrupts needed, while a normal timer always does this
> periodically. I can imagine that a value of 64 does mean, that there are
> some kind of ticks for the tickless system , e.g. ... this might be
> complete nonsense ... 1,000,000,000/64=15625000, while
> 1,000,000,000/1024=976562.5 ... thus the higher value, will cause a less
> precise resolution for sync. I also have a theory the other way around
> . We should ask this on LAD, instead of puzzling over this issue.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAks27m8ACgkQwRXgH3rKGfNtMwCgnKiKWLzaVd 3Pt/3zdalAuRqB
kGoAnRiStcUWz8jNKo47CjOcbSagA+nW
=wZA8
-----END PGP SIGNATURE-----
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 12-27-2009, 04:24 AM
Ralf Mardorf
 
Default HPET

Gustin Johnson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Ralf Mardorf wrote:
>
>> Pardon Rui
>>
>> Gustin and I are clueless because of HPET. Do you know any link? Or is
>>
>
> I know what an HPET is, I would to know what you mean by "HR Timer" and
> "System timer".
>

I guess HR timer is a Linux specific name for the software side for the
HPET hardware.
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 
Old 12-27-2009, 04:45 AM
Ralf Mardorf
 
Default HPET

To decrease MIDI jitter send to external equipment I need HR timer as
source for the sequencer.

It's not needed for MIDI internal Linux or for audio.

There is something strange.

Sometimes I get a bad message:

"This system has no accessible HPET device (Device or resource busy)"

E.g. if I try to use the attached script, everything is fine, if I run

jackd -Rch -dalsa -dhw:0 -r96000 -p512 -n2 -Xseq & sleep $time
qtractor $song_path$song_name$song_version & sleep $time
qjackctl & sleep $time

and nothing else, there's no bad message.

If I run qjackctl before I run qtractor, there will be a bad message.

If I run any of the other programs, in any order, there will be a bad
message.


If I keep away the -c h option for jackd, I can run all applications in
any order and there's no bad message. Doing this, I didn't check if HR
timer is fine as sequencer timer source, but I'm sure that HR timer is
fine with Qtractor only, when using the -c h option for jackd, because
then the jitter is decreasing significantly, I once made a test.


Is this something I should post at LAD?
#!/bin/sh
# sh start-session

song_path=""
song_name=""
song_version=""
song_date="Dec/27/2009"
time=1
hpet_max_user_freq=64
song_info="

################################################## ####################

# Project: $song_path$song_name$song_version

# $song_date Ralf Mardorf

# ralf.mardorf at alice-dsl dot net

#

# License for all artwork in the folder /$song_name:

# Creative Commons

# by-nc-sa = Attribution-NonCommercial- ShareAlike

# http://creativecommons.org/licenses/by-nc-sa/3.0/

# Namensnennung-NichtKommerziell-Weitergabe unter gleichen Bedingungen

# http://creativecommons.org/licenses/by-nc-sa/3.0/de/

################################################## ####################
"

if [ $USER = "root" ] ; then
echo "
Only a user is allowed to run this script
"
else
################################################## ##########################################
sudo chgrp audio /dev/hpet
echo "
/etc/sysctl.conf"
echo -n "dev.hpet.max-user-freq = "
cat /etc/sysctl.conf | grep dev.hpet.max-user-freq=
echo "
"
echo -n "/proc/sys/dev/hpet/max-user-freq = "
cat /proc/sys/dev/hpet/max-user-freq
echo "
Making sure that the value is set to "$hpet_max_user_freq
sudo sysctl -w dev.hpet.max-user-freq=$hpet_max_user_freq
sudo modprobe snd-hrtimer
echo
echo -n "/proc/sys/dev/hpet/max-user-freq = "
cat /proc/sys/dev/hpet/max-user-freq
echo "
Setting up CPU frequency scaling for 64 Studio."
echo "On Suse as user run the alias "cpu-p" or as root run "cpufreq-set -gperformance"."
sudo cpufreq-selector -g performance
echo
################################################## ##########################################
echo "
Restoring session "
echo $song_info
#echo "jackd -Rch -dalsa -dhw:0 -r96000 -p512 -n2 -Xseq"
#jackd -Rch -dalsa -dhw:0 -r96000 -p512 -n2 -Xseq & sleep $time
echo "jackd -Rdalsa -dhw:0 -r96000 -p512 -n2 -Xseq"
jackd -Rdalsa -dhw:0 -r96000 -p512 -n2 -Xseq & sleep $time
#qtractor $song_path$song_name$song_version & sleep $time
qjackctl & sleep $time
a2jmidid & sleep $time
patchage & sleep $time
phasex & sleep $time
Jc_Gui & sleep $time
qtractor $song_path$song_name$song_version
fi
exit 0
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users
 

Thread Tools




All times are GMT. The time now is 09:53 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org