PulseAudio, switch audio output on device connection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi PulseAudio list,

Note: please keep me in CC, i'm not registered on this list.

I've been having this issue for as long as i use Linux (with
pulseaudio) but never really bothered to look into the issue and try
to resolve it. That's something i've been trying to tackle for a few
days now without any notable success.

First to clear make my use case clear.
- I have a USB headset (but the same is true for jack).
- On windows and mac, whenever i plug in a headset (usb or jack) all
audio is redirected to that device.

My linux setup:
- Archlinux x64 (fully up to date)
- KDE 4.xx

What i want to accomplish is to have the same hassle free use case on
linux as it works on windows and mac. My (fairly default) default.pa
can be found here [1]. The only things i added (as far as i can
remember) is:
# automatically switch to newly-connected devices
load-module module-switch-on-connect

Which i did because it "looked" like the thing i needed based on one
of the comments in [2]. It doesn't seem to do anything for me though.

So how do i let PulseAudio redirect all audio output to (the last)
audio device that i connected to it? Just like it works on Windows and
Mac? I mean, i can change output sinks in pavucontrol, but that is
hardly a sane way to do every time. There must be "some" easy way out
there to do this, right?

Also, it would be very nice of the audio switched sink while audio is playing.

I prefer doing this using just default pulseaudio and linux commands.
I know of the "paswitch" git project somewhere that allows me to
switch output devices, but i don't believe that's the right way to do
something like this.

I hope this list could share the appropriate way in getting this done.

For reference, i tried the same use case in Ubuntu, Kubuntu and Magaia
(plug in a headset, play music and listen where the sound comes from).
In all cases no sound was coming out of my headset. All sound came out
of the speakers (that are connected via a jack plug).

Best regards,
Mark

[1] http://pastebin.com/NL7hbvS6
[2] http://typethinker.blogspot.nl/2012/07/switching-default-pulseaudio-device.html


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux