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.
See my Github repo
https://github.com/dynobot/Linux-Audio-Adjustments
[Tutorial] Improve Audio Sound
Re: [Tutorial] Improve Audio Sound
Thanks for sharing, perhaps we can adapt some tweaks to DietPi.
Re: [Tutorial] Improve Audio Sound
Thanks MichaIng,
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
BTW, they work as a 'whole' unit best.
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

BTW, they work as a 'whole' unit best.
-
- Posts: 4
- Joined: Fri Jan 18, 2019 2:45 am
Re: [Tutorial] Improve Audio Sound
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?
Re: [Tutorial] Improve Audio Sound
It needs to be "before" the “#End of file” line.
Re: [Tutorial] Improve Audio Sound
Created an automated install and removal
See Github
See Github
-
- Posts: 4
- Joined: Fri Jan 18, 2019 2:45 am
Re: [Tutorial] Improve Audio Sound
Wow, thanks so much! There is definitely an improvement in sound quality!
Re: [Tutorial] Improve Audio Sound
Hi SmithcgriffSmithmcgriff wrote: ↑Fri Jan 18, 2019 8:08 pm Wow, thanks so much! There is definitely an improvement in sound quality!
Please fill out the very short survey, takes about 15 seconds.
Enjoy the Music!

-
- Posts: 4
- Joined: Fri Jan 18, 2019 2:45 am
Re: [Tutorial] Improve Audio Sound
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?
Re: [Tutorial] Improve Audio Sound
Yes if you are using a USB dac the line should look like this, with the modprobe line uncommented. Its not sophisticated enough to detect it.
afterward just do a ./Sound.sh to activate it.
#USB Dacs Uncomment to reduce USB latency
modprobe snd-usb-audio nrpacks=1
afterward just do a ./Sound.sh to activate it.
#USB Dacs Uncomment to reduce USB latency
modprobe snd-usb-audio nrpacks=1