A python programm that activates or deactivates pulseaudio-equalizer based on output port (headphones or speakers).
It started on pulseaudio - Automatically switch equalizer preset based on audio output (internal speaker or external) - Ask Ubuntu
- Problem: laptop speakers have "highly unequal frequency response" as audio professional would say. Normal people say: "they sound very bad".
- Theory: equalizing provides a valuable workaround, dramatically improving sound quality with a one-time effort. Laptop speakers needs heavy equalization, which is not needed by regular stereo or headphones.
- Practical (partial) solution: use pulseaudio-equalizer
- Remaining problem: when switching between laptop speakers and audio line out (concretely, plugging your external stereo or headphones on the jack), equalization needs to be switched on and off or adjusted.
- Solution: this program automatically switches equalization profile based on active output.
Disable the equalizer via pulseaudio-equalizer-gtk
and click on "Apply settings", now close the GUI.
Download this repository, change to the directory and run
sudo make install
apply-equalizer
Maybe you need to install some additional python modules.
To uninstall, change to the directory where you downloaded the repository and run
sudo make clean
The script creates per-port [1] equalizer-configurations under ~/.config/apply-equalizer
and symlinks them if a device changes the output port (i.e. headphones plugged in or out).
[1]: many sound cards have different ports, e.g. one speaker-port and one headphone-port
So:
- Unplug headphones.
- Open pulseaudio-equalizer GUI
- Customize equalizer-settings until it sounds good
- "Apply Settings" will then assign the configuration you made (including if the equalizer is enabled at all) to the current port (speakers in this case)
- close the GUI and repeat from step 2 for every port you want to assign (headphones not plugged in)
Now the equalizer settings get automatically adjusted whenever your switch between speakers and headphones.