To see the current volume, run alsamixer
. Let's consider the current volume shown is 40.
Run pacmd list-sources
.
In the output, search for the index: section listing the desired device, e.g.
* index: 6
name: <alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone_REV8-00.analog-stereo>
...
active port: <analog-input-mic>
The active port
part at the end contains the file name you need to edit in /usr/share/pulseaudio/alsa-mixer/paths/
.
In the above example, it is <analog-input-mic>
, so we would edit /usr/share/pulseaudio/alsa-mixer/paths/analog-input-mic.conf
for this mic.
In the configuration file /usr/share/pulseaudio/alsa-mixer/paths/analog-input-internal-mic.conf (you might have to look for the correct file for your microphone, see below), I changed to part
[Element Capture]
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right
to
[Element Capture]
switch = mute
volume = 40
override-map.1 = all
override-map.2 = all-left,all-right
and after a sudo alsa force-reload
, applications don't magically change the microphone volume anymore.