distribution/packages/audio/pipewire/patches/001-pipewire-pulse.patch

72 lines
3.2 KiB
Diff

diff -rupN pipewire-0.3.84.orig/src/daemon/pipewire-pulse.conf.in pipewire-0.3.84/src/daemon/pipewire-pulse.conf.in
--- pipewire-0.3.84.orig/src/daemon/pipewire-pulse.conf.in 2023-11-13 16:35:56.502690919 +0000
+++ pipewire-0.3.84/src/daemon/pipewire-pulse.conf.in 2023-11-13 16:36:28.096495134 +0000
@@ -90,11 +90,11 @@ pulse.properties = {
#"tcp:[::]:9999" # IPv6 on all addresses
#"tcp:127.0.0.1:8888" # IPv4 on a single address
#
- #{ address = "tcp:4713" # address
- # max-clients = 64 # maximum number of clients
- # listen-backlog = 32 # backlog in the server listen queue
- # client.access = "restricted" # permissions for clients
- #}
+ { address = "tcp:127.0.0.1:4713" # address
+ max-clients = 64 # maximum number of clients
+ listen-backlog = 32 # backlog in the server listen queue
+ client.access = "allowed" # permissions for clients
+ }
]
#server.dbus-name = "org.pulseaudio.Server"
#pulse.min.req = 128/48000 # 2.7ms
diff -rupN pipewire-0.3.84.orig/src/daemon/systemd/system/pipewire.service.in pipewire-0.3.84/src/daemon/systemd/system/pipewire.service.in
--- pipewire-0.3.84.orig/src/daemon/systemd/system/pipewire.service.in 2023-11-13 16:35:56.502690919 +0000
+++ pipewire-0.3.84/src/daemon/systemd/system/pipewire.service.in 2023-11-13 16:36:28.096495134 +0000
@@ -15,21 +15,24 @@ Description=PipeWire Multimedia Service
Requires=pipewire.socket
[Service]
-LockPersonality=yes
-MemoryDenyWriteExecute=yes
-NoNewPrivileges=yes
-RestrictNamespaces=yes
-SystemCallArchitectures=native
-SystemCallFilter=@system-service
+Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket
+User=root
Type=simple
-AmbientCapabilities=CAP_SYS_NICE
-ExecStart=@PW_BINARY@
+ExecStart=/usr/bin/pipewire
Restart=on-failure
RuntimeDirectory=pipewire
RuntimeDirectoryPreserve=yes
-User=pipewire
Environment=PIPEWIRE_RUNTIME_DIR=%t/pipewire
+# Add if you need debugging
+# Environment=PIPEWIRE_DEBUG=4
+
+# These hardcoded runtime and dbus paths must stay this way for a system service
+# as the User= is not resolved here 8(
+## NOTE we do not change PIPEWIRE_RUNTIME_DIR as this is the system socket dir...
+Environment=XDG_RUNTIME_DIR=/var/run/0-runtime-dir
+Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket
+Environment=HOME=/storage
[Install]
-Also=pipewire.socket
+Also=pipewire-pulse.socket
WantedBy=default.target
diff -rupN pipewire-0.3.84.orig/src/daemon/systemd/system/pipewire.socket pipewire-0.3.84/src/daemon/systemd/system/pipewire.socket
--- pipewire-0.3.84.orig/src/daemon/systemd/system/pipewire.socket 2023-11-13 16:35:56.502690919 +0000
+++ pipewire-0.3.84/src/daemon/systemd/system/pipewire.socket 2023-11-13 16:36:58.434228383 +0000
@@ -5,8 +5,8 @@ Description=PipeWire Multimedia System S
Priority=6
ListenStream=%t/pipewire/pipewire-0
ListenStream=%t/pipewire/pipewire-0-manager
-SocketUser=pipewire
-SocketGroup=pipewire
+SocketUser=root
+SocketGroup=root
SocketMode=0660
[Install]