Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As a Laptop user, I'm sure that a lot of people, even the ones using Netbooks would have already gone through this problem. Especially when listening to podcasts, and using it as an example, the sound might have loud moments and quiet moments, one person speaking loud and the other speaking very quiet in the same episode. Thereby, I always wanted the sound to be compressed system-wide, and I just noted the other day, that in Windows, some Realtek drivers already offer this function.

We have already a pulseaudio plugin for equalization system-wide, and although it still has problems like not letting us change its values and listen the change in real time, or cracking the sound while changing pulse volume, I do love it and use it. Now I'm just missing something to keep the sound around 0db (or near the volume level you're using) as a leveler plugin for pulseaudio.

Any suggestion?

share|improve this question

I had success with the example shown in this answer.

Install Steve Harris's LADSPA plugins Install swh-plugins and then run the following in pacmd:

load-module module-ladspa-sink sink_name=compressor plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,20,5,12
set-default-sink compressor

The parameters (the control=1,1.5,401,-30,20,5,12 part above) for this compressor are described in Steve Harris' LADSPA Plugin Docs:

  1. RMS/peak: The blanace between the RMS and peak envelope followers.RMS is generally better for subtle, musical compression and peak is better for heavier, fast compression and percussion.
  2. Attack time (ms): The attack time in milliseconds.
  3. Release time (ms): The release time in milliseconds.
  4. Threshold level (dB): The point at which the compressor will start to kick in.
  5. Ratio (1:n): The gain reduction ratio used when the signal level exceeds the threshold.
  6. Knee radius (dB): The distance from the threshold where the knee curve starts.
  7. Makeup gain (dB): Controls the gain of the makeup input signal in dB's.
  8. Amplitude (dB): The level of the input signal, in decibels.
  9. Gain reduction (dB): The degree of gain reduction applied to the input signal, in decibels.

Due to a limitation of PulseAudio, it is not possible to adjust them in real time.

To experiment with different parameters, I also loaded the compressor as a real-time adjustable ALSA plugin via Alsaequal Install libasound2-plugin-equal by creating the following ~/.asoundrc:

ctl.compressor {
  type equal;
  library "/usr/lib/ladspa/";
  module "sc4m";

pcm.plugcompressor {
  type equal;
  slave.pcm "plug:pulse";
  library "/usr/lib/ladspa/";
  module "sc4m";

pcm.compressor {
  type plug;
  slave.pcm plugcompressor;

A sample MP3 file can be played through the compressor using mpg321 Install mpg321,

mpg321 -a hw:compressor "04 - Love Song for Yoshimi.mp3"

while alsamixer -D compressor can be used to adjust parameters in real-time.

This answer explains how to load the plugin permanently.

share|improve this answer
If you get ALSA lib dlmisc.c:252:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib/x86_64-linux-gnu/alsa-lib/ on Ubuntu 14.10 try apt-get install libasound2-plugin-equal – Stéphane Gourichon May 28 '15 at 9:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.