[pulseaudio-discuss] how to change default sound card using a command line ?

Colin Guthrie gmane at colin.guthr.ie
Sat Nov 14 04:57:54 PST 2009

'Twas brillig, and Tanu Kaskinen at 14/11/09 11:25 did gyre and gimble:
> la, 2009-11-14 kello 10:04 +0000, Colin Guthrie kirjoitti:
>> There is not really such a thing as a "default" audio card in PA. The 
>> term we use is usually "fallback" as this more accurately represents 
>> what it means. PA remembers each application's preferred device. Thus if 
>> you play something in e.g. mplayer and we've never seen an mplayer 
>> stream before, we will use the "fallback" device and then save that 
>> choice in a little database. The next time mplayer tries to play 
>> something, we first look to see if we've got a preferred device for 
>> mplayer and if so, we use it. In this second case the "fallback" device 
>> is not consulted.
>> So, from the command line you can indeed set the fallback sink via the 
>> command:
>> pacmd set-default-sink index|name
>> But this will only really change the "fallback", e.g. all apps that have 
>> played before will continue using that device. If you want to change 
>> these previously stored preferences, the only tool that supports that 
>> currently is the gnome-volume-control. pavucontol does not update the 
>> individual application preferences either.
>> Hope that clarifies things.
> I think you've explained that at least three times by now ;) I created a
> wiki page that you can hopefully use as a canned response in the future:
> http://pulseaudio.org/wiki/DefaultDevice

I think three times is probably an underestimate. Thanks for that. I was 
thinking of doing something similar on the wiki while I wrote that but 
with some kind of ironic lazyness I didn't bother :p Thanks!



Colin Guthrie

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