[pulseaudio-discuss] [PATCH] JACK: Add module-jackdbus-detect

David Henningsson david.henningsson at canonical.com
Fri Dec 3 03:58:32 PST 2010

On 2010-12-03 11:35, Colin Guthrie wrote:
> Hiya
> Seems like a good patch at first glance.

Thanks! :-)

> One minor question that I
> really don't know the answer to right now, but firgured it's worth
> asking. This approach seems totally separate from the device reservation
> protocol that works between Jack and PA to do graceful handover. Is
> there any chance of races here between the two different IPCs? I don't
> think so (i'd expect Jack to ensure it gets the device first before it
> reports that it isStarted()).

I'd say they are unrelated. The device handover, as you say, might 
happen before JACK is fully started. Also; JACK controlling ALSA is not 
all use cases, JACK can also control firewire sound cards (and it has 
network and oss drivers as well).

Also IIRC, there is no automatic stream moving/rescuing when device 
reservation happens, so existing streams will not move, you'll still 
have to manually switch to the JACK sink in kde/gnome/pavu-control.

> I suspect that this is actually needed as if we try to load the
> jack-sink's immediately when we hand over the device control to jack,
> then jack is likely not ready yet (I think Lennart mentioned this in the
> past, and thus makes me thing that speaking to jack directly (as you do)
> is the only way to make this work correctly)
> 'Twas brillig, and David Henningsson at 03/12/10 08:29 did gyre and gimble:
>> * A question is about the default; patch 2 here adds it to default.pa.
>> Should "connect" default to true or false in such a scenario? I think it
>> depends on whether we're aiming for just showing the user the
>> possibility (connect=false), or if we're aiming for a just-works
>> experience (connect=true), which might upset a few people who don't want
>> it to work that way...I've gone with connect=true as the default to
>> mimic the behaviour of module-jack-sink and module-jack-source.
> I think it's probably OK to go into default.pa, but it could also be an
> option in paprefs too.....
> e.g. a ticky box for:
> "[ ] Automatically redirect audio through Jack if it is started"
> or similar.
> WDYT is best?

Perhaps I need to explain a little further - there is a "routing 
patchbay" inside the JACK server; connect=true means that when a 
module-jack-sink is started, it will connect the jack-sink (which is an 
input seen from JACK) to the system's sound card output. If 
connect=false, it will just show up as an unconnected sink, making it 
easy for people who want to connect that sink to the sound card, run it 
through a vocoder [1], record it into Ardour, or anything else.

Perhaps we should go and ask the Ubuntu Studio and/or Planet CCRMA folks 
and see if they have an opinion? Leaving them unconnected would be a 
less invasive approach.

David Henningsson, Canonical Ltd.

[1] Admit you always wanted your system sounds vocoded! ;-)

More information about the pulseaudio-discuss mailing list