[Tutorial] Improve Audio Sound

Guides and tutorials for various stuff. Posted by DietPi users.
Edward
Posts: 92
Joined: Sun Apr 09, 2017 5:24 am

[Tutorial] Improve Audio Sound

Post by Edward » Wed Jan 16, 2019 11:04 pm

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

User avatar
MichaIng
Legend
Posts: 1626
Joined: Sat Nov 18, 2017 5:21 pm

Re: [Tutorial] Improve Audio Sound

Post by MichaIng » Thu Jan 17, 2019 12:21 pm

Thanks for sharing, perhaps we can adapt some tweaks to DietPi.

Edward
Posts: 92
Joined: Sun Apr 09, 2017 5:24 am

Re: [Tutorial] Improve Audio Sound

Post by Edward » Thu Jan 17, 2019 4:11 pm

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.

Smithmcgriff
Posts: 4
Joined: Fri Jan 18, 2019 1:45 am

Re: [Tutorial] Improve Audio Sound

Post by Smithmcgriff » Fri Jan 18, 2019 1:50 am

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?

User avatar
MichaIng
Legend
Posts: 1626
Joined: Sat Nov 18, 2017 5:21 pm

Re: [Tutorial] Improve Audio Sound

Post by MichaIng » Fri Jan 18, 2019 2:44 am

It needs to be "before" the “#End of file” line.

Edward
Posts: 92
Joined: Sun Apr 09, 2017 5:24 am

Re: [Tutorial] Improve Audio Sound

Post by Edward » Fri Jan 18, 2019 6:49 am

Created an automated install and removal

See Github

Smithmcgriff
Posts: 4
Joined: Fri Jan 18, 2019 1:45 am

Re: [Tutorial] Improve Audio Sound

Post by Smithmcgriff » Fri Jan 18, 2019 7:08 pm

Wow, thanks so much! There is definitely an improvement in sound quality!

Edward
Posts: 92
Joined: Sun Apr 09, 2017 5:24 am

Re: [Tutorial] Improve Audio Sound

Post by Edward » Fri Jan 18, 2019 7:28 pm

Smithmcgriff wrote:
Fri Jan 18, 2019 7:08 pm
Wow, thanks so much! There is definitely an improvement in sound quality!
Hi Smithcgriff

Please fill out the very short survey, takes about 15 seconds.

Enjoy the Music! 8)

Smithmcgriff
Posts: 4
Joined: Fri Jan 18, 2019 1:45 am

Re: [Tutorial] Improve Audio Sound

Post by Smithmcgriff » Sat Jan 19, 2019 2:56 am

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?

Edward
Posts: 92
Joined: Sun Apr 09, 2017 5:24 am

Re: [Tutorial] Improve Audio Sound

Post by Edward » Sat Jan 19, 2019 7:43 am

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

Post Reply