Ubuntu: Automatically change Sound Input Output device



Question:

I have to plugin my USB Audio adapter ( 4300054 Gigawire USB Audio Adapter) for audio input because has a combo-input-output port for voice. After I do this, I have go open Sound Settings and manually select the USB Audio adapter for Input and Output, if I do not, the system default remains selected.

Is there anyway, I can make Ubuntu to automatically select the USB Audio Adapter as the default as soon as I plug-in?


Solution:1

There is pulseaudio module-switch-on-connect that enables automatic switching of an audio device on connection. To test if this works we may issue the following commmand in a terminal:

pacmd load-module module-switch-on-connect  

On success we can add the following line to our /etc/pulse/default.pa

load-module module-switch-on-connect  

to always load this module on every login, resp. restart of the pulseaudio daemon.


Solution:2

create ~/.config/pulse/default.pa if it doesn't exist and append

.include /etc/pulse/default.pa  load-module module-switch-on-connect  

This is better than editing /etc/pulse/default.pa.

Afterwards you should run pulseaudio -k && pulseaudio --start to have the changes take effect. Thanks for pointing that out lreeder


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »