Update pipewire pulse configuration
This commit is contained in:
parent
24a13b689c
commit
75f0383ba5
8 changed files with 207 additions and 27 deletions
95
templates/desktop/pipewire-pulse.j2
Normal file
95
templates/desktop/pipewire-pulse.j2
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
#
|
||||
# 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
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/sh
|
||||
#
|
||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
|
||||
/usr/bin/pactl load-module module-native-protocol-tcp auth-anonymous=1 listen={{ vpn_ip }}
|
||||
95
templates/laptop/pipewire-pulse.j2
Normal file
95
templates/laptop/pipewire-pulse.j2
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
#
|
||||
# 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
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/sh
|
||||
#
|
||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
|
||||
/usr/bin/pactl load-module module-native-protocol-tcp auth-anonymous=1 listen=10.0.0.2
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
|
||||
[Service]
|
||||
ExecStartPost={{ xdg_script_dir }}/pulse-script
|
||||
Loading…
Add table
Add a link
Reference in a new issue