home Get a blog for free contact login

Global equalizer for ALSA

Posted: Fri, 17 Feb 2012 02:41:01 +0200 (Updated: Fri, 17 Feb 2012 03:14:22 +0200)
Author: Делян Кръстев

Ever wondered how to have a system global equalizer for ALSA ?! Once I wondered too. Now I know.

1.Non real-time

One option is to use LADSPA:


$ sudo apt-get install caps
$ cat ~/.asoundrc

pcm.!default {
        type plug
        slave.pcm "equalized";
}

pcm.equalized {
        type ladspa
        slave.pcm "plug:dmix";
        path "/usr/lib/ladspa";
        plugins [
        {
                id 1773
                input {
                        controls [ -5 -5 -5 -5 -5 -5 1 3 7 1 ]
                }
        }
        ]
}

Unfortunately this does not allow on-the-fly mixer level adjustments and you have to edit ~/.asoundrc and restart all processes which you want to use the adjusted mixer levels.

2.Real-time !

Recently I found another option though. It supports real-time equalizer adjustments:


$ sudo apt-get install libasound2-plugin-equal
$ cat ~/.asoundrc

pcm.!default {
        type plug
        slave.pcm "plugequal";
}
ctl.equal {
    type equal;
}
pcm.plugequal {
    type equal;
    slave.pcm "plug:dmix";
}

$ alsamixer -D equal
$ alsamixergui -D equal

Just a reminder. The default levels are: 25 for 31HZ(leftmost) and 66 for all the rest.

The levels could be reset by deleting ~/.alsaequal.bin . Doing this manually requires a restart of the processes that used it.

References:


Posted in dir: /articles/

Show comments Report article PermaLink

All tags SiteMap Owner Cookies policy [Atom Feed]