PipeWire: Difference between revisions
m fix missing letters |
Lua is no longer used. |
||
| Line 29: | Line 29: | ||
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 | Wireplumber (<code>services.pipewire.wireplumber</code>) is the default modular session / policy manager for PipeWire in unstable. To add custom configuration in NixOS 24.05 you can use <code>services.pipewire.wireplumber.extraConfig</code> directly. For example: | ||
< | <syntaxhighlight lang="nix"> | ||
services.pipewire.wireplumber.extraConfig."10-bluez.conf" = { | |||
"monitor.bluez.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> | |||
Alternatively you can set <code>services.pipewire.wireplumber.configPackages</code> as well, adding derivations that output wireplumber config files in <code>$out/share/wireplumber/wireplumber.conf.d/*.conf</code>: | |||
<syntaxhighlight lang="nix"> | |||
services.pipewire.wireplumber.configPackages = [ | services.pipewire.wireplumber.configPackages = [ | ||
(pkgs.writeTextDir "share/wireplumber/ | (pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/10-bluez.conf" '' | ||
monitor.bluez.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> | ||
It is possible change a particular user instead of system-wide, with adding this to <code>~/.config/wireplumber/bluetooth.lua.d</code> instead, manually or using Home-Manager. | It is possible change a particular user instead of system-wide, with adding this to <code>~/.config/wireplumber/bluetooth.lua.d</code> instead, manually or using Home-Manager. | ||