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

Colin Guthrie gmane at colin.guthr.ie
Thu Sep 2 00:45:18 PDT 2010


'Twas brillig, and Whit Blauvelt at 02/09/10 05:21 did gyre and gimble:
> Hi,
> 
> This is on an Ubuntu 10.4 system, with an internal sound card I don't use at
> all, and a USB headset with mic that isn't always plugged in. The goal is,
> when it's freshly plugged in, to have it work without extra steps. I have
> that working for the earphones, but not the mic.
> 
> To get it the USB headset listed as card-0 rather than card-1 I created a
> file /etc/modutils/sound_cards with the following:
> 
> 	alias snd-card-0 snd-usb-audio 
>  	alias snd-card-1 snd-via82xx-modem 
> 
> That worked, for whatever it's worth. Then in System > Preferences >
> PulseAudio Preference (which I think came into the system from something
> extra I installed while mucking with this) I went to Simultaneous Output and
> enabled that. Then in System > Preferences > Sound > Output I selected
> "Simultaneous output to ..." which unlike selecting the single output device
> as the USB headset, persists when the headset is unplugged and so works
> right away when it's plugged back in.
> 
> In System > Preference > Hardware I disabled the internal card (for what
> that's worth).
> 
> Here's the problem I haven't solved. In System > Preferences > Sound > Input
> the listing for the USB device comes back soon after it's plugged in again.
> And it's the only listing there. But the thing's not checked! My .pulse
> directory has a file, [long-number]-default-source which gains and loses the
> USB device's name as it's plugged and unplugged, but that file stays the
> same whether it's checked or not.
> 
> 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.

I've written about this before and have a proposal to solve it, but I've
not started work on it yet due to it not being fully approved as an
approach yet.

http://colin.guthr.ie/2010/02/this-is-the-route-to-hell/

Col



-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mandriva Linux Contributor [http://www.mandriva.com/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]




More information about the pulseaudio-discuss mailing list