This was many years of trial and error with different kernel level settings etc. Finally got it dialed in and myself as well as others who have tried it agree it does improve the sound. Tested on RPi, Sparky, Odroid and ASUS with Squeezelite and MPD.
I know people come up with these things all the time. I’ve actually been working on these and fine tuning for nearly 10 years. I read and used manuals from RedHat, IBM, Oracle and others to understand which kernel parameters can be tuned. Obviously there are a lot with a lot of different values for each.
After years of trying different values, settings and values recommended by the professionals and values I ended up liking through empirical listening tests I quickly found out that the old way of thinking “If some is good, more is better” does not apply to audio. For example using bruit force methods of applying the highest priority didn’t always sound best, in fact it most often sounds worse.
In addition, I learned that there is a delicate balancing act at play with tuning the kernel for optimal results. This meant I had to try a lot of variables to listen for what really effects sound quality and what kernel level tuning plays well with others.
Now after nearly a decade I believe I have narrowed down a small set of kernel level variables to adjust to give optimal results for all types of music and in all listening situations. In fact, on Debian based systems these values work for all music players equally well.
Give it an honest try and see what you think. I’m not a ‘real’ coder so I know it could have been done more elegantly, but it work
Just a quick question…where exactly do I paste into the limits.conf file? Am I supposed to insert the code on the same line as “#End of file”, or all into the blank line directly above that one?
Will do. Just one more question (sorry!). Should I uncomment on the reduce usb jitter settings in the Sound.sh file since im using a usb dac, or does it automatically detect what kind of device your using?
Cool…the Sound Audio Tweaks got a write up in HACKADAY web blog.
April 10, 2019 by Brian Benchoff 27 Comments
Audio systems in Linux are terrible. You’ve never known true pain until you’ve tried to set up a recording or broadcasting workstation running Linux. I did, twenty years ago, and nothing has changed since. This wasn’t really a problem when Linux was either used in server spaces or some nerd’s battle station, but now we have small single board computers that everyone uses and wants to turn into a modular synth. Welcome to paintown, because the Linux audio stack is terrible.
For the past ten years, [Dynobot] has been working on improving audio in Linux. This is a decade of reading manuals from IBM and Oracle, and a deep knowledge of how to adjust settings so audio actually works. All of this work is now combined into a single script that improves everything. This means the priority of the Audio group is changed, the thread priority is better, the latency is better, and for anyone who wants to set up a local streaming service, the network latency is better. It’s not everything, and there’s no mention of recording multitrack audio, but we’ll accept the baby steps here.
Nice recordings DKCPlayer This may be a good reference for me to use when recording WAV sound effects for the DKCLB… Ive been too busy to do that as of yet.
But https://github.com/dynobot/Linux-Audio-Adjustments exists regularly as well with newest commit (no 404). I’d stay with the original repo as long as even the contained links/scripts contain all “dynobot”.