@ -1,21 +1,59 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
security.rtkit.enable = lib.mkDefault config.services.pipewire.enable;
|
||||
services = {
|
||||
pulseaudio.enable = false;
|
||||
pipewire = {
|
||||
}: let
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
|
||||
cfg = config.sound.pipewire;
|
||||
in {
|
||||
options = {
|
||||
sound.pipewire.enable = mkEnableOption "enable pipewire";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
security.rtkit.enable = true;
|
||||
services.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
extraConfig.pipewire."92-low-latency" = {
|
||||
context.properties.default.clock = {
|
||||
rate = 48000;
|
||||
quantum = 32;
|
||||
min-quantum = 32;
|
||||
max-quantum = 32;
|
||||
|
||||
extraConfig = {
|
||||
pipewire = {
|
||||
"92-low-latency" = {
|
||||
"context.properties" = {
|
||||
"default.clock.rate" = 48000;
|
||||
"default.clock.allowed-rates" = [
|
||||
44100
|
||||
48000
|
||||
88200
|
||||
96000
|
||||
];
|
||||
|
||||
"default.clock.min-quantum" = 512;
|
||||
"default.clock.quantum" = 4096;
|
||||
"default.clock.max-quantum" = 8192;
|
||||
};
|
||||
};
|
||||
|
||||
"93-no-resampling" = {
|
||||
"context.properties" = {
|
||||
"default.clock.rate" = 48000;
|
||||
"default.clock.allowed-rates" = [
|
||||
44100
|
||||
48000
|
||||
96000
|
||||
192000
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
"94-no-upmixing" = {
|
||||
"stream.properties" = {
|
||||
"channelmix.upmix" = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user