Old 08-05-2018, 01:14 AM   #1
net147
Human being with feelings
 
Join Date: Aug 2018
Posts: 15
Default ALSA Underrun Recovery

I am using Reaper 5.94 with RME Babyface Pro and the following settings.

Audio system: ALSA
Input channels: 12
Output channels: 2
Sample rate: 48000
Blocksize: 16
Bit depth: 24
Periods: 2
RT priority: 40
Auto-suspend PulseAudio: checked
Disable power management if supported: checked

If I open a project with a couple of tracks (ReaSynth and Helm) and press Play the current position indicator progresses at a rate of about 0.001 or 0.002 every second for a long time before playing back normally. During this time I hear 2 clicks per second with the channel meters going up and down for each click. If I press Stop, click on the audio statistics bar at the top right of the window, press OK and press Play it returns to normal immediately.

Could the ALSA handling be improved so that current position doesn't progress at a snails pace with 2 clicks noises per second and take a long time to recover when there is underrun?

Thanks.
net147 is offline   Reply With Quote
Old 08-05-2018, 02:08 AM   #2
David Else
Human being with feelings
 
David Else's Avatar
 
Join Date: Mar 2012
Location: Near London, UK
Posts: 521
Default

Your blocksize is incredibly low, that is the latency, try 128 or 256.

Your sound device is USB, sometimes 'periods 3' can work better. You need to experiment a bit. I would start with periods 3 and work the blocksize up till you get no x-runs.
__________________
----------> Fedora Linux Distribution = Computing Joy & Freedom <----------
Learn Digital Audio Home | 'Nebula Explained' Course Out Now! | YouTube Channel | Twitter
David Else is offline   Reply With Quote
Old 08-05-2018, 03:39 AM   #3
eric71
Human being with feelings
 
Join Date: Feb 2008
Location: Finland
Posts: 143
Default

I've found this interesting - not sure how true the "multiple of 1ms" thing is with Linux USB, but at least I think I have had better results using these. And it would explain the recommendation (which has been around for years) to use 3 periods when using a usb audio device in Linux. I assume it is no different when using Jack or Alsa directly.

https://wiki.linuxaudio.org/wiki/lis..._usb_interface
eric71 is offline   Reply With Quote
Old 08-05-2018, 01:31 PM   #4
brainwreck
Human being with feelings
 
brainwreck's Avatar
 
Join Date: Jul 2006
Location: The 90's
Posts: 19,180
Default

Quote:
Originally Posted by eric71 View Post
I've found this interesting - not sure how true the "multiple of 1ms" thing is with Linux USB, but at least I think I have had better results using these. And it would explain the recommendation (which has been around for years) to use 3 periods when using a usb audio device in Linux. I assume it is no different when using Jack or Alsa directly.

https://wiki.linuxaudio.org/wiki/lis..._usb_interface
Thanks for that info. I never saw anything about that before.
__________________
The media are misleading the public about...pretty much everything.
brainwreck is offline   Reply With Quote
Old 08-06-2018, 12:20 AM   #5
eric71
Human being with feelings
 
Join Date: Feb 2008
Location: Finland
Posts: 143
Default

Quote:
Originally Posted by brainwreck View Post
Thanks for that info. I never saw anything about that before.
And another note related to these frame/period settings - just as qjackctl will allow you to type in your own entry (not just the dropdown 128/256/512, etc.), you can type these in in Reper's Alsa settings. For instance, I use ( 192 / 48000 ) * 2 = 8 with my Zoom R16 when using it in Linux.
eric71 is offline   Reply With Quote
Old 08-06-2018, 03:20 AM   #6
net147
Human being with feelings
 
Join Date: Aug 2018
Posts: 15
Default

I find with USB audio on Linux that the round trip latency is a lot more than the block size and Reaper seems to indicate.

For example with 48000 Hz, 24-bit, periods 2 measuring with analog loopback cable.
Block size of 48 gives around 240 samples of round trip latency (240 / 48000 = 5 ms).
Block size of 16 gives around 110 samples of round trip latency (110 / 48000 = 2.3 ms).

I am measuring by going to Preferences > Audio > Recording > Uncheck "Use audio driver reported latency". Then I add a track with a sine wave, remove fade-in at start of clip, loop it back using audio cable to my input and record it on second track. Then I set time units to Samples and measure the number of samples offset between the original and the recorded.

That is a lot more latency than I would get if I used ASIO on Windows with 48 samples ASIO buffer size. Perhaps the USB audio stack on Linux could use some improvement for low latency?

Last edited by net147; 08-06-2018 at 04:24 AM.
net147 is offline   Reply With Quote
Old 08-06-2018, 05:03 AM   #7
khz
Human being with feelings
 
Join Date: Jul 2008
Posts: 43
Default

Quote:
Originally Posted by net147 View Post
That is a lot more latency than I would get if I used ASIO on Windows with 48 samples ASIO buffer size. Perhaps the USB audio stack on Linux could use some improvement for low latency?
ASIO are drivers from the manufacturer.
ALSA are drivers from ALSA (Linux audio drivers), not written by the manufacturers.

So to make a serious comparison, you would only have to use the Windows drivers.

Audio optimizations (which ones?) did you do?
And hopefully uninstall everything Linux would make as comfortable as Win/MacOs?

Last edited by khz; 08-06-2018 at 05:37 AM.
khz is offline   Reply With Quote
Old 08-06-2018, 05:38 AM   #8
net147
Human being with feelings
 
Join Date: Aug 2018
Posts: 15
Default

Quote:
Originally Posted by khz View Post
ASIO are drivers from the manufacturer.
ALSA are drivers from ALSA, not written by the manufacturers.

So to make a serious comparison, you would only have to use the Windows drivers.

Audio optimizations (which ones?) did you do?
And hopefully uninstall everything Linux would make as comfortable as Win/MacOs?
As far as I know, audio optimization does not significantly affect audio round trip latency but audio reliability.

It seems Linux has around double the round trip latency compared to Windows 10 and macOS High Sierra.

Can you suggest any optimizations to reduce the USB audio latency on Linux?

Here are my test results comparing Linux, macOS and Windows. All tested with sample rate 48000 Hz, 24-bit.

Linux 4.17.11-zen x86_64 (measured in Reaper with loopback cable):
Block size, periods, round trip latency
16, 2, 2.1667
16, 3, 3
32, 2, 3.25
32, 3, 4.6875
64, 2, 6.1875
64, 3, 9.0417
128, 2, 12.6667
128, 3, 18.2083
256, 2, 24.25
256, 3, 29.5625
512, 2, 34.75
512, 3, 45.2917
1024, 2, 56.5417
1024, 3, 77.75
2048, 2, 99
2048, 3, 141.6458

macOS High Sierra 10.13.3 CoreAudio, reported from RME driver:
Buffer size, round trip latency
32, 3.25
64, 3.92
128, 6.58
256, 11.9
512, 22.6

Windows 10 1803 64-bit, RME ASIO Driver 1.164, measured using Oblique Audio RTL Utility 0.4.1 with loopback cable:
Buffer size, round trip latency
48, 3.334
64, 4
96, 5.334
128, 6.667
256, 12
512, 22.667
1024, 44
2048, 86.667

Last edited by net147; 08-11-2018 at 04:31 AM.
net147 is offline   Reply With Quote
Old 08-06-2018, 07:55 AM   #9
khz
Human being with feelings
 
Join Date: Jul 2008
Posts: 43
Default

RT-Kernel, limits.conf, generally QuickScan, rtirq.
Further optimizations see signature.

Quote:
Originally Posted by khz
ASIO are drivers from the manufacturer.
ALSA are drivers from ALSA, not written by the manufacturers.

So to make a serious comparison, you would only have to use the Windows drivers.
https://wiki.linuxaudio.org/wiki/lis..._usb_interface
Quote:
(Frames [or buffer] / Sample Rate ) * Periods = Latency in ms

( 16 / 48000 ) * 3 = 1
( 24 / 48000 ) * 3 = 1.5
( 32 / 48000 ) * 3 = 2
( 48 / 48000 ) * 3 = 3
( 64 / 48000 ) * 3 = 4
( 72 / 48000 ) * 3 = 4.5
( 80 / 48000 ) * 3 = 5
( 96 / 48000 ) * 3 = 6
( 112 / 48000 ) * 3 = 7
( 128 / 48000 ) * 3 = 8
( 144 / 48000 ) * 3 = 9
( 160 / 48000 ) * 3 = 10
( 176 / 48000 ) * 3 = 11
( 256 / 48000 ) * 3 = 16
( 512 / 48000 ) * 3 = 32
( 960 / 48000 ) * 3 = 60
( 1024 / 48000 ) * 3 = 64
( 2048 / 48000 ) * 3 = 128
( 16 / 48000 ) * 2 = 0.6666666667
( 24 / 48000 ) * 2 = 1
( 32 / 48000 ) * 2 = 1.3333333333
( 48 / 48000 ) * 2 = 2
( 64 / 48000 ) * 2 = 2.6666666667
( 72 / 48000 ) * 2 = 3
( 80 / 48000 ) * 2 = 3.3333333333
( 96 / 48000 ) * 2 = 4
( 120 / 48000 ) * 2 = 5
( 128 / 48000 ) * 2 = 5.3333333333
( 144 / 48000 ) * 2 = 6
( 168 / 48000 ) * 2 = 7
( 192 / 48000 ) * 2 = 8
( 216 / 48000 ) * 2 = 9
( 240 / 48000 ) * 2 = 10
( 256 / 48000 ) * 2 = 10.6666666667
( 512 / 48000 ) * 2 = 21.3333333333
( 1024 / 48000 ) * 2 = 42.6666666667
( 2048 / 48000 ) * 2 = 85.3333333333

Last edited by khz; 08-06-2018 at 08:07 AM.
khz is offline   Reply With Quote
Old 08-10-2018, 02:45 AM   #10
zimou13
Human being with feelings
 
Join Date: Mar 2018
Posts: 16
Default ALSA Underrun Recovery

Hi guys, I've got "ALSA lib pcm.c:7339snd_pcm_recover) underrun occurred" in todays master (FreeRDP version 1.1.0-dev (git 1.0.1-1519-g1ce9e)).

Bluestacks TextNow Photomath

Last edited by zimou13; 08-11-2018 at 10:37 PM.
zimou13 is offline   Reply With Quote
Old 08-10-2018, 03:33 AM   #11
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Posts: 1,448
Default

I have no clear idea about what you are doing, but alsa underruns normally indicate that you need to use a bigger block size, also try a higher number of periods.
__________________
Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040, etc, etc. :) https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux
Jack Winter is online now   Reply With Quote
Old 08-10-2018, 07:30 AM   #12
net147
Human being with feelings
 
Join Date: Aug 2018
Posts: 15
Default

Quote:
Originally Posted by Jack Winter View Post
I have no clear idea about what you are doing, but alsa underruns normally indicate that you need to use a bigger block size, also try a higher number of periods.
What settings do you usually use for Reaper on Arch? Have you measured the round trip latency using a loopback audio cable (by playing a waveform, recording it back with driver latency compensation disabled in Preferences, measuring the offset between original and recorded) and compared it to the latencies reported by Reaper?

I am also using Arch. Was thinking of digging into the Linux USB audio driver code to try to reduce USB audio latency.
net147 is offline   Reply With Quote
Old 08-10-2018, 09:21 AM   #13
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Posts: 1,448
Default

Depends on what I'm doing. Mostly I'm at 1024/2 with my rme multiface. The multiface adds very little extra latency. So the loopback latency comes out at 2 x 1024 + 95 samples. Sometimes I'm at 64/2 which comes out at about 5ms roundtrip

A good utility for testing this is actually reainsert. You can also configure reaper to compensate for the additional hardware latency.

Latency with USB is a different story though... As there are no drivers made for Linux we are mostly stuck with usb class 2.0 audio, which kind of sucks..

There is quite a lot of extra latency and it seems to vary a few samples each time you restart and test again. Don't think anything can be done to fix this, but if you can do so, you'll be one of my heroes...! I don't have any values at hand, but if I find some time I could run a few loopback tests.
__________________
Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040, etc, etc. :) https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux
Jack Winter is online now   Reply With Quote
Old 08-10-2018, 02:58 PM   #14
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Posts: 1,448
Default

A quick loopback test with my babyface at 44k1.

32/2 64 + 156 ~ 5.0ms
32/3 96 + 199 ~ 6.7ms
64/2 128 + 256 ~ 8.7ms
64/3 192 + 384 ~13.1ms
128/2 256 + 456 ~16.1ms
128/3 384 + 632 ~23.0ms
256/2 512 + 637 ~26.0ms
256/3 768 + 637 ~31.8ms
1024/2 2048 + 663 ~61.5ms
1024/3 3072 + 663 ~84.7ms

Kinda sucks..
__________________
Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040, etc, etc. :) https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux
Jack Winter is online now   Reply With Quote
Old 08-10-2018, 11:34 PM   #15
brainwreck
Human being with feelings
 
brainwreck's Avatar
 
Join Date: Jul 2006
Location: The 90's
Posts: 19,180
Default

Quote:
Originally Posted by Jack Winter View Post
A quick loopback test with my babyface at 44k1.

32/2 64 + 156 ~ 5.0ms
32/3 96 + 199 ~ 6.7ms
64/2 128 + 256 ~ 8.7ms
64/3 192 + 384 ~13.1ms
128/2 256 + 456 ~16.1ms
128/3 384 + 632 ~23.0ms
256/2 512 + 637 ~26.0ms
256/3 768 + 637 ~31.8ms
1024/2 2048 + 663 ~61.5ms
1024/3 3072 + 663 ~84.7ms

Kinda sucks..
Have you done any testing for a pci/pcie device or onboard audio? I'm just curious how much usb is roughly adding to the latency.
__________________
The media are misleading the public about...pretty much everything.
brainwreck is offline   Reply With Quote
Old 08-10-2018, 11:54 PM   #16
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Posts: 1,448
Default

With my RME multiface & PCI controller the roundtrip latency is the one given by buffersize*periods + 95 samples no matter the buffersize.

64/2 - 128 + 95 ~ 5.0ms
1024/2 2048 + 95 ~ 48.6ms

AFAIK, firewire is also much lower latency than usb class 2.0 audio.
__________________
Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040, etc, etc. :) https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux
Jack Winter is online now   Reply With Quote
Old 08-11-2018, 07:22 AM   #17
net147
Human being with feelings
 
Join Date: Aug 2018
Posts: 15
Default

Quote:
Originally Posted by Jack Winter View Post
Depends on what I'm doing. Mostly I'm at 1024/2 with my rme multiface. The multiface adds very little extra latency. So the loopback latency comes out at 2 x 1024 + 95 samples. Sometimes I'm at 64/2 which comes out at about 5ms roundtrip

A good utility for testing this is actually reainsert. You can also configure reaper to compensate for the additional hardware latency.

Latency with USB is a different story though... As there are no drivers made for Linux we are mostly stuck with usb class 2.0 audio, which kind of sucks..

There is quite a lot of extra latency and it seems to vary a few samples each time you restart and test again. Don't think anything can be done to fix this, but if you can do so, you'll be one of my heroes...! I don't have any values at hand, but if I find some time I could run a few loopback tests.
Thanks for the tip about measuring latency with ReaInsert. The Windows RME driver is always spot on with returning the correct number of samples for latency so the additional latency measured by ReaInsert is always 0 on Windows.

I have modified the Linux snd-usb-audio driver to reduce the latency and created an AUR DKMS package:
https://aur.archlinux.org/packages/s...wlatency-dkms/

Here are my test results using Reaper v5.941 with ReaInsert (48000 Hz, 24-bit) on my RME Babyface Pro:

Before (Linux 4.17.14-zen1-1-zen):
16/2 32 + 80 ~ 2.333 ms
16/3 48 + 109 ~ 3.271 ms
32/2 64 + 129 ~ 4.021 ms
32/3 96 + 166 ~ 5.458 ms
64/2 128 + 205 ~ 6.938 ms
64/3 192 + 242 ~ 9.042 ms
128/2 256 + 352 ~ 12.667 ms
128/3 384 + 496 ~ 18.334 ms
256/2 512 + 650 ~ 24.208 ms
256/3 768 + 650 ~ 29.542 ms
512/2 1024 + 634 ~ 34.542 ms
512/3 1536 + 634 ~ 45.208 ms
1024/2 2048 + 650 ~ 56.208 ms
1024/3 3072 + 650 ~ 77.542 ms
2048/2 4096 + 633 ~ 98.521 ms
2048/3 6144 + 633 ~ 141.188 ms

After (Linux 4.17.14-zen1-1-zen with snd-usb-audio-lowlatency-dkms):
16/2 32 + 92 ~ 2.584 ms
16/3 48 + 103 ~ 3.146 ms
32/2 64 + 129 ~ 4.021 ms
32/3 96 + 129 ~ 4.688 ms
64/2 128 + 128 ~ 5.334 ms
64/3 192 + 128 ~ 6.667 ms
128/2 256 + 130 ~ 8.042 ms
128/3 384 + 130 ~ 10.708 ms
256/2 512 + 128 ~ 13.334 ms
256/3 768 + 121 ~ 18.521 ms
512/2 1024 + 130 ~ 24.042 ms
512/3 1536 + 124 ~ 34.584 ms
1024/2 2048 + 127 ~ 45.313 ms
1024/3 3072 + 127 ~ 66.646 ms
2048/2 4096 + 129 ~ 88.021 ms
2048/3 6144 + 129 ~ 130.688 ms

Last edited by net147; 08-11-2018 at 07:23 AM. Reason: Add hardware interface name
net147 is offline   Reply With Quote
Old 08-11-2018, 08:03 AM   #18
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Posts: 1,448
Default

Awesome! That's a really impressive latency reuction!

What was the problem/improvement?

I have to try that out when I find some time (vacation).
__________________
Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040, etc, etc. :) https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux
Jack Winter is online now   Reply With Quote
Old 08-11-2018, 08:24 AM   #19
net147
Human being with feelings
 
Join Date: Aug 2018
Posts: 15
Default

Quote:
Originally Posted by Jack Winter View Post
Awesome! That's a really impressive latency reuction!

What was the problem/improvement?

I have to try that out when I find some time (vacation).
There is some ALSA documentation indicating to set nrpacks=1 option for snd-usb-audio for low latency (https://alsa.opensrc.org/Usb-audio#T...imal_latencies) but the option was removed in Linux 3.13 since https://git.kernel.org/pub/scm/linux...f2d0282630e9b9.

ALSA in general seems to be adding some additional buffering for USB audio:
http://jack-audio.10948.n7.nabble.co...es-td9071.html

So I did something similar to setting nrpacks=1 but since that option doesn't exist anymore I have to modify the code.
net147 is offline   Reply With Quote
Old 08-11-2018, 09:18 AM   #20
net147
Human being with feelings
 
Join Date: Aug 2018
Posts: 15
Default

I did some more tweaking. Here are the results.

After (Linux 4.17.14-zen1-1-zen with snd-usb-audio-lowlatency-dkms r2):
16/2 32 + 64 ~ 2.000 ms
16/3 48 + 64 ~ 2.334 ms
32/2 64 + 65 ~ 2.688 ms
32/3 96 + 66 ~ 3.375 ms
64/2 128 + 63 ~ 3.979 ms
64/3 192 + 45 ~ 4.938 ms
128/2 256 + 60 ~ 6.583 ms
128/3 384 + 59 ~ 9.229 ms
256/2 512 + 57 ~ 11.854 ms
256/3 768 + 57 ~ 17.188 ms
512/2 1024 + 60 ~ 22.583 ms
512/3 1536 + 60 ~ 33.250 ms
1024/2 2048 + 63 ~ 43.979 ms
1024/3 3072 + 63 ~ 65.313 ms
2048/2 4096 + 66 ~ 86.708 ms
2048/3 6144 + 65 ~ 129.354 ms
net147 is offline   Reply With Quote
Old 08-11-2018, 09:29 AM   #21
net147
Human being with feelings
 
Join Date: Aug 2018
Posts: 15
Smile

Here are also the Windows 10 RME Driver 1.099 measurements for comparison:
48/2 96 + 63 ~ 3.313 ms
64/2 128 + 63 ~ 3.979 ms
96/2 192 + 63 ~ 5.313 ms
128/2 256 + 63 ~ 6.646 ms
256/2 512 + 63 ~ 11.979 ms
512/2 1024 + 63 ~ 22.646 ms
1024/2 2048 + 63 ~ 43.979 ms
2048/2 4096 + 63 ~ 86.646 ms

Besides the additional delay jitter in the Linux results, they are pretty close.
net147 is offline   Reply With Quote
Old 08-11-2018, 11:28 AM   #22
brainwreck
Human being with feelings
 
brainwreck's Avatar
 
Join Date: Jul 2006
Location: The 90's
Posts: 19,180
Default

Very cool net147.

Any specifics on the jitter?
__________________
The media are misleading the public about...pretty much everything.
brainwreck is offline   Reply With Quote
Old 08-12-2018, 05:42 AM   #23
net147
Human being with feelings
 
Join Date: Aug 2018
Posts: 15
Default

Don't have any idea about the jitter yet. Here are the results on macOS High Sierra 10.13.6.

Class Compliant Mode (Apple Driver):
16/2 32 + 205 ~ 4.938 ms
32/2 64 + 205 ~ 5.604 ms
64/2 128 + 205 ~ 6.938 ms
128/2 256 + 205 ~ 9.604 ms
256/2 512 + 205 ~ 14.938 ms
512/2 1024 + 205 ~ 25.604 ms
1024/2 2048 + 205 ~ 46.938 ms
2048/2 4096 + 205 ~ 89.604 ms

PC Mode (RME Driver v3.08):
16/2 32 + 59 ~ 1.896 ms
32/2 64 + 59 ~ 2.563 ms
64/2 128 + 59 ~ 3.896 ms
128/2 256 + 59 ~ 6.563 ms
256/2 512 + 59 ~ 11.596 ms
512/2 1024 + 59 ~ 22.563 ms
1024/2 2048 + 59 ~ 43.896 ms
2048/2 4096 + 59 ~ 86.563 ms
net147 is offline   Reply With Quote
Old 08-12-2018, 10:38 AM   #24
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Posts: 1,448
Default

FWIW, I build a kernel patched with: https://aur.archlinux.org/cgit/aur.g...owlatency-dkms

I just got xruns with the babyface, but will most certainly try it again.

Unfortunately no time right now, spent the last few days moving our studio/practice room. :S But happily the new place is looking good too, much smaller but still cozy!

Carpets fitted perfectly in with the couch and the tables, good feng shui
__________________
Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040, etc, etc. :) https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux
Jack Winter is online now   Reply With Quote
Old 08-12-2018, 11:15 AM   #25
SmajjL
Human being with feelings
 
SmajjL's Avatar
 
Join Date: Nov 2013
Location: Milky Way 999.999.725th floor, now :)
Posts: 1,718
Default

Re-installing the 'everything here, Linux next..
Anyway.. just a little something for switching to headphones and speakers if anyone did not know, heck I did not.
https://www.forum.rme-audio.de/viewtopic.php?id=24447
__________________
:)
SmajjL is offline   Reply With Quote
Old 08-12-2018, 11:26 AM   #26
brainwreck
Human being with feelings
 
brainwreck's Avatar
 
Join Date: Jul 2006
Location: The 90's
Posts: 19,180
Default

Quote:
Originally Posted by net147 View Post
Don't have any idea about the jitter yet. Here are the results on macOS High Sierra 10.13.6.

Class Compliant Mode (Apple Driver):
16/2 32 + 205 ~ 4.938 ms
32/2 64 + 205 ~ 5.604 ms
64/2 128 + 205 ~ 6.938 ms
128/2 256 + 205 ~ 9.604 ms
256/2 512 + 205 ~ 14.938 ms
512/2 1024 + 205 ~ 25.604 ms
1024/2 2048 + 205 ~ 46.938 ms
2048/2 4096 + 205 ~ 89.604 ms

PC Mode (RME Driver v3.08):
16/2 32 + 59 ~ 1.896 ms
32/2 64 + 59 ~ 2.563 ms
64/2 128 + 59 ~ 3.896 ms
128/2 256 + 59 ~ 6.563 ms
256/2 512 + 59 ~ 11.596 ms
512/2 1024 + 59 ~ 22.563 ms
1024/2 2048 + 59 ~ 43.896 ms
2048/2 4096 + 59 ~ 86.563 ms
That's a big difference in latency.

It would be great to have under 5 ms usable roundtrip latency for a usb interface. Once upon a time I had that in xp and even lower with a pci card.
__________________
The media are misleading the public about...pretty much everything.
brainwreck is offline   Reply With Quote
Old 08-12-2018, 04:22 PM   #27
4duhwinnn
Human being with feelings
 
Join Date: Mar 2017
Posts: 252
Default

Quote:
Originally Posted by Jack Winter View Post
FWIW, I build a kernel patched with: https://aur.archlinux.org/cgit/aur.g...owlatency-dkms

I just got xruns with the babyface, but will most certainly try it again.

Unfortunately no time right now, spent the last few days moving our studio/practice room. :S But happily the new place is looking good too, much smaller but still cozy!

Carpets fitted perfectly in with the couch and the tables, good feng shui
My neighbor has feng shui, palm trees in the back yard
defying the snows of December and January.
Hope the new setup rocks the house, and makes the neighbors
take dance classes!
Cheers
4duhwinnn is offline   Reply With Quote
Old 08-13-2018, 12:57 AM   #28
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Posts: 1,448
Default

Thanks! No neighbours at all..!
__________________
Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040, etc, etc. :) https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux
Jack Winter is online now   Reply With Quote
Old 08-13-2018, 08:16 AM   #29
net147
Human being with feelings
 
Join Date: Aug 2018
Posts: 15
Default

Quote:
Originally Posted by Jack Winter View Post
FWIW, I build a kernel patched with: https://aur.archlinux.org/cgit/aur.g...owlatency-dkms

I just got xruns with the babyface, but will most certainly try it again.

Unfortunately no time right now, spent the last few days moving our studio/practice room. :S But happily the new place is looking good too, much smaller but still cozy!

Carpets fitted perfectly in with the couch and the tables, good feng shui
MAX_PACKS/MAX_PACKS_HS is responsible for the increase in additional latency as the buffer size increases. Setting both to 1 avoids this (MAX_PACKS for USB 1 - full speed, MAX_PACKS_HS for USB 2 - high speed).

Setting SYNC_URBS to 1 in r2 caused some instability for me so I have increased MAX_URBS/SYNC_URBS to 2 for r3. It increased the additional latency a little (about 8 samples). If you have audio glitches you can increase it to a higher value and test again. SYNC_URBS must be <= MAX_URBS.

If you want to build the AUR package for a different kernel version:
1. Replace the kernel version numbers in the PKGBUILD with the version you are using
2. updpkgsums
3. makepkg -Cis

I find it quicker to use DKMS than to rebuild the entire kernel.

Last edited by net147; 08-14-2018 at 04:29 AM.
net147 is offline   Reply With Quote
Old 08-13-2018, 10:05 AM   #30
Jack Winter
Human being with feelings
 
Jack Winter's Avatar
 
Join Date: Aug 2007
Posts: 1,448
Default

Undoubtedly
__________________
Software: Archlinux/KDE, Fabfilter FX, Komplete 8, Nebula, Schwa/Stillwell, T-racks Max/Amplitube/SVX, etc. Gear: i7-2600k/4700HQ/16GB, RME Multiface/Babyface, Behringer X32, Genelec 8040, etc, etc. :) https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux
Jack Winter is online now   Reply With Quote
Old 08-13-2018, 02:14 PM   #31
audiojunkie
Human being with feelings
 
Join Date: Nov 2011
Posts: 36
Default

Quote:
Originally Posted by eric71 View Post
I've found this interesting - not sure how true the "multiple of 1ms" thing is with Linux USB, but at least I think I have had better results using these. And it would explain the recommendation (which has been around for years) to use 3 periods when using a usb audio device in Linux. I assume it is no different when using Jack or Alsa directly.

https://wiki.linuxaudio.org/wiki/lis..._usb_interface
Very interesting!! :-)
audiojunkie is offline   Reply With Quote
Old 08-14-2018, 08:29 AM   #32
brainwreck
Human being with feelings
 
brainwreck's Avatar
 
Join Date: Jul 2006
Location: The 90's
Posts: 19,180
Default

Thanks Jack and net147. ^ Gives me some stuff to read up on.
__________________
The media are misleading the public about...pretty much everything.
brainwreck is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.