diff --git a/packages/audio/pulseaudio/config/pulseaudio-system.conf b/packages/audio/pulseaudio/config/pulseaudio-system.conf new file mode 100644 index 0000000000..c92fc53010 --- /dev/null +++ b/packages/audio/pulseaudio/config/pulseaudio-system.conf @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + diff --git a/packages/audio/pulseaudio/config/system.pa b/packages/audio/pulseaudio/config/system.pa index 303370dd97..e621a655e6 100644 --- a/packages/audio/pulseaudio/config/system.pa +++ b/packages/audio/pulseaudio/config/system.pa @@ -55,6 +55,12 @@ load-module module-suspend-on-idle ### Enable positioned event sounds load-module module-position-event-sounds + +### Automatically load modules for dbus +.ifexists module-dbus-protocol.so + load-module module-dbus-protocol +.endif + ### Automatically load modules for bluetooth .ifexists module-bluetooth-policy.so load-module module-bluetooth-policy @@ -66,9 +72,11 @@ load-module module-position-event-sounds .ifexists module-zeroconf-publish.so load-module module-zeroconf-publish +.endif + +.ifexists module-zeroconf-discover.so load-module module-zeroconf-discover .endif load-module module-native-protocol-tcp auth-anonymous=1 load-module module-switch-on-connect - diff --git a/packages/audio/pulseaudio/package.mk b/packages/audio/pulseaudio/package.mk index 9f23d4b21a..255add12c8 100644 --- a/packages/audio/pulseaudio/package.mk +++ b/packages/audio/pulseaudio/package.mk @@ -98,12 +98,6 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-silent-rules \ --with-module-dir=/usr/lib/pulse" post_makeinstall_target() { -# add_user pulse x 499 498 "PulseAudio System Daemon" "/var/run/pulse" "/bin/sh" -# add_group pulse 498 -# add_group pulse-access 497 - - sed -e 's%user="pulse"%user="root"%g' -i $INSTALL/etc/dbus-1/system.d/pulseaudio-system.conf - rm -rf $INSTALL/usr/bin/esdcompat rm -rf $INSTALL/usr/include rm -rf $INSTALL/usr/lib/cmake @@ -114,6 +108,7 @@ post_makeinstall_target() { rm -rf $INSTALL/usr/share/bash-completion cp $PKG_DIR/config/system.pa $INSTALL/etc/pulse/ + cp $PKG_DIR/config/pulseaudio-system.conf $INSTALL/etc/dbus-1/system.d/ # Remove unwanted symlinks for file in $INSTALL/*; do diff --git a/packages/audio/pulseaudio/profile.d/04-pulseaudio.conf b/packages/audio/pulseaudio/profile.d/04-pulseaudio.conf deleted file mode 100644 index 0c72f573cb..0000000000 --- a/packages/audio/pulseaudio/profile.d/04-pulseaudio.conf +++ /dev/null @@ -1 +0,0 @@ -export SDL_AUDIODRIVER=pulse diff --git a/packages/audio/pulseaudio/system.d/pulseaudio.service b/packages/audio/pulseaudio/system.d/pulseaudio.service index e0b774248c..70c9b1211d 100644 --- a/packages/audio/pulseaudio/system.d/pulseaudio.service +++ b/packages/audio/pulseaudio/system.d/pulseaudio.service @@ -1,15 +1,10 @@ [Unit] Description=PulseAudio Sound System After=syslog.target local-fs.target -Requires=bluetooth.service [Service] -Type=forking -ExecStart=/usr/bin/pulseaudio --start --daemonize --log-level=0 -TimeoutStopSec=5 +ExecStart=/usr/bin/pulseaudio --system Restart=always -RestartSec=2 -StartLimitInterval=0 [Install] WantedBy=multi-user.target