From 8661d3feab49c4c2c258ec9d2a334652f79fe325 Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Thu, 11 Mar 2021 09:03:28 -0800 Subject: [PATCH 1/6] pulseaudio: use default dbus policy file --- .../pulseaudio/config/pulseaudio-system.conf | 33 ------------------- packages/audio/pulseaudio/package.mk | 3 +- 2 files changed, 2 insertions(+), 34 deletions(-) delete mode 100644 packages/audio/pulseaudio/config/pulseaudio-system.conf diff --git a/packages/audio/pulseaudio/config/pulseaudio-system.conf b/packages/audio/pulseaudio/config/pulseaudio-system.conf deleted file mode 100644 index c92fc53010..0000000000 --- a/packages/audio/pulseaudio/config/pulseaudio-system.conf +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/packages/audio/pulseaudio/package.mk b/packages/audio/pulseaudio/package.mk index 007839628e..7835401ed8 100644 --- a/packages/audio/pulseaudio/package.mk +++ b/packages/audio/pulseaudio/package.mk @@ -80,7 +80,8 @@ post_makeinstall_target() { safe_remove ${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/ + + sed 's/user="pulse"/user="root"/' -i ${INSTALL}/etc/dbus-1/system.d/pulseaudio-system.conf mkdir -p ${INSTALL}/usr/config cp -PR ${PKG_DIR}/config/pulse-daemon.conf.d ${INSTALL}/usr/config From 9592aad7fe76a198a2cae4a379c0dfaecf38486b Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Thu, 11 Mar 2021 09:04:16 -0800 Subject: [PATCH 2/6] pulseaudio: enable using module-card-restore to remember card profiles --- packages/audio/pulseaudio/config/system.pa | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/audio/pulseaudio/config/system.pa b/packages/audio/pulseaudio/config/system.pa index 937a2f1334..9136dfa582 100644 --- a/packages/audio/pulseaudio/config/system.pa +++ b/packages/audio/pulseaudio/config/system.pa @@ -27,6 +27,7 @@ load-module module-native-protocol-unix ### Automatically restore the volume of streams and devices load-module module-stream-restore load-module module-device-restore +load-module module-card-restore ### Automatically restore the default sink/source when changed by the user ### during runtime From 228bdeeafd2fa33682e743a5c7c17eb8cc36b250 Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Thu, 11 Mar 2021 09:04:32 -0800 Subject: [PATCH 3/6] pulseaudio: remove loading unneeded modules --- packages/audio/pulseaudio/config/system.pa | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/audio/pulseaudio/config/system.pa b/packages/audio/pulseaudio/config/system.pa index 9136dfa582..5e0eddff8b 100644 --- a/packages/audio/pulseaudio/config/system.pa +++ b/packages/audio/pulseaudio/config/system.pa @@ -19,9 +19,6 @@ # mode. ### Load several protocols -.ifexists module-esound-protocol-unix.so -load-module module-esound-protocol-unix -.endif load-module module-native-protocol-unix ### Automatically restore the volume of streams and devices @@ -45,9 +42,6 @@ load-module module-always-sink ### Automatically suspend sinks/sources that become idle for too long 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 From be73b11f10fcec58061508959cbb0a67748aa8da Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Thu, 11 Mar 2021 09:05:10 -0800 Subject: [PATCH 4/6] pulseaudio: set env for PULSE_STATE_PATH and PULSE_CONFIG_PATH --- packages/audio/pulseaudio/system.d/pulseaudio.service | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/audio/pulseaudio/system.d/pulseaudio.service b/packages/audio/pulseaudio/system.d/pulseaudio.service index f052e019d3..db34b1673e 100644 --- a/packages/audio/pulseaudio/system.d/pulseaudio.service +++ b/packages/audio/pulseaudio/system.d/pulseaudio.service @@ -7,6 +7,8 @@ Type=dbus BusName=org.pulseaudio.Server ExecStart=/usr/bin/pulseaudio --system --disallow-exit --exit-idle-time=-1 --disable-shm Restart=on-failure +Environment=PULSE_STATE_PATH=/storage/.config/pulse +Environment=PULSE_CONFIG_PATH=/storage/.config/pulse [Install] WantedBy=multi-user.target From b9d2f0049c630cd7d962e6228dfa68d617a1acdd Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Thu, 11 Mar 2021 09:05:44 -0800 Subject: [PATCH 5/6] pulseaudio: explicitly enable memfd usage --- packages/audio/pulseaudio/system.d/pulseaudio.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/audio/pulseaudio/system.d/pulseaudio.service b/packages/audio/pulseaudio/system.d/pulseaudio.service index db34b1673e..a4d65a2489 100644 --- a/packages/audio/pulseaudio/system.d/pulseaudio.service +++ b/packages/audio/pulseaudio/system.d/pulseaudio.service @@ -5,7 +5,7 @@ After=syslog.target local-fs.target [Service] Type=dbus BusName=org.pulseaudio.Server -ExecStart=/usr/bin/pulseaudio --system --disallow-exit --exit-idle-time=-1 --disable-shm +ExecStart=/usr/bin/pulseaudio --system --disallow-exit --exit-idle-time=-1 --disable-shm --enable-memfd Restart=on-failure Environment=PULSE_STATE_PATH=/storage/.config/pulse Environment=PULSE_CONFIG_PATH=/storage/.config/pulse From e006b5c2f1529e1285f13807e5d325f759bfa100 Mon Sep 17 00:00:00 2001 From: Lukas Rusak Date: Thu, 11 Mar 2021 09:06:00 -0800 Subject: [PATCH 6/6] pulseaudio: explicitly enable realtime usage --- packages/audio/pulseaudio/system.d/pulseaudio.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/audio/pulseaudio/system.d/pulseaudio.service b/packages/audio/pulseaudio/system.d/pulseaudio.service index a4d65a2489..1ec4269550 100644 --- a/packages/audio/pulseaudio/system.d/pulseaudio.service +++ b/packages/audio/pulseaudio/system.d/pulseaudio.service @@ -5,7 +5,7 @@ After=syslog.target local-fs.target [Service] Type=dbus BusName=org.pulseaudio.Server -ExecStart=/usr/bin/pulseaudio --system --disallow-exit --exit-idle-time=-1 --disable-shm --enable-memfd +ExecStart=/usr/bin/pulseaudio --system --disallow-exit --exit-idle-time=-1 --disable-shm --enable-memfd --realtime Restart=on-failure Environment=PULSE_STATE_PATH=/storage/.config/pulse Environment=PULSE_CONFIG_PATH=/storage/.config/pulse