Follow

Does anyone has a good solution under to always disable a certain microphone? (I never use the external webcam's mic, but when I connect the webcam it is always used by default.) Thanks for pointers.

· · Web · 4 · 4 · 0

@kirschner You can run a script when you plug in a certain device using a udev rule. Then you can create a script to tell pulseaudio (or alsa or whatever you're using) to disable the mic or to set your internal mic as the default.

@macxcool @kirschner

Not sure if it's persistant setting, but:

I believe :

$pacmd list-sources

aught to list your webcam mic with a given index number.

And:
$ pacmd set-source-mute <index>

aught to effectively mute it.

@duckhp @kirschner The problem with just muting it is that it may be still set as the default, so all you'll get is the default mic muted.

@macxcool @kirschner

Even when using the proper index number given by pacmd list-sources? If that's the case, and the index numbers are not somewhat static to an input/source device in any way, i guess you might be correct.

@macxcool @kirschner

Might it be possible, instead of index number, to use a device's "long name" ? e.g:

$ pacmd set-source-mute alsa_input.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.mono-fallback

?

@kirschner try pavucontrol > input Devices
You can mute and/or set as default.

@kirschner If you are using Pulseaudio, you can change the device's profile to "Off". This works across unplugs for me. (See screenshot from pavucontrol.)

@nwalfield That worked, thanks a lot -- also to all the others for the suggestions.

Before posting I found the solution also described by @gchaincl mastodon.social/@gchaincl/1057 but that did not survive reconnects of the webcam like the solution in the "Configuration" tab.

Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!