Set manual/fixed mic gain/boost
Is there a way to manual set a fixed mic gain/boost value?
Normally, this is set automatically when changing mic volume in pipewire. However, this becomes an issue when using hardware mic monitoring/sidetone with a headset. The mic gain has a major effect on the level of the mic heard in the headset. This problem is further compounded when using conferencing applications that automatically adjust the mic level. When the mic level changes, the gain/boost is changed and the mic volume in the headset jumps drastically up or down. This is very distracting when in the middle of a conversation.
My workaround thus far has been:
- set the mic gain/boost directly via alsamixer
- use the pipewire loopback module to create a "virtual" microphone (to prevent applications from touching the mic volume)
- Set the loopback device as the default input and/or configure all applications to use it instead of the real mic
While this most works, it's a pretty ugly workaround. It would be much nicer if there were a way to just set the gain and prevent it from being changed when the mic volume is changed. Is this something that can be done in pipewire? Or perhaps something in the alsa UCM config? Maybe mic gain/boost could just be exposed as a separate control rather than being set automatically? Currently, it seems that setting it directly on the underlying alsa device is the only way to set the desired value.