diff --git a/src/daemon/pipewire-pulse.conf.in b/src/daemon/pipewire-pulse.conf.in index 7394d8022..c4ddabe08 100644 --- a/src/daemon/pipewire-pulse.conf.in +++ b/src/daemon/pipewire-pulse.conf.in @@ -40,32 +40,8 @@ context.modules = [ { name = libpipewire-module-protocol-pulse args = { - # the addresses this server listens on - server.address = [ - "unix:native" - #"unix:/tmp/something" # absolute paths may be used - #"tcp:4713" # IPv4 and IPv6 on all addresses - #"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 - #} - ] - #pulse.min.req = 256/48000 # 5ms - #pulse.default.req = 960/48000 # 20 milliseconds - #pulse.min.frag = 256/48000 # 5ms - #pulse.default.frag = 96000/48000 # 2 seconds - #pulse.default.tlength = 96000/48000 # 2 seconds - #pulse.min.quantum = 256/48000 # 5ms - #pulse.default.format = F32 - #pulse.default.position = [ FL FR ] - # These overrides are only applied when running in a vm. - vm.overrides = { - pulse.min.quantum = 1024/48000 # 22ms - } + # contents of pulse.properties can also be placed here + # to have config per server. } } ] @@ -91,6 +67,35 @@ stream.properties = { #channelmix.hilbert-taps = 0 } +pulse.properties = { + # the addresses this server listens on + server.address = [ + "unix:native" + #"unix:/tmp/something" # absolute paths may be used + #"tcp:4713" # IPv4 and IPv6 on all addresses + #"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 + #} + ] + #pulse.min.req = 256/48000 # 5ms + #pulse.default.req = 960/48000 # 20 milliseconds + #pulse.min.frag = 256/48000 # 5ms + #pulse.default.frag = 96000/48000 # 2 seconds + #pulse.default.tlength = 96000/48000 # 2 seconds + #pulse.min.quantum = 256/48000 # 5ms + #pulse.default.format = F32 + #pulse.default.position = [ FL FR ] + # These overrides are only applied when running in a vm. + vm.overrides = { + pulse.min.quantum = 1024/48000 # 22ms + } +} + # client/stream specific properties pulse.rules = [ { diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index 4332ca58c..6d07f54c0 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -5350,6 +5350,8 @@ struct pw_protocol_pulse *pw_protocol_pulse_new(struct pw_context *context, support = pw_context_get_support(context, &n_support); cpu = spa_support_find(support, n_support, SPA_TYPE_INTERFACE_CPU); + pw_context_conf_update_props(context, "pulse.properties", props); + if ((str = pw_properties_get(props, "vm.overrides")) != NULL) { if (cpu != NULL && spa_cpu_get_vm_type(cpu) != SPA_CPU_VM_NONE) pw_properties_update_string(props, str, strlen(str));