[pulseaudio-discuss] jack soundcard reservation behavior

Fernando Lopez-Lezcano nando at ccrma.Stanford.EDU
Fri Jul 31 13:46:50 PDT 2009


On Fri, 2009-07-31 at 22:14 +0200, Lennart Poettering wrote:
> On Fri, 31.07.09 11:01, Fernando Lopez-Lezcano (nando at ccrma.Stanford.EDU) wrote:
> 
> > Hi, new on this list... (please keep cc'ing Stephane, he's not in the pa
> > list). 
> > 
> > I'm testing the jack soundcard reservation dbus code with the latest
> > release of jackmp (1.9.3) and I'm not sure things are working quite
> > right. 
> > 
> > When starting jackd the soundcard is correctly reserved, pulseaudio
> > releases it, and jackd is able to start normally and use the card. A
> > stream that was playing through the soundcard at that point in time
> > seems to be paused by the reservation code (I'm using rhythmbox to test
> > but the same thing seems to happen with other apps). If running
> > pulseaudio with -vvv I can see a message re: the successful
> > reservation. 
> > 
> > When quitting jackd, jackd prints a message to the effect that the card
> > was released but nothing seems to happen on the pulseaudio side (this is
> > being tested on Fedora 11 with the latest pulseaudio package). No
> > message is printed and no state changes in the application that was
> > playing audio before the reservation took place. In the case of
> > rhythmbox I need to press "play" _twice_ to get it to continue playing
> > from where it stopped. 
> 
> Yes, PA in F11 only resumes the device after a new stream gets started
> on the device. 

Ah, that explains why, for example, starting pavucontrol would suddenly
get things moving again (I forgot to mention that). 

> PA in the upcoming F12 has been fixed to actively
> monitor the reservation logic and automatically resume the device when
> jack goes away.

Then I guess I'll wait till then and use my script in the meantime
(which is working fine AFAICT in fc10/11). 

One question though, shouldn't pulseaudio have printed something when
jack quits? (with -vvv) It does print when jack asks for the card. 

> So with F12 you start jack, and rb stops and then you quit jack and rb
> continues automatically.

Great. But do the streams stop playing or do they continue playing
"muted" while the card is "borrowed" by jackd? If I use the pacmd
suspend 1 trick they continue playing (muted, or sent to the equivalent
of /dev/null, I don't know). 

> > [*] for example it would allow for currently playing streams to be moved
> > to a dynamically loaded jack plugin without missing a beat (or rather,
> > with a very short interruption). Part of this is also implemented in my
> > current script. 
> 
> I'd love to make PA automatically load a jack connectivity module when
> JACK is started up. A simple way to implement that would be by
> watching for JACK's service name to appear on the bus. But
> unfortunately jack doesn't work that way and the running daemon does
> not take name on the bus.

Couldn't jack notify when it is ready? (and furthermore when it is about
to quit). It is already talking on dbus with pulseaudio... I'm pretty
sure things are not so easy :-) It would also have to be something you
could turn on/off when jack is started, maybe that would be the deal
killer. 

-- Fernando





More information about the pulseaudio-discuss mailing list