Trying to improve audio in Linux with PulseEffects

Photo by Yomex Owo on Unsplash

Linux is a proven system for many tasks. But one of the things that I think linux is behind is in multimedia, specially audio. We have all experienced audio in windows and how good it is. Most of the time this goes to the proprietary drivers that’s available in windows. These drivers are specially tuned for the sound hardware and do pretty good job of producing high quality sound. But in the world of linux, there is lack of or even no proprietary audio drivers to my knowledge.

But fear not, PulseEffects to the rescue. PulseEffects is a sound processing software that works with pulseaudio to provide various sound effects. Sound is subjective matter and what works for one person may not work for others. In this story, I will be sharing how I improve (in my opinion) the sound in linux with pulseeffects. I will be using ASUS N551JX as this is my main machine.

For those who just want to try it out, here is the git repository for the pulseeffects configuration. Just follow the README and you are good to go.

Every sound device is different and has different frequency response, so sound configurations that produce good audio in one device may not produce same sound in other. For my case though the default linux audio sounded like some thing is covering the speaker.

Let’s begin with the installation of pulseeffects. Here is the link to pulseeffects installation guide. You can also consult your distribution for installation. Once you have installed pulseeffects let’s tune some filters.

Equalizer

My speaker doesn’t push much bass in linux, but in windows it produces fair amount of bass. So, let’s tune it with the equalizer.

  1. Increase the gain around 100–400 Hz to boost the bass.
  2. Decrease the mid-frequencies as laptop speakers are quite good at this range.
  3. Slightly decrease the input to prevent distortions.
  4. And the important thing in above equalizer settings is that it will highly amplify the audio, so decrease the output gain.

Exciter

Once the bass is done, let’s move to high frequency. I will be using exciter to boost the high tones. It would increase clarity.

  1. Make the amplification around 6db.
  2. Set the blend harmonics to around 6.
  3. Decrease the input gain as we don’t want distortion.

Auto Gain

This is optional part but as we have applied both bass and treble and also decreased the gain, the sound intensity will be lower than normal. This will be quite annoying when listening to speech and you have to constantly change the volume. So, let’s throw in auto gain to the mix.

  1. Set the target to around -12 db.
  2. Also enable detect silence as we don’t want to blow up when sound suddenly plays.
  3. Also enable the geometric mean.

Limiter

If you have enabled Auto Gain then we should also enable limiter to prevent any over boost.

Just enable the limiter and you are good to go. Now your audio should sound way better. If it doesn’t sound good try changing equalizer, exciter, auto gain and see what work for you.

ASUS N551 SubWoofer

This laptop has external subwoofer and works flawlessly in windows. In linux it’s quite involved, you have to patch the Intel HDA during boot and also configure the pin out in the Realteak controller. Refer to this link in arch wiki to enable subwoofer.

This will enable the subwoofer but the subwoofer will be in stereo mode and will play right channel by default. We can fix that by configuring /etc/pulse/daemon.conf and adding the following options.

This will sample the input in 3 channels and then map the audio to subwoofer. You should also set the sound card’s profile to 2.1 surround to enable pure bass in the subwoofer.

After settings up the subwoofer, let’s apply the pulseeffects filters to further enhance the audio experience.

Exciter

Enable the exciter to boost the high frequencies.

Bass Enhancer

Enable bass enhancer to produce deeper bass through the subwoofer.

Limiter

As usual enable limiter just in case sound goes out of hand.

To make our life easier we can just write a simple script to do the work for us. Just create a file /usr/local/bin/woofer and paste the following script.

Where subwoofer is the name of the pulseeffects configuration that you just saved above. The 1in the command is the card index, get your cart index with pacmd list-cards command.

For normal speaker create a file /usr/local/bin/nowoofer and paste the following script.

Where normal_eq is the name of the configuration that we created at the start of the story. You can easily find all these scripts in the github repostiory.

enjoy!

android developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store