fix(audio): Fix popping after audio suspend

This commit is contained in:
Tibo De Peuter 2024-12-10 15:52:37 +01:00
parent 2316cb2d9c
commit fb9cd8b9e9
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2

View file

@ -6,8 +6,6 @@ in {
options.sisyphus.services.pipewire.enable = lib.mkEnableOption "Pipewire"; options.sisyphus.services.pipewire.enable = lib.mkEnableOption "Pipewire";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
enable = true; enable = true;
@ -20,6 +18,26 @@ in {
# use the example session manager (no others are packaged yet so this is enabled by default, # use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now) # no need to redefine it in your config for now)
#media-session.enable = true; #media-session.enable = true;
wireplumber = {
enable = true;
# Fix pops after silence
extraConfig."99-disable-suspend" = {
"monitor.alsa.rules" = [
{
matches = [
# Headphone jack on laptop
{ "node.name" = "alsa_output.pci-0000_00_1f.3.analog-stereo"; }
];
actions = {
update-props = {
"session.suspend-timeout-seconds" = 0;
};
};
}
];
};
};
}; };
}; };
} }