[pulseaudio-discuss] Automatic selection of an audio sink depending on value of ENV variable

Leszek Koltunski leszek at koltunski.pl
Mon Oct 19 01:38:15 PDT 2009


Here's my usercase:

I've got a monitor and sound card hw:0.0 set up as my primary video/audio
sinks.
I've also got a TV , located in a different room, connected to a TV-Out and
to another sound card, hw:1.0

I've also got a Bluetooth keyboard and mouse. So whenever I want to watch a
video or show my guests a picture slideshow , I simply connect the (looong!)
vidao/audio cables to the TV, move the keyboard and mouse (still work from
~8m away! ) and lie down on the sofa :)

The TV is a separate X screen ( why would I use Xinerama? I don't need to
move windows between the displays ) so when an application is launched on
the monitor, DISPLAY is set to "0.0" and when I operate on the TV, it is
"1.0".

I hope you already know what I have in mind: the above works wonderfully,
except for the sound. Every time I work on the TV, the sound should be sent
to hw:1.0, so I have to fire up the new 'gnome-sound-properties 2.28' (BTW,
wonderful app! simple and effective) and select hw:1.0 to be the audio sink
for now.

Worse, since the TV is on 2nd X screen, 'gnome-sound-properties' applet
won't start there ( it claims there is already one running - sure there is,
on the monitor - and refuses to start ). So it order to change the audio
sink, I have to haul my lazy butt back to the monitor.

Now, I would make me one happy duck if I could somehow tell Pulse to
automatically route audio to hw:1.0 whenever I am working on the TV, that
is, whenever DISPLAY is "1.0".

Is that possible?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20091019/1750df39/attachment.htm>


More information about the pulseaudio-discuss mailing list