Discussion:
[LAU] Qtractor MIDI queue timer and TSC
Ralf Mardorf
2018-07-30 11:49:08 UTC
Permalink
Hi,

by View > Options... > MIDI tab I can chose between 'default',
'system timer' (for my current installed rt kernels 300Hz), 'HR timer'
and diverse 'PCM' timers. My old computer doesn't have 'TSC', so
Qtractor's queue timer still is set to use 'HR timer', to reduce MIDI
jitter. If I want to chose 'TSC', when running Qtractor on my new
machine, should there be an entry 'TSC' or since it's the current
clocksource, would selecting 'default' be the option to use 'TSC'? IOW
what is 'default' for and why is there no option to select 'TSC'?

[***@archlinux ~]$ cat /sys/devices/system/clocksource/*/available_clocksource
tsc hpet acpi_pm
[***@archlinux ~]$ cat /sys/devices/system/clocksource/clocksource0/current_clocksource
tsc
[***@archlinux ~]$ qtractor -v
qt5ct: using qt5ct plugin
Qt: 5.11.1
Qtractor: 0.9.1

Regards,
Ralf

PS: I'm sending this to LAU instead of the Qtractor mailimng list, since
I susepct this could be from interest for several users, who are not
necessarily subscribed to the Qtractor mailing list and Rui usually
replies to requests related to his software here, too.
Rui Nuno Capela
2018-07-30 19:58:55 UTC
Permalink
Post by Ralf Mardorf
Hi,
by View > Options... > MIDI tab I can chose between 'default',
'system timer' (for my current installed rt kernels 300Hz), 'HR timer'
and diverse 'PCM' timers. My old computer doesn't have 'TSC', so
Qtractor's queue timer still is set to use 'HR timer', to reduce MIDI
jitter. If I want to chose 'TSC', when running Qtractor on my new
machine, should there be an entry 'TSC' or since it's the current
clocksource, would selecting 'default' be the option to use 'TSC'? IOW
what is 'default' for and why is there no option to select 'TSC'?
tsc hpet acpi_pm
tsc
qt5ct: using qt5ct plugin
Qt: 5.11.1
Qtractor: 0.9.1
those are low-level, read kernel time/clock sources.

instead, the timers that qtractor may use are the high-level ones that
are available through ALSA and only; hrtimer is often the default one
iif the kernel is configured to CONFIG_SND_SEQ_HRTIMER_DEFAULT=y.

you can always check all the available ALSA timers from:
/proc/asound/timers

the effective current timer in use is listed there, as soon you activate
an ALSA seq queue (eg. qtractor):
/proc/asound/seq/timer

hth.
cheers
--
rncbc aka. Rui Nuno Capela
Clemens Ladisch
2018-07-30 21:12:04 UTC
Permalink
by View > Options... > MIDI tab I can chose between 'default' ...
Always use "default". It's the best one that is available; the others
exist just for backwards compatibility.


Regards,
Clemens
Ralf Mardorf
2018-07-31 02:16:33 UTC
Permalink
Post by Rui Nuno Capela
the timers that qtractor may use are the high-level ones that
are available through ALSA
Always use "default". It's the best one that is available; the others
exist just for backwards compatibility.
Thank you Rui and Clemens,

if I check 'default' by the Qtractor options, then indeed 'HR timer' is
used.

[***@archlinux ~]$ zgrep CONFIG_SND_SEQ_HRTIMER_DEFAULT /proc/config.gz
CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
[***@archlinux ~]$ cat /proc/asound/seq/timer
[***@archlinux ~]$ qtractor >/dev/null 2>&1 &
[1] 17682
[***@archlinux ~]$ cat /proc/asound/timers
G0: system timer : 3333.333us (10000000 ticks)
G3: HR timer : 0.001us (1000000000 ticks)
Client sequencer queue -1 : stopped
P0-0-0: PCM playback 0-0-0 : SLAVE
P0-0-1: PCM capture 0-0-1 : SLAVE
P1-0-0: PCM playback 1-0-0 : SLAVE
P1-0-1: PCM capture 1-0-1 : SLAVE
P3-3-0: PCM playback 3-3-0 : SLAVE
P3-7-0: PCM playback 3-7-0 : SLAVE
P3-8-0: PCM playback 3-8-0 : SLAVE
P3-9-0: PCM playback 3-9-0 : SLAVE
P3-10-0: PCM playback 3-10-0 : SLAVE
[***@archlinux ~]$ cat /proc/asound/seq/timer
Timer for queue 0 : HR timer
Period time : 0.000000000
Skew : 65536 / 65536
[***@archlinux ~]$ killall qtractor
[***@archlinux ~]$
[1]+ Done qtractor > /dev/null 2>&1
[***@archlinux ~]$ cat /proc/asound/timers
G0: system timer : 3333.333us (10000000 ticks)
G3: HR timer : 0.001us (1000000000 ticks)
P0-0-0: PCM playback 0-0-0 : SLAVE
P0-0-1: PCM capture 0-0-1 : SLAVE
P1-0-0: PCM playback 1-0-0 : SLAVE
P1-0-1: PCM capture 1-0-1 : SLAVE
P3-3-0: PCM playback 3-3-0 : SLAVE
P3-7-0: PCM playback 3-7-0 : SLAVE
P3-8-0: PCM playback 3-8-0 : SLAVE
P3-9-0: PCM playback 3-9-0 : SLAVE
P3-10-0: PCM playback 3-10-0 : SLAVE
[***@archlinux ~]$ cat /proc/asound/seq/timer
[***@archlinux ~]$

Regards,
Ralf
--
pacman -Q linux{,-rt{,-securityink,-cornflower,-pussytoes}}|cut -d\ -f2
4.17.11-1
4.16.18_rt11-1
4.16.18_rt10-1
4.16.18_rt9-1
4.14.34_rt27-1
Loading...