<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Modartt user forum - Linux clocksources/timers]]></title>
		<link>https://forum.modartt.com/viewtopic.php?id=7099</link>
		<description><![CDATA[The most recent posts in Linux clocksources/timers.]]></description>
		<lastBuildDate>Wed, 15 Jan 2020 15:04:53 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Linux clocksources/timers]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=964732#p964732</link>
			<description><![CDATA[<div class="quotebox"><cite>gasparka wrote:</cite><blockquote><p>Yes.</p></blockquote></div><p>Thanks. Then your Solo 1st gen is not affected. If I understand the patch correctly, the 2nd gens Audiointerfaces report to the snd-usb-driver mistakenly, that SYNC should be used. The patch tries to override this and forces ASYNC anyway:</p><p>+&nbsp; &nbsp; /*<br />+&nbsp; &nbsp;&nbsp; * Focusrite Scarlett Solo 2nd generation<br />+&nbsp; &nbsp;&nbsp; * Reports that playback should use Synch: Synchronous<br />+&nbsp; &nbsp;&nbsp; * while still providing a feedback endpoint. Synchronous causes<br />+&nbsp; &nbsp;&nbsp; * snapping on some sample rates. <br />+&nbsp; &nbsp;&nbsp; * Force it to use Synch: Asynchronous.<br />+&nbsp; &nbsp;&nbsp; */<br />&nbsp; &nbsp; </p><div class="quotebox"><cite>gasparka wrote:</cite><blockquote><p>I am wondering if it is possible that Pianoteq uses the inaccurate system clock and thus the output has bad clock jitter.</p></blockquote></div><p>My guess is, that Pianoteq <strong>has</strong> to use the system timer (/dev/tsc), because /dev/rtc and /dev/hpet are not available on all platforms.</p><p>PTQ&#039;s audio output just talks with JACK in my setup. <strong>If</strong> a clock is needed for this audio transfer, I assume it is the system timer.</p><p>The sound could be degraded, when the DAC in the USB-Soundcard is synchronized with the system timer, which is the case in synchronous mode between ALSA and the soundcard. The less jitter / higher accuracy the system timer has, the better the &quot;HiFi&quot; I suppose.</p>]]></description>
			<author><![CDATA[null@example.com (groovy)]]></author>
			<pubDate>Wed, 15 Jan 2020 15:04:53 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=964732#p964732</guid>
		</item>
		<item>
			<title><![CDATA[Re: Linux clocksources/timers]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=964731#p964731</link>
			<description><![CDATA[<div class="quotebox"><cite>groovy wrote:</cite><blockquote><p>Not much time at the moment, but indeed some quirks exist with the 2nd generation of Focusrite Scarlett Solo and 2i2 in the ALSA usb-audio driver:</p><p><a href="https://mailman.alsa-project.org/pipermail/alsa-devel/2019-April/147832.html">https://mailman.alsa-project.org/piperm...47832.html</a></p><p>Gasparka, are you having the Scarlett Solo 1st gen?</p></blockquote></div><p>Yes.<br />Also, you could upload here your bad and good audio sample - if i don&#039;t hear any difference then it is sure that problem is in your USB chain...or i am bad eared.<br />I am wondering if it is possible that Pianoteq uses the inaccurate system clock and thus the output has bad clock jitter.</p>]]></description>
			<author><![CDATA[null@example.com (gasparka)]]></author>
			<pubDate>Wed, 15 Jan 2020 14:11:40 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=964731#p964731</guid>
		</item>
		<item>
			<title><![CDATA[Re: Linux clocksources/timers]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=964730#p964730</link>
			<description><![CDATA[<p>Not much time at the moment, but indeed some quirks exist with the 2nd generation of Focusrite Scarlett Solo and 2i2 in the ALSA usb-audio driver:</p><p><a href="https://mailman.alsa-project.org/pipermail/alsa-devel/2019-April/147832.html">https://mailman.alsa-project.org/piperm...47832.html</a></p><p>Gasparka, are you having the Scarlett Solo 1st gen?</p>]]></description>
			<author><![CDATA[null@example.com (groovy)]]></author>
			<pubDate>Wed, 15 Jan 2020 12:26:58 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=964730#p964730</guid>
		</item>
		<item>
			<title><![CDATA[Re: Linux clocksources/timers]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=964701#p964701</link>
			<description><![CDATA[<div class="quotebox"><cite>gasparka wrote:</cite><blockquote><p>Interesting that you are forced into SYNC mode - still i think this is the source of your problems.</p></blockquote></div><p>Yes, that&#039;s strange. Even playing Wavs from Audacity via raw ALSA my 2i2 2nd gen is always a SYNC endpoint. Normally I would expect ASYNC in playback direction like in your Scarlett Solo. Hm.</p><p>Hope I have time to look at it tomorrow.</p><p>Thanks</p>]]></description>
			<author><![CDATA[null@example.com (groovy)]]></author>
			<pubDate>Tue, 14 Jan 2020 22:57:01 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=964701#p964701</guid>
		</item>
		<item>
			<title><![CDATA[Re: Linux clocksources/timers]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=964696#p964696</link>
			<description><![CDATA[<div class="quotebox"><cite>groovy wrote:</cite><blockquote><div class="quotebox"><cite>gasparka wrote:</cite><blockquote><p>Wondering what happens if you disable the synchronous mode?</p></blockquote></div><p>I made a few tests in 2018 here:<br /><a href="https://forum.modartt.com/viewtopic.php?pid=955773#p955773">https://forum.modartt.com/viewtopic.php...73#p955773</a><br />In jackd&#039;s synchronous mode the latency had been minimal better than in the default asynchronous mode. Theoretical background had been an information I found in the manpage of jack_iodelay, but don&#039;t know if it is correct today:</p><p>&quot;Note that JACK2 will add an implicit additional period when using the default asynchronous mode, so for JACK1 or JACK2 in synchronous mode, the buffer size is n*p, but for JACK2 in asynchronous mode the buffer size is (n+1)*p.&quot; -</p><p>I want to keep the latency on my hardware as low as possible, which means I always prefer the minimum of 2 periods.</p><br /><div class="quotebox"><blockquote><p>As of my understanding, in synchronous mode the system clock drives the full audio playback chain - it overrides the accurate clock in your Focusrite 2i2 gen2.</p><p><a href="https://www.hifi-advice.com/blog/audiophile-insights/digital-info/usb-audio-synchronous-asynchronous/">https://www.hifi-advice.com/blog/audiop...nchronous/</a></p></blockquote></div><p>Maybe the sync/async modes just handle the dataflow between JACK and ALSA? (don&#039;t know)<br />Is the sync between ALSA and USB-Focusrite another story eventually? Don&#039;t know too, but there is an indicator that the Focusrite is <strong>always</strong> driven synchronous (SYNC), because it never changes -&gt;</p><p>cat /proc/asound/card1/stream0<br />Focusrite Scarlett 2i2 USB at usb-0000:00:15.0-1, high speed : USB Audio</p><p>Playback:<br />&nbsp; Status: Running<br />&nbsp; &nbsp; Interface = 1<br />&nbsp; &nbsp; Altset = 1<br />&nbsp; &nbsp; Packet Size = 56<br />&nbsp; &nbsp; Momentary freq = 44100 Hz (0x5.8333)<br />&nbsp; Interface 1<br />&nbsp; &nbsp; Altset 1<br />&nbsp; &nbsp; Format: S32_LE<br />&nbsp; &nbsp; Channels: 2<br />&nbsp; &nbsp; Endpoint: 1 OUT (SYNC)<br />&nbsp; &nbsp; Rates: 44100, 48000, 88200, 96000, 176400, 192000<br />&nbsp; &nbsp; Data packet interval: 125 us</p><p>Capture:<br />&nbsp; Status: Stop<br />&nbsp; Interface 2<br />&nbsp; &nbsp; Altset 1<br />&nbsp; &nbsp; Format: S32_LE<br />&nbsp; &nbsp; Channels: 2<br />&nbsp; &nbsp; Endpoint: 2 IN (ASYNC)<br />&nbsp; &nbsp; Rates: 44100, 48000, 88200, 96000, 176400, 192000<br />&nbsp; &nbsp; Data packet interval: 125 us</p><p>cat /proc/asound/card1/pcm0p/sub0/hw_params<br />access: MMAP_INTERLEAVED&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />format: S32_LE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />subformat: STD&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />channels: 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />rate: 44100 (44100/1)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />period_size: 64<br />buffer_size: 128</p><p>But more back to the topic again. My point was the change of audio quality using different clocksources in JACK, not latency. Using the HPET source for example changes the audio-quality, no matter whether I&#039;m using 2 or 3 periods of 64 samples as buffer in JACK. It is not clear to me, if this is theoretically possible.</p></blockquote></div><p>Interesting that you are forced into SYNC mode - still i think this is the source of your problems. I have similar card:</p><p>cat /proc/asound/card1/stream0 <br />Focusrite Scarlett Solo USB at usb-0000:00:14.0-4, high speed : USB Audio</p><p>Playback:<br />&nbsp; Status: Running<br />&nbsp; &nbsp; Interface = 1<br />&nbsp; &nbsp; Altset = 1<br />&nbsp; &nbsp; Packet Size = 72<br />&nbsp; &nbsp; Momentary freq = 48000 Hz (0x6.0000)<br />&nbsp; &nbsp; Feedback Format = 16.16<br />&nbsp; Interface 1<br />&nbsp; &nbsp; Altset 1<br />&nbsp; &nbsp; Format: S32_LE<br />&nbsp; &nbsp; Channels: 2<br />&nbsp; &nbsp; Endpoint: 1 OUT (ASYNC)<br />&nbsp; &nbsp; Rates: 44100, 48000, 88200, 96000, 176400, 192000<br />&nbsp; &nbsp; Data packet interval: 125 us<br />&nbsp; &nbsp; Bits: 0</p><p>Capture:<br />&nbsp; Status: Running<br />&nbsp; &nbsp; Interface = 2<br />&nbsp; &nbsp; Altset = 1<br />&nbsp; &nbsp; Packet Size = 72<br />&nbsp; &nbsp; Momentary freq = 48000 Hz (0x6.0000)<br />&nbsp; Interface 2<br />&nbsp; &nbsp; Altset 1<br />&nbsp; &nbsp; Format: S32_LE<br />&nbsp; &nbsp; Channels: 2<br />&nbsp; &nbsp; Endpoint: 2 IN (ASYNC)<br />&nbsp; &nbsp; Rates: 44100, 48000, 88200, 96000, 176400, 192000<br />&nbsp; &nbsp; Data packet interval: 125 us<br />&nbsp; &nbsp; Bits: 0</p>]]></description>
			<author><![CDATA[null@example.com (gasparka)]]></author>
			<pubDate>Tue, 14 Jan 2020 21:29:31 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=964696#p964696</guid>
		</item>
		<item>
			<title><![CDATA[Re: Linux clocksources/timers]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=964695#p964695</link>
			<description><![CDATA[<p>Things clear up. I have bitten in the sour apple and compiled my own distribution RT-kernel with just one kernel option changed:</p><p>Timer frequency (250 Hz) -&gt; (1000 Hz)</p><p>The diff in the config is now:</p><p>$ diff /boot/config-4.9.0-11-rt-amd64 linux-source-4.9/.config<br />596c596<br />&lt; CONFIG_HZ_250=y<br />---<br />&gt; # CONFIG_HZ_250 is not set<br />598,599c598,599<br />&lt; # CONFIG_HZ_1000 is not set<br />&lt; CONFIG_HZ=250<br />---<br />&gt; CONFIG_HZ_1000=y<br />&gt; CONFIG_HZ=1000</p><p>Result: The best Pianoteq experience I ever had on that Laptop!</p><p>The audio quality is excellent now with the system timer. No need for the auxiliary HPET-clock any longer.</p><p>The response of PTQ is snappy and free of glitches.</p><p>PTQ v6.6.0 with 64 samples, JACK in synchronous mode with 64 samples and 2 periods, Focusrite Scarlett 2i2 2nd gen as synchronous ALSA USB-Endpoint.</p><p>(/usr/bin/jackd -S -p128 -dalsa -dhw:USB -r44100 -p64 -n2 -P)</p><p>I don&#039;t know, why the Debian Project decided for 250 Hz in their Realtime-Kernel, maybe they had servers and embedded systems in mind. But for us realtime linuxmusicians 1000 Hz seems to be the far better option.</p><p>cheers</p>]]></description>
			<author><![CDATA[null@example.com (groovy)]]></author>
			<pubDate>Tue, 14 Jan 2020 20:21:26 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=964695#p964695</guid>
		</item>
		<item>
			<title><![CDATA[Re: Linux clocksources/timers]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=964657#p964657</link>
			<description><![CDATA[<div class="quotebox"><cite>varpa wrote:</cite><blockquote><p>My point about Alsa/Jack is that Jack uses Alsa so anything that is done in Jack can be directly done in Alsa.&nbsp; So you could directly run 2 periods in Alsa.</p></blockquote></div><p>How?<br />PIanoteq v6.6.0 README_LINUX.txt&nbsp; -&gt;<br />&quot;With the Alsa driver, the latency is 3 times the buffer size (a buffer of 64 samples at 44100Hz gives a latency of 4.3 ms).&quot;</p><p>See <a href="https://forum.modartt.com/viewtopic.php?pid=955780#p955780">https://forum.modartt.com/viewtopic.php...80#p955780</a></p><p>Does JACK not have better realtime scheduling with PTQ than ALSA?</p><div class="quotebox"><cite>varpa wrote:</cite><blockquote><p>As to your HPET questions, I would pose them at <a href="https://www.linuxmusicians.com/">https://www.linuxmusicians.com/</a> where there are more linux experts</p></blockquote></div><p>:-)</p>]]></description>
			<author><![CDATA[null@example.com (groovy)]]></author>
			<pubDate>Mon, 13 Jan 2020 19:28:32 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=964657#p964657</guid>
		</item>
		<item>
			<title><![CDATA[Re: Linux clocksources/timers]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=964656#p964656</link>
			<description><![CDATA[<div class="quotebox"><cite>gasparka wrote:</cite><blockquote><p>Wondering what happens if you disable the synchronous mode?</p></blockquote></div><p>I made a few tests in 2018 here:<br /><a href="https://forum.modartt.com/viewtopic.php?pid=955773#p955773">https://forum.modartt.com/viewtopic.php...73#p955773</a><br />In jackd&#039;s synchronous mode the latency had been minimal better than in the default asynchronous mode. Theoretical background had been an information I found in the manpage of jack_iodelay, but don&#039;t know if it is correct today:</p><p>&quot;Note that JACK2 will add an implicit additional period when using the default asynchronous mode, so for JACK1 or JACK2 in synchronous mode, the buffer size is n*p, but for JACK2 in asynchronous mode the buffer size is (n+1)*p.&quot; -</p><p>I want to keep the latency on my hardware as low as possible, which means I always prefer the minimum of 2 periods.</p><br /><div class="quotebox"><blockquote><p>As of my understanding, in synchronous mode the system clock drives the full audio playback chain - it overrides the accurate clock in your Focusrite 2i2 gen2.</p><p><a href="https://www.hifi-advice.com/blog/audiophile-insights/digital-info/usb-audio-synchronous-asynchronous/">https://www.hifi-advice.com/blog/audiop...nchronous/</a></p></blockquote></div><p>Maybe the sync/async modes just handle the dataflow between JACK and ALSA? (don&#039;t know)<br />Is the sync between ALSA and USB-Focusrite another story eventually? Don&#039;t know too, but there is an indicator that the Focusrite is <strong>always</strong> driven synchronous (SYNC), because it never changes -&gt;</p><p>cat /proc/asound/card1/stream0<br />Focusrite Scarlett 2i2 USB at usb-0000:00:15.0-1, high speed : USB Audio</p><p>Playback:<br />&nbsp; Status: Running<br />&nbsp; &nbsp; Interface = 1<br />&nbsp; &nbsp; Altset = 1<br />&nbsp; &nbsp; Packet Size = 56<br />&nbsp; &nbsp; Momentary freq = 44100 Hz (0x5.8333)<br />&nbsp; Interface 1<br />&nbsp; &nbsp; Altset 1<br />&nbsp; &nbsp; Format: S32_LE<br />&nbsp; &nbsp; Channels: 2<br />&nbsp; &nbsp; Endpoint: 1 OUT (SYNC)<br />&nbsp; &nbsp; Rates: 44100, 48000, 88200, 96000, 176400, 192000<br />&nbsp; &nbsp; Data packet interval: 125 us</p><p>Capture:<br />&nbsp; Status: Stop<br />&nbsp; Interface 2<br />&nbsp; &nbsp; Altset 1<br />&nbsp; &nbsp; Format: S32_LE<br />&nbsp; &nbsp; Channels: 2<br />&nbsp; &nbsp; Endpoint: 2 IN (ASYNC)<br />&nbsp; &nbsp; Rates: 44100, 48000, 88200, 96000, 176400, 192000<br />&nbsp; &nbsp; Data packet interval: 125 us</p><p>cat /proc/asound/card1/pcm0p/sub0/hw_params<br />access: MMAP_INTERLEAVED&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />format: S32_LE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />subformat: STD&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />channels: 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />rate: 44100 (44100/1)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />period_size: 64<br />buffer_size: 128</p><p>But more back to the topic again. My point was the change of audio quality using different clocksources in JACK, not latency. Using the HPET source for example changes the audio-quality, no matter whether I&#039;m using 2 or 3 periods of 64 samples as buffer in JACK. It is not clear to me, if this is theoretically possible.</p>]]></description>
			<author><![CDATA[null@example.com (groovy)]]></author>
			<pubDate>Mon, 13 Jan 2020 19:11:31 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=964656#p964656</guid>
		</item>
		<item>
			<title><![CDATA[Re: Linux clocksources/timers]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=964655#p964655</link>
			<description><![CDATA[<p>My point about Alsa/Jack is that Jack uses Alsa so anything that is done in Jack can be directly done in Alsa.&nbsp; So you could directly run 2 periods in Alsa.&nbsp; &nbsp;However, its easier to configure this in Jack.</p><p>As to your HPET questions, I would pose them at <a href="https://www.linuxmusicians.com/">https://www.linuxmusicians.com/</a> where there are more linux experts</p>]]></description>
			<author><![CDATA[null@example.com (varpa)]]></author>
			<pubDate>Mon, 13 Jan 2020 18:22:33 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=964655#p964655</guid>
		</item>
		<item>
			<title><![CDATA[Re: Linux clocksources/timers]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=964640#p964640</link>
			<description><![CDATA[<p>Wondering what happens if you disable the synchronous mode?<br />As of my understanding, in synchronous mode the system clock drives the full audio playback chain - it overrides the accurate clock in your Focusrite 2i2 gen2.</p><p><a href="https://www.hifi-advice.com/blog/audiophile-insights/digital-info/usb-audio-synchronous-asynchronous/">https://www.hifi-advice.com/blog/audiop...nchronous/</a></p>]]></description>
			<author><![CDATA[null@example.com (gasparka)]]></author>
			<pubDate>Mon, 13 Jan 2020 10:23:23 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=964640#p964640</guid>
		</item>
		<item>
			<title><![CDATA[Re: Linux clocksources/timers]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=964634#p964634</link>
			<description><![CDATA[<div class="quotebox"><cite>varpa wrote:</cite><blockquote><p>Concerning HPET timers check out <a href="https://wiki.linuxaudio.org/wiki/system_configuration#sysctlconf">https://wiki.linuxaudio.org/wiki/system...sysctlconf</a></p></blockquote></div><p>Yes, I knew that link. What exactly is your point?</p><div class="quotebox"><cite>varpa wrote:</cite><blockquote><p>Also you have a misunderstanding about Jack and Alsa.</p></blockquote></div><p>What do you mean? Where?</p>]]></description>
			<author><![CDATA[null@example.com (groovy)]]></author>
			<pubDate>Sun, 12 Jan 2020 20:55:21 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=964634#p964634</guid>
		</item>
		<item>
			<title><![CDATA[Re: Linux clocksources/timers]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=964626#p964626</link>
			<description><![CDATA[<p>Concerning HPET timers check out <a href="https://wiki.linuxaudio.org/wiki/system_configuration#sysctlconf">https://wiki.linuxaudio.org/wiki/system...sysctlconf</a></p><p>Also you have a misunderstanding about Jack and Alsa.&nbsp; &nbsp;Alsa is the driver which directly communicates with audio hardware.&nbsp; &nbsp;Jack is an audio server that uses Alsa (or FFADO for firewire devices) to communicate with audio hardware.&nbsp; &nbsp;Jack offers some advantages to over using Alsa: easier to configure, allows communication between different audio programs.&nbsp; &nbsp; Here is some good reading:&nbsp; <a href="https://www.libremusicproduction.com/articles/demystifying-jack-%e2%80%93-beginners-guide-getting-started-jack.html">https://www.libremusicproduction.com/ar...-jack.html</a></p>]]></description>
			<author><![CDATA[null@example.com (varpa)]]></author>
			<pubDate>Sun, 12 Jan 2020 17:46:33 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=964626#p964626</guid>
		</item>
		<item>
			<title><![CDATA[Linux clocksources/timers]]></title>
			<link>https://forum.modartt.com/viewtopic.php?pid=964619#p964619</link>
			<description><![CDATA[<p>I&#039;m a bit confused at the moment, because I observed an audio effect, which i don&#039;t fully understand.</p><p>Normally I&#039;m using Pianoteq with audio output JACK, which itself redirects to ALSA&#039;s driver snd-usb-audio and an USB connected Focusrite 2i2 gen2.</p><p>I&#039;m using JACK because it supports 2 periods (instead of 3 periods at direct ALSA) of 64 samples buffers in it&#039;s synchronous mode (option jackd -S). Slightly better latency.</p><p>So far so good.</p><p>Recently I saw that JACK has an option -c to select an available clocksource. Default is the System timer and the other is the HPET timer (High Precision Event Timer). HPET is a hardware timer available on most Intel boards.</p><p><strong>When I select HPET (-ch) the audio quality is better than with the standard system timer on my Laptop. More defined, clearer, less tendency of dullness.</strong></p><p>I didn&#039;t expect that, because I thought the hardware clocks like RTC or the newer HPET are obsolete with contemporary &quot;tickless&quot; kernels.</p><p>My vague guess is, that HPET has a better resolution and higher precision than my standard system timer, so that all audio transfers between PTQ, JACK, ALSA, USB-Audio have less latency and jitter. - But I&#039;m not sure if those assumptions have a theoretical background or I just became a victim of the placebo-effect.</p><p>Maybe the Debian Realtime-Kernel is not so tickless (dynamically clocking) than I thought. For example ALSA tries to use static timers at 250 Hz (&lt;=&gt; 4000 µs):</p><p># cat /proc/asound/timers<br />G0: system timer : 4000.000us (10000000 ticks)<br />[...]</p><p>While the HPET is adjusted at 1024 Hz at the moment:</p><p># cat /proc/sys/dev/hpet/max-user-freq<br />1024</p><p>Eventually recompiling my kernel with CONFIG_HZ_1000=y (instead of default CONFIG_HZ_250=y) would have the same effect as using the HPET clock. Dont&#039; know. But it would be uncomfortable to recompile the kernel each time a new is released. At the moment I just use the updated Realtime-kernels of my Linux-distribution.</p><p>Maybe someone (PTQ-crew itself?) is able to shed some light how tickless kernels and (pseudo?)static clocksources like 250 Hz or 1000 Hz go together.</p><p>Thank you</p><br /><p>System info: Debian 9 (&quot;Stretch&quot;), kernel 4.9.0-11-rt-amd64, Pianoteq 6.6.0 Standard</p>]]></description>
			<author><![CDATA[null@example.com (groovy)]]></author>
			<pubDate>Sun, 12 Jan 2020 12:13:46 +0000</pubDate>
			<guid>https://forum.modartt.com/viewtopic.php?pid=964619#p964619</guid>
		</item>
	</channel>
</rss>
