Mopidy Discourse

Pirate Audio Equalizer

Hello everyone,
I’m desperately trying to get an equalizer to work on my Pirate audio.
I was inspired by this article ( http://www.gerrelt.nl/RaspberryPi/wordpress/equalizer/ ), I have access to the tool with the following command:
sudo alsamixer -D equal
I think my concern is that I can’t find the right syntax for setting the output parameter in /etc/mopidy/mopidy.conf.
I tried several different descriptions for example to modify :
output = alsasink device=hw:sndrpihifiberry
to
output = alsasink device=equal
output = equal

But without success, no sound comes out and an error goes up in mopidy.
Is there someone who can help me or guide me?
Thank you very much in advance.

Please post the error message.

I would guess that you are running Mopidy as a service. Mopidy as a service runs under the user ‘mopidy’. That user will not have access to /home/pi/.alsaequal.bin. I will further guess the error message mentions a permission issue.

Hello kingosticks,
Yes, Modidy is running as a service. the error message is :
mopidy[404]: ERROR [MainThread] mopidy.audio.gst GStreamer error: Could not open audio device for playback.
And that even if I chmod 777 /home/pi/.alsaequal.bin.
What do you think about the syntax of mopidy output setting? What is the right one for you?
Thanks

Changing the file permission won’t help if the mopidy user can’t see the folder so move that file somewhere else. How about moving it inside /var/lib/mopidy/ where other mopidy service stuff lives?

The first setting is the one to use:

output = alsasink device=equal

Ok,

So I moved /home/pi/.alsaequal.bin to /var/lib/mopidy/
I changed /etc/asound.conf as this :

ctl.equal {
type equal;
controls “/var/lib/mopidy/.alsaequal.bin”
}

pcm.plugequal {
type equal;
slave.pcm “plughw:1,0”;
controls “/var/lib/mopidy/.alsaequal.bin”
}

pcm.equal {
type plug;
slave.pcm plugequal;
}

In /etc/mopidy/mopidy.conf I set output = alsasink device=equal

then I reboot, now I think I’m very close thanks to you, but now the error is :
ERROR [MainThread] mopidy.audio.gst GStreamer error: Could not open audio device for playback.

Great, it’s working fine now!!!
Last command I write : chown mopidy:audio /var/lib/mopidy/.alsaequal.bin
Thanks a lot kingosticks! :star_struck:

1 Like

Great, and good spot, it seems the controls file has to exist beforehand for it to work (not sure why).

It looks like you need to then run sudo alsamixer -D equal to control the equal equalizer, which is annoying. But you can avoid that by giving everyone write permission to the controls file with sudo chmod 777 /var/lib/mopidy/.alsaequal.bin. Then alsamixer -D equal works.

You can also add the following to the bottom of your /etc/asound.conf to make the equal pcm/ctl devices your system default:

pcm.default pcm.equal
ctl.default ctl.equal

Then you can just do alsamixer (and if you want change Mopidy’s config to just output = alsasink.

EDIT: Turns out you don’t actually need to create the controls file first for it to work. I think I was creating that issue for myself when testing using sudo gst-launch-1.0 first. But if you want the pi user to have access via alsamixer (without using sudo) then you do still need to sort the controls file permissions out. Also make sure you delete your ~/.asoundrc file to avoid any confusion there.

And this looks handy too: https://github.com/JiriSko/amixer-webui as you can’t sensibly use Mopidy-ALSAMixer with alsaequal.

Perfect! alsamixer command is enough to work now.

Whow, that look promizing! I’m going to test that too! :wink:
Thanks for all!