PipeWire: Difference between revisions

Wimpy (talk | contribs)
Correct the PulseAudio backend configuration as per: https://docs.pipewire.org/page_module_protocol_pulse.html
Koalp (talk | contribs)
m fix missing letters
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:


PipeWire is a new low-level multimedia framework. It aims to offer capture and playback for both audio and video with minimal latency and support for PulseAudio-, JACK-, ALSA- and GStreamer-based applications. PipeWire has a great bluetooth support: because Pulseaudio was [https://github.com/NixOS/nixpkgs/issues/123784 reported to have troubles with bluetooth], PipeWire can be a good alternative.  
[https://www.pipewire.org/ PipeWire] is a relatively new (first release in 2017) low-level multimedia framework. It aims to offer capture and playback for both audio and video with minimal latency and support for PulseAudio-, JACK-, ALSA- and GStreamer-based applications. PipeWire has a great bluetooth support: because Pulseaudio was [https://github.com/NixOS/nixpkgs/issues/123784 reported to have troubles with bluetooth], PipeWire can be a good alternative.  


The daemon based on the framework can be configured to be both an audio server (with PulseAudio and JACK features) and a video capture server.
The daemon based on the framework can be configured to be both an audio server (with PulseAudio and JACK features) and a video capture server.
Line 7: Line 7:


==Enabling PipeWire==
==Enabling PipeWire==
Add to your configuration:
PipeWire can be enabled with the following configuration:


<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
Line 24: Line 24:
</syntaxHighlight>
</syntaxHighlight>


Use the <code>services.pipewire.extraConfig</code> option hierarchy in NixOS (available from 24.05 onwards) to create drop-in configuration files, if needed.
It is possible to use the <code>services.pipewire.extraConfig</code> option hierarchy in NixOS (available from 24.05 onwards) to create drop-in configuration files, if needed.


==Bluetooth Configuration==
==Bluetooth Configuration==
Line 44: Line 44:
</syntaxHighlight>
</syntaxHighlight>


Once [https://github.com/NixOS/nixpkgs/pull/292115 #292115] is merged and has reached nixos-unstable, you'll be able to use <code>services.pipewire.wireplumber.extraLuaConfig</code> as well:
Alternatively you can set <code>services.pipewire.wireplumber.extraLuaConfig</code> as well:


<syntaxHighlight lang=nix>
<syntaxHighlight lang=nix>
Line 57: Line 57:
</syntaxHighlight>
</syntaxHighlight>


If you are still using 23.11 or earlier, you can specify these files in <code>environment.etc</code>:
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.
 
<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 still 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:
If you're still 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: