mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
pulse: add a small pulseaudio daemon
Add a small application that loads the pulse server and makes it listen on the pulseaudio socket. Add some systemd activation files to start the service.
This commit is contained in:
parent
10207456f0
commit
798bcc10b1
5 changed files with 181 additions and 1 deletions
|
|
@ -1,11 +1,19 @@
|
|||
systemd_user_services_dir = systemd.get_pkgconfig_variable('systemduserunitdir', define_variable : [ 'prefix', prefix])
|
||||
|
||||
install_data(sources : 'pipewire.socket', install_dir : systemd_user_services_dir)
|
||||
install_data(
|
||||
sources : ['pipewire.socket', 'pipewire-pulse.socket'],
|
||||
install_dir : systemd_user_services_dir)
|
||||
|
||||
systemd_config = configuration_data()
|
||||
systemd_config.set('PW_BINARY', join_paths(pipewire_bindir, 'pipewire'))
|
||||
systemd_config.set('PW_PULSE_BINARY', join_paths(pipewire_bindir, 'pipewire-pulse'))
|
||||
|
||||
configure_file(input : 'pipewire.service.in',
|
||||
output : 'pipewire.service',
|
||||
configuration : systemd_config,
|
||||
install_dir : systemd_user_services_dir)
|
||||
|
||||
configure_file(input : 'pipewire-pulse.service.in',
|
||||
output : 'pipewire-pulse.service',
|
||||
configuration : systemd_config,
|
||||
install_dir : systemd_user_services_dir)
|
||||
|
|
|
|||
25
src/daemon/systemd/user/pipewire-pulse.service.in
Normal file
25
src/daemon/systemd/user/pipewire-pulse.service.in
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
[Unit]
|
||||
Description=PipeWire PulseAudio
|
||||
|
||||
# We require pipewire-pulse.socket to be active before starting the daemon, because
|
||||
# while it is possible to use the service without the socket, it is not clear
|
||||
# why it would be desirable.
|
||||
#
|
||||
# A user installing pipewire and doing `systemctl --user start pipewire-pulse`
|
||||
# will not get the socket started, which might be confusing and problematic if
|
||||
# the server is to be restarted later on, as the client autospawn feature
|
||||
# might kick in. Also, a start of the socket unit will fail, adding to the
|
||||
# confusion.
|
||||
#
|
||||
# After=pipewire-pulse.socket is not needed, as it is already implicit in the
|
||||
# socket-service relationship, see systemd.socket(5).
|
||||
Requires=pipewire-pulse.socket
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=@PW_PULSE_BINARY@
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
Also=pipewire-pulse.socket
|
||||
WantedBy=default.target
|
||||
10
src/daemon/systemd/user/pipewire-pulse.socket
Normal file
10
src/daemon/systemd/user/pipewire-pulse.socket
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=PipeWire PulseAudio
|
||||
|
||||
[Socket]
|
||||
Priority=6
|
||||
Backlog=5
|
||||
ListenStream=%t/pulse/native
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue