Skip to content

Commit

Permalink
Use higher quantum to hopefully fix audio on laptop
Browse files Browse the repository at this point in the history
  • Loading branch information
joinemm committed Sep 3, 2024
1 parent c61a7b4 commit 6a892a3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 20 deletions.
10 changes: 10 additions & 0 deletions hosts/athens/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@
];
};

# the laptop cpu is not powerful enough and low quantum causes garbled audio
services.pipewire.extraConfig.pipewire."92-fix-quantum" = {
context.properties = {
default.clock.rate = 48000;
default.clock.quantum = 1024;
default.clock.min-quantum = 512;
default.clock.max-quantum = 4092;
};
};

services = {
syncthing.settings.folders = {
"camera".enable = true;
Expand Down
20 changes: 0 additions & 20 deletions modules/desktop/sound.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,6 @@
"wireplumber.profiles".main."monitor.libcamera" = "disabled";
};
};

extraConfig.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;
Expand Down

0 comments on commit 6a892a3

Please sign in to comment.