From 8de7fbf3f5442974dcf56925a318d25005f43058 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sun, 23 Jun 2024 14:45:47 -0400 Subject: [PATCH] [systems.zaphod] pipewire: configure for low latency --- .../x86_64-linux/zaphod/services/pipewire.nix | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/systems/x86_64-linux/zaphod/services/pipewire.nix b/systems/x86_64-linux/zaphod/services/pipewire.nix index 85101f69..30e523be 100644 --- a/systems/x86_64-linux/zaphod/services/pipewire.nix +++ b/systems/x86_64-linux/zaphod/services/pipewire.nix @@ -7,6 +7,35 @@ jack.enable = true; pulse.enable = true; wireplumber.enable = true; + extraConfig = { + pipewire."92-low-latency" = { + "context.properties" = { + "default.clock.rate" = 48000; + "default.clock.quantum" = 32; + "default.clock.min-quantum" = 32; + "default.clock.max-quantum" = 32; + }; + }; + pipewire-pulse."92-low-latency" = { + "context.properties" = [ + { + name = "libpipewire-module-protocol-pulse"; + args = { }; + } + ]; + "pulse.properties" = { + "pulse.min.req" = "32/48000"; + "pulse.default.req" = "32/48000"; + "pulse.max.req" = "32/48000"; + "pulse.min.quantum" = "32/48000"; + "pulse.max.quantum" = "32/48000"; + }; + "stream.properties" = { + "node.latency" = "32/48000"; + "resample.quality" = 1; + }; + }; + }; }; security.rtkit.enable = true; } -- 2.51.2