-
Notifications
You must be signed in to change notification settings - Fork 0
Equalizer_systemwide_based_on_plugequal_for_mpd
See original contribution in the issue thread #862
It would be a good thing to be able to do some equalizer Settings for the diversity of Loudspeakers to improve Soundquality
Based on https://wiki.debianforum.de/Erweiterte_ALSA-Funktionen
Install the required package
sudo apt-get install -y libasound2-plugin-equal
Create the Equalizer as ALSA device in /etc/asound.conf
In the example below, change "plughw:1,0" according to your hardware setup. You can check available sound cards with aplay -l
. If you have disabled the default Rasberry sound output in /boot/config.txt, because you are using a PiHAT audio card, it will most likely be "plughw:0,0".
ctl.equal {
type equal;
# The following line is not necessary for me, you will need to try it out
controls "/home/pi/.alsaequal.bin"
}
pcm.plugequal {
type equal;
slave.pcm "plughw:1,0";
# The following line is not necessary for me, you will need to try it out
controls "/home/pi/.alsaequal.bin"
}
pcm.equal {
type plug;
slave.pcm plugequal;
}
# Make the equalizer the default playback device (optional)
pcm.!default {
type plug
slave.pcm plugequal;
}
Change the /etc/mpd.conf to use an ALSA device rather than the sound card hardware directly. Note that mixer_control "PCM" should match your sound card. Type sudo amixer scontrols
for a list of available controls.
#
audio_output {
type "alsa"
name "My ALSA Device"
# device "hw:1,0" # optional
device "plug:plugequal"
mixer_type "software" # optional
# mixer_device "default" # optional
mixer_device "hw:1,0"
mixer_control "PCM" # optional
# mixer_index "0" # optional
}
mixer_type needs to be set to software
in the mpd.conf.
- Open two terminals. On first terminal enter
speaker-test -c 2 -d plugequal
<- This explicitly tests the alsa device "pcm.plugequal" that you created in the asound.conf file
or
speaker-test -c 2
<- This tests the default ALSA device
- On second terminal enter
alsamixer -D equal
and play around with the equalizer settings. E.g. set all the lower frequency bands to zero. You should hear the sound change noticeably. Revert your settings and exit (with ESC). Congratulations, step one is complete.
Here comes the magic ingredient: The key insight to making the Equalizer work, is to know that the settings are user-specific. That means you need to make the settings as the user, the audio playback is later started at. Generally, the mpd daemon is not running under the user pi. In the Phoniebox default setup, mpd runs as user root. Check your /etc/mpd.conf for the entry user to see which user mpd runs under.
- Open a terminal and enter
sudo -u root alsamixer -D equal
- Playback some music by swiping a card. Adjust the equalizer settings in the terminal. With drastic changes in the settings, you should hear noticeable changes. Adjust setting to you liking and exit. The settings are stored and restored automatically.
If you have other music player daemon run under different users on the same Raspbery Pi, you will need to adjust Equalizer settings for each user. This has been tested with Phoniebox Classic, but should transfer easily to Phoniebox Spotify+.
Audio with my attempt is actually working on Terminal, however I havent figured out to get the general loudness working. However with my basic attempt the loudness is greyed out in the Website...
Hello everyone, I've got it working! See the following Forum for information. https://forum-raspberrypi.de/forum/thread/46718-equalizer-fuer-die-phoniebox/?postID=421069#post421305
If you like Phoniebox, consider: buy me a coffee or PayPal
- Code: https://github.com/MiczFlor/RPi-Jukebox-RFID
- Phoniebox home page: English | Deutsch
Phoniebox is a contactless jukebox for the Raspberry Pi, playing audio files, playlists, podcasts, web streams and spotify triggered by RFID cards. All plug and play via USB, no soldering iron needed. Update: if you must, it now also features a howto for adding GPIO buttons controls.
Visit Phoniebox.de
π₯ Version 3
- β Releases
- π΅ Install Jukebox Version 3
- π Report a bug
- π Propose a feature
- βοΈ Feature Status
- π Documentation
- π©βπ» Development
- βοΈ Contributing
- π¦ Code
πΆ Version 2
- β Releases
- π΅ Install Jukebox Version 2
- π Report a bug
- βοΈ Features
- π Documentation
- βοΈ Contributing
- π¦ Code
Version 2 Pages
-
Setup / Upgrades
- Synchronising Phonieboxes in a local network
- Smart Home remote control with MQTT
- Hardware Pinout Overview
- Systemwide Equalizer
- Phoniebox with read-only Filesystem
- HiFiBerry Soundcard Details
- WM8960 Hi-Fi HAT
- PAM8403 Amplifier Power Off
- TPA3118 Amplifier Power Off and EMI improvement
- External Non USB Audio DAC ES9023, PCM5102, etc.
- On-board LEDs with fibre optics
- Setting GPIOs at boot time
- Stop on removal with USB RFID Reader
- Firmware update improves audio out
- Architecture