feat(sound): allow dynamic clock rates

This commit is contained in:
oddlama 2023-09-07 20:27:14 +02:00
parent f56fac68ac
commit a14817d2ab
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A

View file

@ -3,7 +3,14 @@
pkgs, pkgs,
... ...
}: { }: {
environment.systemPackages = with pkgs; [pulseaudio pulsemixer]; # Helpful utilities:
# Show pipewire devices and application overview or specifics
# > wpctl status; wpctl inspect <id>
# View real time node and device statistics
# > pw-top
# Show actual used playback stream settings
# > cat /proc/asound/card*/pcm*p/sub*/hw_params
sound.enable = false; # ALSA sound.enable = false; # ALSA
hardware.pulseaudio.enable = lib.mkForce false; hardware.pulseaudio.enable = lib.mkForce false;
security.rtkit.enable = true; security.rtkit.enable = true;
@ -13,22 +20,30 @@
jack.enable = true; jack.enable = true;
pulse.enable = true; pulse.enable = true;
wireplumber.enable = true; wireplumber.enable = true;
#config = { };
# pipewire."context.properties"."default.clock.allowed-rates" = [
# 44100 environment.systemPackages = with pkgs; [pulseaudio pulsemixer];
# 48000 environment.etc = {
# 88200 # Allow pipewire to dynamically adjust the rate sent to the devices based on the playback stream
# 96000 "pipewire/pipewire.conf.d/99-allowed-rates.conf".text = builtins.toJSON {
# 176400 "context.properties"."default.clock.allowed-rates" = [
# 192000 44100
# 358000 48000
# 384000 88200
# 716000 96000
# 768000 176400
# ]; 192000
# pipewire-pulse."stream.properties"."resample.quality" = 15; ];
# client."stream.properties"."resample.quality" = 15; };
# client-rt."stream.properties"."resample.quality" = 15; # If resampling is required, use a higher quality. 15 is overkill and too cpu expensive without any obvious audible advantage
#}; "pipewire/pipewire-pulse.conf.d/99-resample.conf".text = builtins.toJSON {
"stream.properties"."resample.quality" = 10;
};
"pipewire/client.conf.d/99-resample.conf".text = builtins.toJSON {
"stream.properties"."resample.quality" = 10;
};
"pipewire/client-rt.conf.d/99-resample.conf".text = builtins.toJSON {
"stream.properties"."resample.quality" = 10;
};
}; };
} }