From b9b9fff6d6658d89810b48983bc0dda1a993190e Mon Sep 17 00:00:00 2001 From: Jan Solanti Date: Wed, 10 Feb 2021 19:32:58 +0200 Subject: [PATCH] pipewire: use strictly upstream defaults --- .../pipewire/pipewire-media-session.nix | 84 +++++++++---------- .../services/desktops/pipewire/pipewire.nix | 34 ++++---- .../libraries/pipewire/default.nix | 2 +- 3 files changed, 60 insertions(+), 60 deletions(-) diff --git a/nixos/modules/services/desktops/pipewire/pipewire-media-session.nix b/nixos/modules/services/desktops/pipewire/pipewire-media-session.nix index b91bdcd6700b..4043d7dcfc43 100644 --- a/nixos/modules/services/desktops/pipewire/pipewire-media-session.nix +++ b/nixos/modules/services/desktops/pipewire/pipewire-media-session.nix @@ -56,8 +56,8 @@ in { properties = { # Properties to configure the session and some # modules - #mem.mlock-all = false - #context.profile.modules = default,rtkit + #mem.mlock-all = false; + #context.profile.modules = "default,rtkit"; }; spa-libs = { @@ -141,14 +141,14 @@ in { # actions can update properties on the matched object. update-props = { api.alsa.use-acp = true; - #api.alsa.use-ucm = true - #api.alsa.soft-mixer = false - #api.alsa.ignore-dB = false - #device.profile-set = "profileset-name" - #device.profile = "default profile name" + #api.alsa.use-ucm = true; + #api.alsa.soft-mixer = false; + #api.alsa.ignore-dB = false; + #device.profile-set = "profileset-name"; + #device.profile = "default profile name"; api.acp.auto-profile = false; api.acp.auto-port = false; - #device.nick = "My Device" + #device.nick = "My Device"; }; }; } @@ -165,22 +165,22 @@ in { ]; actions = { update-props = { - #node.nick = "My Node" - #node.nick = null - #priority.driver = 100 - #priority.session = 100 - #node.pause-on-idle = false - #resample.quality = 4 - #channelmix.normalize = false - #channelmix.mix-lfe = false - #audio.channels = 2 - #audio.format = "S16LE" - #audio.rate = 44100 - #audio.position = "FL,FR" - #api.alsa.period-size = 1024 - #api.alsa.headroom = 0 - #api.alsa.disable-mmap = false - #api.alsa.disable-batch = false + #node.nick = "My Node"; + #node.nick = null; + #priority.driver = 100; + #priority.session = 100; + #node.pause-on-idle = false; + #resample.quality = 4; + #channelmix.normalize = false; + #channelmix.mix-lfe = false; + #audio.channels = 2; + #audio.format = "S16LE"; + #audio.rate = 44100; + #audio.position = "FL,FR"; + #api.alsa.period-size = 1024; + #api.alsa.headroom = 0; + #api.alsa.disable-mmap = false; + #api.alsa.disable-batch = false; }; }; } @@ -197,8 +197,8 @@ in { # bluez-monitor config file properties = { # msbc is not expected to work on all headset + adapter combinations. - #bluez5.msbc-support = true - #bluez5.sbc-xq-support = true + #bluez5.msbc-support = true; + #bluez5.sbc-xq-support = true; # Enabled headset roles (default: [ hsp_hs hfp_ag ]), this # property only applies to native backend. Currently some headsets @@ -208,10 +208,10 @@ in { # Supported headset roles: hsp_hs (HSP Headset), # hsp_ag (HSP Audio Gateway), # hfp_ag (HFP Audio Gateway) - #bluez5.headset-roles = [ hsp_hs hsp_ag hfp_ag ] + #bluez5.headset-roles = [ "hsp_hs" "hsp_ag" "hfp_ag" ]; # Enabled A2DP codecs (default: all) - #bluez5.codecs = [ sbc aac ldac aptx aptx_hd ] + #bluez5.codecs = [ "sbc" "aac" "ldac" "aptx" "aptx_hd" ]; }; rules = [ @@ -229,7 +229,7 @@ in { actions = { # actions can update properties on the matched object. update-props = { - #device.nick = "My Device" + #device.nick = "My Device"; }; }; } @@ -247,13 +247,13 @@ in { actions = { update-props = { #node.nick = "My Node" - #node.nick = null - #priority.driver = 100 - #priority.session = 100 - #node.pause-on-idle = false - #resample.quality = 4 - #channelmix.normalize = false - #channelmix.mix-lfe = false + #node.nick = null; + #priority.driver = 100; + #priority.session = 100; + #node.pause-on-idle = false; + #resample.quality = 4; + #channelmix.normalize = false; + #channelmix.mix-lfe = false; }; }; } @@ -286,7 +286,7 @@ in { actions = { # actions can update properties on the matched object. update-props = { - #device.nick = "My Device" + #device.nick = "My Device"; }; }; } @@ -303,11 +303,11 @@ in { ]; actions = { update-props = { - #node.nick = "My Node" - #node.nick = null - #priority.driver = 100 - #priority.session = 100 - #node.pause-on-idle = true + #node.nick = "My Node"; + #node.nick = null; + #priority.driver = 100; + #priority.session = 100; + #node.pause-on-idle = true; }; }; } diff --git a/nixos/modules/services/desktops/pipewire/pipewire.nix b/nixos/modules/services/desktops/pipewire/pipewire.nix index 3deaff38bc88..044120de7c71 100644 --- a/nixos/modules/services/desktops/pipewire/pipewire.nix +++ b/nixos/modules/services/desktops/pipewire/pipewire.nix @@ -75,22 +75,22 @@ in { # # "library.name.system" = "support/libspa-support"; # "context.data-loop.library.name.system" = "support/libspa-support"; - "link.max-buffers" = 64; # version < 3 clients can't handle more than 16 - "mem.allow-mlock" = true; - "mem.mlock-all" = true; - # https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/pipewire/pipewire.h#L93 - "log.level" = 3; # 5 is trace, which is verbose as hell, default is 2 which is warnings, 4 is debug output, 3 is info + "link.max-buffers" = 16; # version < 3 clients can't handle more than 16 + #"mem.allow-mlock" = false; + #"mem.mlock-all" = true; + ## https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/src/pipewire/pipewire.h#L93 + #"log.level" = 2; # 5 is trace, which is verbose as hell, default is 2 which is warnings, 4 is debug output, 3 is info ## Properties for the DSP configuration # - "default.clock.rate" = 48000; # 48000 is probably saner, 96000 has gaps in audio - "default.clock.quantum" = 128; # equivalent to buffer size which is correlated to latency - "default.clock.min-quantum" = 32; # No audio through bluetooth if 512 isn't allowed, 16 is the absolute minimum - "default.clock.max-quantum" = 1024; # qemu seems to use 16384 but 8192 is the absolute maximum - # "default.video.width" = 640; - # "default.video.height" = 480; - # "default.video.rate.num" = 25; - # "default.video.rate.denom" = 1; + #"default.clock.rate" = 48000; + #"default.clock.quantum" = 1024; + #"default.clock.min-quantum" = 32; + #"default.clock.max-quantum" = 8192; + #"default.video.width" = 640; + #"default.video.height" = 480; + #"default.video.rate.num" = 25; + #"default.video.rate.denom" = 1; }; spa-libs = { @@ -123,10 +123,10 @@ in { # libpipewire-module-rtkit = { args = { - rt.prio = 20; - rt.time.soft = 200000; - rt.time.hard = 200000; - nice.level = -11; + #rt.prio = 20; + #rt.time.soft = 200000; + #rt.time.hard = 200000; + #nice.level = -11; }; flags = "ifexists|nofail"; }; diff --git a/pkgs/development/libraries/pipewire/default.nix b/pkgs/development/libraries/pipewire/default.nix index 9a89d7e06cdc..fc566d91e913 100644 --- a/pkgs/development/libraries/pipewire/default.nix +++ b/pkgs/development/libraries/pipewire/default.nix @@ -128,7 +128,7 @@ let moveToOutput "bin/pipewire-media-session" "$mediaSession" ''; - passthru = { + passthru.tests = { installedTests = nixosTests.installed-tests.pipewire; # This ensures that all the paths used by the NixOS module are found.