arch-setup/templates/desktop/pipewire-pulse.j2
Sonny Bakker 8e7d6db56b Remove template timestamps & move tasks to handlers
These changes will prevent services from being restarted without any changes
whenever no changes have been made
2024-03-16 10:36:59 +01:00

93 lines
2.7 KiB
Django/Jinja

# PulseAudio config file for PipeWire version "0.3.48" #
#
# Copy and edit this file in /etc/pipewire for system-wide changes
# or in ~/.config/pipewire for local changes.
#
# It is also possible to place a file with an updated section in
# /etc/pipewire/pipewire-pulse.conf.d/ for system-wide changes or in
# ~/.config/pipewire/pipewire-pulse.conf.d/ for local changes.
#
context.properties = {}
context.spa-libs = {
audio.convert.* = audioconvert/libspa-audioconvert
support.* = support/libspa-support
}
context.modules = [
{ name = libpipewire-module-rt
args = {
nice.level = -11
}
flags = [ ifexists nofail ]
}
{ name = libpipewire-module-protocol-native }
{ name = libpipewire-module-client-node }
{ name = libpipewire-module-adapter }
{ name = libpipewire-module-metadata }
{ name = libpipewire-module-protocol-pulse
args = {
server.address = [
"unix:native"
{ address = "tcp:{{ vpn_ip }}:{{ pulse_port }}"
max-clients = 64
listen-backlog = 32
client.access = "allowed"
}
]
# These overrides are only applied when running in a vm.
vm.overrides = {
pulse.min.quantum = 1024/48000 # 22ms
}
}
}
{ name = libpipewire-module-access
args = {
access.allowed = [
/usr/bin/pipewire-media-session
/usr/bin/mpd
]
access.rejected = [
]
}
}
]
# Extra modules can be loaded here. Setup in default.pa can be moved here
context.exec = [
{ path = "pactl" args = "load-module module-always-sink" }
]
stream.properties = {}
# client/stream specific properties
pulse.rules = [
{
# skype does not want to use devices that don't have an S16 sample format.
matches = [
{ application.process.binary = "teams" }
{ application.process.binary = "skypeforlinux" }
]
actions = { quirks = [ force-s16-info ] }
}
{
# firefox marks the capture streams as don't move and then they
# can't be moved with pavucontrol or other tools.
matches = [ { application.process.binary = "firefox" } ]
actions = { quirks = [ remove-capture-dont-move ] }
}
{
# speech dispatcher asks for too small latency and then underruns.
matches = [ { application.name = "~speech-dispatcher*" } ]
actions = {
update-props = {
pulse.min.req = 1024/48000 # 21ms
pulse.min.quantum = 1024/48000 # 21ms
}
}
}
]