[LAD] timers

Ralf Mardorf ralf.mardorf at alice-dsl.net
Sat Nov 7 13:42:56 UTC 2009


Oops, I forgot something too:

spinymouse-sudo at 64studio:~$ ll /dev/hpet
bash: ll: command not found
spinymouse-sudo at 64studio:~$ ls /dev | grep hpet
hpet

Ralf Mardorf wrote:
> Thank you Emanuel for this thread :)
> thank you James for the information :)
>
> hopefully this might narrow down my trouble with MIDI jitter for 
> external equipment, OTOH I don't have any MIDI jitter for MIDI internal 
> Linux. ALSA MIDI and JACK MIDI seems to be fine what ever timer I use, 
> this means there is absolutely no jitter when using a Linux sequencer to 
> control a Linux synth. Jitter only occurs when using my USB MIDInterface 
> to control external MIDI equipment. Unfortunately I can't get my 
> Envy24's MPU working.
>
> There seems to be no hrtimer available yet:
>
> $ lsmod | grep snd_hrtimer
> $ lsmod | grep timer
> snd_timer              22024  2 snd_pcm,snd_seq
> snd                    63800  21 
> snd_ice1712,snd_ak4xxx_adda,snd_cs8427,snd_ac97_codec,snd_i2c,snd_mpu401_uart,snd_usb_audio,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_hwdep,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
> $ uname -a
> Linux 64studio 2.6.29-1-multimedia-amd64 #1 SMP PREEMPT RT Thu Feb 26 
> 16:18:05 UTC 2009 x86_64 GNU/Linux
>
> Before I start googleing. Is this a feature for 2.6.31 only? I'm still 
> not able to boot the .31 kernel-rt from the Suse 11.2 RC repository and 
> compiling for Suse also failed, but in the past I never had trouble to 
> build kernel-rt for Debian/ Ubuntu based 64 Studio. Maybe I should try 
> to build a kernel .31 for 64 Studio? Or is it just a module I need to 
> add? Or is my hardware missing something?
>
> Going to use Google now.
>
> Bye,
> Ralf
>
> James Warden wrote:
>   
>> I forgot to add that snd_hrtimer is used by jackd.
>> If I turn jackd off, the snd_hrtimer module is not used:
>>
>> $ lsmod | grep timer
>> snd_hrtimer             2148  0 ## <<< not used
>> snd_timer              17408  3 snd_hrtimer,snd_seq,snd_pcm
>>
>> J.
>>
>> --- On Sat, 11/7/09, James Warden <warjamy at yahoo.com> wrote:
>>
>>   
>>     
>>> From: James Warden <warjamy at yahoo.com>
>>> Subject: Re: [LAD] timers
>>> To: "Emanuel Rumpf" <xbran at web.de>, "Ralf Mardorf" <ralf.mardorf at alice-dsl.net>
>>> Cc: linux-audio-dev at lists.linuxaudio.org
>>> Date: Saturday, November 7, 2009, 7:34 AM
>>> Hi guys,
>>>
>>> Here is what I have:
>>>
>>>
>>> $ cat /proc/asound/timers
>>> G0: system timer : 1000.000us (10000000 ticks)
>>> G3: HR timer : 0.001us (1000000000 ticks)
>>>   Client sequencer queue 0 : running
>>> P1-0-0: PCM playback 1-0-0 : SLAVE
>>> P1-0-1: PCM capture 1-0-1 : SLAVE
>>>
>>> Ralf, you do not benefit from a high res timer. See how
>>> much more precise the HR timer is from the output above.
>>> Check which snd timer you have loaded:
>>>
>>> $ lsmod | grep timer
>>>
>>> snd_hrtimer         
>>>    2148  1
>>> snd_timer             
>>> 17408  3 snd_hrtimer,snd_seq,snd_pcm
>>>
>>> Of course, your h/w should have a HR timer:
>>>
>>> $ ll /dev/hpet
>>> crw-rw---- 1 root audio 10, 228 2009-11-05 12:59 /dev/hpet
>>>
>>> you can specify the clock source to jackd:
>>>
>>> $ jackd --help
>>> ...
>>> [ --clocksource OR -c [ c(ycle) | h(pet) | s(ystem) ]
>>> ...
>>>
>>>
>>>
>>> J.
>>>
>>>
>>> --- On Sat, 11/7/09, Ralf Mardorf <ralf.mardorf at alice-dsl.net>
>>> wrote:
>>>
>>>     
>>>       
>>>> From: Ralf Mardorf <ralf.mardorf at alice-dsl.net>
>>>> Subject: Re: [LAD] timers
>>>> To: "Emanuel Rumpf" <xbran at web.de>
>>>> Cc: linux-audio-dev at lists.linuxaudio.org
>>>> Date: Saturday, November 7, 2009, 7:04 AM
>>>> Emanuel Rumpf wrote:
>>>>       
>>>>         
>>>>> Hi
>>>>>
>>>>> I'm confused about all the timers.
>>>>>
>>>>> There is:
>>>>> - system timer
>>>>> - hpet (high precision event timer)
>>>>> - hr-timer (high resolution timer)
>>>>> - rtc (real time clock)
>>>>> - cyclic (what's that? a coded loop?)
>>>>> - anything else ?
>>>>>
>>>>>
>>>>> What is the relation of all these ?
>>>>> Which hardware devices are actually used by those
>>>>>         
>>>>>           
>>> ?
>>>     
>>>       
>>>>> Which is the prefered timer for sequencing ?
>>>>>         
>>>>>           
>>> hr-timer
>>>     
>>>       
>>>> / rtc ?
>>>>       
>>>>         
>>>>>    
>>>>>         
>>>>>           
>>>> If hardware is fine with Linux real-time audio, if I
>>>> understand 
>>>> correctly, the preferred timer for MIDI sequencers is
>>>> (should be) system 
>>>> timer at ! 1000 Hz ! For my hardware, that has got
>>>>       
>>>>         
>>> problems
>>>     
>>>       
>>>> with 
>>>> real-time audio, it's PCM playback and PCM capture.
>>>>       
>>>>         
>>> Using
>>>     
>>>       
>>>> this timers 
>>>> MIDI jitter will decrease a little bit.
>>>>
>>>> This is the output I get for 64 Studio 3.0-beta3:
>>>>
>>>> spinymouse-sudo at 64studio:~$ cat /proc/asound/timers
>>>> G0: system timer : 1000.000us (10000000 ticks)
>>>> P0-0-0: PCM playback 0-0-0 : SLAVE
>>>> P0-0-1: PCM capture 0-0-1 : SLAVE
>>>>   Client sequencer queue 0 : stopped
>>>> _______________________________________________
>>>> Linux-audio-dev mailing list
>>>> Linux-audio-dev at lists.linuxaudio.org
>>>> http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
>>>>
>>>>       
>>>>         
>>>       
>>> _______________________________________________
>>> Linux-audio-dev mailing list
>>> Linux-audio-dev at lists.linuxaudio.org
>>> http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
>>>
>>>     
>>>       
>>       
>>
>>   
>>     
>
>   

-- 
Secret of Tux: http://images.wallaceandgromit.com/user_uploads/forum_thumbnails/5/75/355.jpg
"Gromit bit me" says HMV dog: http://img.dailymail.co.uk/i/pix/2007/03_03/GomitHMVPA_468x319.jpg




More information about the Linux-audio-dev mailing list