Re: [LAU] Auto switching outputs

From: Patrick Shirkey <pshirkey@email-addr-hidden>
Date: Mon Aug 02 2010 - 11:47:32 EEST

On Mon, August 2, 2010 1:33 am, Will Light wrote:
> On Sun, Aug 1, 2010 at 8:12 PM, Erik de Castro Lopo
> <mle+la@email-addr-hidden-nerd.com> wrote:
>> Paul Davis wrote:
>>
>>> On Sun, Aug 1, 2010 at 9:59 PM, Erik de Castro Lopo
>>> <mle+la@email-addr-hidden-nerd.com> wrote:
>>> > Hi all,
>>> >
>>> > I've acquired a pair of wireless headphones; the type thathas a USB
>>> > dongle that plus into amy machine and uses analog FM to communicate
>>> > with the headphones.
>>> >
>>> > These JustWorked(tm) under linux, but now I'd like to have audio
>>> > (either PulseAudio or ALSA) auto switch to the headphones whenever
>>> > they are plugged in.
>>> >
>>> > Is this doable? Any hints?
>>>
>>> ALSA can definitely detect the jack insertion.
>>
>> Not a jack in this case, a USB device that identifies itself as a
>> USB audio device.
>>
>>> However, it requires a
>>> user-space app that is paying attention to the "switch".
>>
>> Would this info be available over DBus?
>>
>
> It's my understanding that HAL is being phased out in favor of
> libudev. Writing an application like what you're describing (i.e.
> watch for a specific USB device to appear or disappear) is very simple
> with the udev_monitor functions.
>

It seems like PA should already support this somehow. Perhaps something
todo with :

    pactl set-default-sink <soundcard>

-- 
Patrick Shirkey
Boost Hardware Ltd.
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Mon Aug 2 12:15:02 2010

This archive was generated by hypermail 2.1.8 : Mon Aug 02 2010 - 12:15:02 EEST