Ubuntu – How to route a system-wide ALSA EQ (alsaequal) through the volume control and connect PulseAudio to it

alsaequalizerpulseaudiosoundsoundcard

I have a rather specific issue and can't solve it on my own.

As explained in this Question, I have set up a system-wide volume control for my single USB audio card (M-Audio Fast Track). Now, I would also like to add a system-wide equalizer (libasound2-plugin-equal) to it, while keeping the volume control intact.

So far, I was able to get everything working correctly only in ALSA-programs.

With the following /etc/asound.conf, both the volume-control via softvol and the equalizer settings work at the same time:

pcm.!default {
        type plug
        slave.pcm "softvol"
}

ctl.!default {
        type hw
        card Track
}

pcm.softvol {
        type softvol
        slave {
            pcm "hw:Track"
        }
        control {
            name "Master"
            card Track
        }
}

ctl.equal {
        type equal;
}

pcm.plugequal {
        type equal;
        slave.pcm "plug:softvol";
}

pcm.!default {
        type plug;
        slave.pcm plugequal; 
}

Source: https://docs.slackware.com/howtos:hardware:sound_problems_on_slackware

There seems to be some redundancy, but this is the setup that works currently.

The issue that remains now is that PulseAudio apparently skips all of this setup and directly outputs to my sound card, so the equalizer works in programs that support ALSA-output (not Firefox, etc.) and JACK, since the output device can be specified.

Does someone know how to isolate PulseAudio in such a way that it will only output to the plugequal ALSA-device and not be connected to my sound card directly?

Unfortunately, PulseAudio doesn't list plugequal as an output device, just my hardware sound card.

I have uninstalled PulseAudio at the moment, since it disables the EQ and volume control when it is connected to the sound card.

Best Answer

As someone used to "plug and play" audio devices (eg never have to configure anything for sound) your problem "sounds" very complicated to me. However, there are generic problems with equalizers and the accepted answer there might help:

To start the pulseaudio equalizer run:

qpaeq

If this gives you the error

There was an error connecting to pulseaudio,
please make sure you have the pulseaudio dbus module loaded, exiting...

then load these two modules using pactl:

pactl load-module module-equalizer-sink
pactl load-module module-dbus-protocol

and, to make these changes permanent, edit ~/.config/pulse/default.pa (create it if necessary) and add these lines:

load-module module-equalizer-sink
load-module module-dbus-protocol