UPDATED May 2021 (see below)
Getting MPD to work with the ALSA Equaliser plugin
I found a few sites with ‘howtos’ for this, although none of them worked for me.
First thing to do is ensure your MPD installation is working properly, and playing music through your chosen device.
If you have any problems getting MPD to work, then go to the excellent La Cocina site where you’ll find a lot of useful help.
Once you are sure everything is working correctly;
Install the equaliser plugin:
apt-get install libasound2-plugin-equal
Edit your mpd configuration file (on my Debian box it was in /etc/mpd.conf)
Add the following lines:
audio_output { type "alsa" name "ALSA EQ" device "plug:plugequal" # format "44100:16:2" # optional # mixer_device "default" # optional # mixer_control "PCM" # optional # mixer_index "0" # optional }
While you’re editing mpd.conf, check that mpd is running with the mpd user account:
user "mpd"
Save the mpd.conf file and move on to the next step.
Now edit / create the .asoundrc in the home directory of the MPD user (you should be running the daemon as non privileged user – mine runs as mpd).
On Debian, my mpd home directory is in /var/lib/mpd/ – yours may vary.
vi /var/lib/mpd/.asoundrc
Add the following lines:
pcm.!default { type plug slave.pcm plugequal; } ctl.!default { type hw card 0 } ctl.equal { type equal; } pcm.plugequal { type equal; slave.pcm "plughw:2,0"; # NOTE this line MUST be your hardware device. } pcm.equal { type plug; slave.pcm plugequal; }
Once you have completed the above steps, you can restart the MPD daemon or simply reboot your machine.
Before you can use the Equaliser, you need to run it as the MPD user, otherwise it won’t work.
I created a script to do this:
Create a script called runeq.sh and add the following lines:
#!/bin/bash su -s /bin/sh -c "alsamixer -D equal" mpd
Save the file and make it executable.
chmod +x runeq.sh
To run this script simply type:
./runeq.sh
Note: All the “vi” editor commands above can be substituted with “nano” (or the editor of your choice).
Tested and working on Debian 8.8
Enjoy your equaliser. 🙂
*UPDATE* May 2021
I followed my own guide to install this on Void Linux and ran into a few issues.
Firstly I was getting
Failed to load plugin "caps.so": caps.so: cannot open shared object file: No such file or directory
caps.so
is in /usr/lib/ladspa/
so…
This was solved by inserting the following into the /etc/sv/mpd/run
startup script
LADSPA_PATH=/usr/lib/ladspa/ export LADSPA_PATH
The relevant section in mpd.conf
on Void Linux looked like this:
audio_output { type "alsa" name "HiFace" device "plug:plugequal" mixer_type "software" # format "44100:16:2" # optional # mixer_device "default" # optional # mixer_control "PCM" # optional # mixer_index "0" # optional }
The .asoundrc file remained the same as the example above.