PipeWire: Difference between revisions

imported>SuperSamus
Warn that Wireplumber is used by default
imported>Thiagokokada
No edit summary
Line 44: Line 44:


==Bluetooth Configuration==
==Bluetooth Configuration==
{{outdated|Pipewire now uses Wireplumber by default, instead of media-session}}
PipeWire can be configured to use specific codecs. The mSBC codec provides slightly better sound quality in calls than regular HFP/HSP, while the SBC-XQ provides better sound quality for audio listening. For more information [https://www.guyrutenberg.com/2021/03/11/replacing-pulseaudio-with-pipewire/ see this link].
PipeWire can be configured to use specific codecs. The mSBC codec provides slightly better sound quality in calls than regular HFP/HSP, while the SBC-XQ provides better sound quality for audio listening. For more information [https://www.guyrutenberg.com/2021/03/11/replacing-pulseaudio-with-pipewire/ see this link].
Wireplumber (<code>services.pipewire.wireplumber</code>) is the default modular session / policy manager for PipeWire in unstable, however there is currently no way to configure the advanced settings using the module. However, you can just drop the Lua files directly in the expected path (<code>/etc/wireplumber/bluetooth.lua.d</code>). For example:
<syntaxHighlight lang="nix">
environment.etc = {
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
bluez_monitor.properties = {
["bluez5.enable-sbc-xq"] = true,
["bluez5.enable-msbc"] = true,
["bluez5.enable-hw-volume"] = true,
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
}
'';
};
</syntaxHighlight>
If you want to change in your particular user instead of system-wide, you can add this to <code>~/.config/wireplumber/bluetooth.lua.d</code> instead, manually or using Home-Manager.
If you're on 21.11 or enabled <code>pipewire-media-session</code> manually (by setting <code>services.pipewire.media-session.enable = true</code>), them you can use the module to configure it:


<syntaxHighlight lang="nix">
<syntaxHighlight lang="nix">
Line 70: Line 88:
         { "node.name" = "~bluez_output.*"; }
         { "node.name" = "~bluez_output.*"; }
       ];
       ];
      actions = {
        "node.pause-on-idle" = false;
      };
     }
     }
   ];
   ];