[pulseaudio-discuss] systemd socket activation support

Jaska Uimonen jaska.uimonen at helsinki.fi
Thu Oct 23 22:46:43 PDT 2014


Hi Colin,

And thanks for the patches, I really need these for Tizen IVI.

In my initial testing they seem to work fine, however couple
of observations:

in socket-server.c the systemd headers are behind the systemd
enabler flags (like they should be), but that is behind some
HAVE_LIBWRAP thing. I had to move the include outside to get
the patches compiled.

in main.c you are defining int n, but there's later ssize_t n
which gives you shadowed declaration warning, but thats mainly
cosmetics.

br,
Jaska

Quoting Colin Guthrie <colin at mageia.org>:

> Hi,
>
> So while at linux plumbers attending the systemd hackfest, I thought a good
> use of the hacking time I had available would be to allow PulseAudio to be
> activated via systemd's socket activation system.
>
> The changes needed are actually quite minimal, and by doing this we can
> disable quite a lot of code in PulseAudio related to autospawning (which
> does still seem to cause some problems for some users) and we also get a few
> handy side effects too.
>
> It becomes much easier, as a developer, to stop the system PulseAudio and run
> your own test instance i.e. you do not have to disable autospawning before
> killing the system PA - you just run:
>
> systemctl --user stop pulseaudio.socket pulseaudio.service
>
> and then run your test version.
>
> A second advantage is that there is a relatively simple and documented way to
> run e.g. mpd as a normal user before you login via the systemd user lingering
> feature.
>
> I've written a few docs about all this here:
> http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Software/PulseAudio/Documentation/User/Running/
>
> (NB I've assumed v6 for landing this but that could be updated as needed)
>
> All the best!
>
> Col
>
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss





More information about the pulseaudio-discuss mailing list