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

Whit Blauvelt whit.pulse at transpect.com
Thu Sep 9 17:14:20 PDT 2010


On Mon, Sep 06, 2010 at 08:36:39AM +0100, Colin Guthrie wrote:
> 
> You could run: pacmd set-default-source foo
> 
> (where foo is the name of your source). The name should remain static,
> so you should be able to put this in an alias.

Colin,

Thanks again for your help.

Curious about pacmd, I tried the man page:

"This program takes no command line options." Hmm.

In its shell help screen it says:

"set-default-source        Set the default source (args: index|name)"

Since there are several naming conventions in different layers of this, I'm
uncertain on which name variation to use. But I know it's card "0," so I try
that and it's refused. It's also index "2" according to pacmd, so I try that
and it's refused too. But this works within pacmd to check that radio
button:

>>> set-default-source alsa_input.usb-Generic_FREETALK_Everyman_0000000001-00-Everyman.analog-stereo

Okay, is there a way to automate sending that to pacmd? Opening its shell
and pasting that in every time isn't a smooth operation, there's no way to
recall it to type it, and the index option looks broken. The pacmd man page
mentions being able to take commands in the same format as .pulse/default.pa. 
But creating a default.pa with that line doesn't result in the radio button
being checked after the headset is unplugged and then plugged in again. Nor 
does restarting pulseaudio from it's init.d script after creating that file.
So that default.pa's just for a full reboot of the computer?

Would it be a simple thing for pacmd's creators to add the ability to accept
as command line options what it can do from its shell? Is there any kludge
to accomplish that meanwhile?

Thanks,
Whit



More information about the pulseaudio-discuss mailing list