[pulseaudio-discuss] Keeping a USB mic selected when unplugged & plugged in again

Whit Blauvelt whit.pulse at transpect.com
Thu Sep 2 05:00:22 PDT 2010


On Thu, Sep 02, 2010 at 08:45:18AM +0100, Colin Guthrie wrote:

> > I can't find where the checked/unchecked status is stored, or how to
> > hard-code it so the microphone always is selected just as soon as the
> > headset is plugged in. This is not good when trying to answer a Skype call.
> > Is there some way to make the microphone default to on? 
> 
> There isn't really a smooth way to do this with the current code sadly.
> ...
> http://colin.guthr.ie/2010/02/this-is-the-route-to-hell/

Wow. That's an impressively thorough analysis and proposal. Glad you're
working on it.

For my specific case, is a kludgey fix possible? Instead of having to mouse
through System > Preferences > Sound > Input to check what at this point is
the only radio button there, is a command-line script possible that would
send the same signal as checking that button? I've always got open terminal
sessions, so could far more quickly type "restoremic" or something than do
all that mousing.

If I knew what that script should do, I could also just have it run from
cron every minute - have it check if the mic is plugged in since that shows
in .pulse/nnnn-default-source, and if it is plugged in force it to be
actually selected.

Or even better, there might be a way to piggyback on whatever is noticing
the mic's been plugged in, and have it then turn it on by running the
auxilliary script by default. Obviously this would be a kludge, not a
universal solution. But I'd be happy.

A major design advantage of *nix is that close to 100% of it can be
configured and run with text files and terminal commands. If sound is moving
away from that, becoming dependent on a GUI interface with commands that
can't be done except through a GUI, that's unfortunate. GUI's are great when
they work, but for anything complex the traditional "edit files, run
commands" *nix approach allows more thorough and fine-grained control.

So, is there a command-line way to do what checking that radio button
accomplishes?

Thanks,
WHit



More information about the pulseaudio-discuss mailing list