WirePlumber
関連記事
WirePlumber は、PipeWire 用の強力なセッションおよびポリシーマネージャです。モジュール設計に基づき、実際の管理機能を実装する Lua プラグインによって、高度な設定と拡張が可能です。
インストール
Install the wireplumber package. It will conflict with other PipeWire Session Managers and make sure they are uninstalled.
WirePlumber uses systemd/User for management of the server and automatic socket activation.
Optionally, install wireplumber-docs to review the documentation.
設定
WirePlumber's modular design confers lots of flexibility when it comes to swapping the implementation of a specific functionality without having to re-implement the rest of it. Detailed information can be found at the official documentation.
Bellow we add examples of simple configurations.
デバイス/ノードのプロパティを変更する
To change a device or node property, such as it's description or nick, you must create a Lua script and add it into ~/.config/wireplumber
under the proper path and name.
For instance, to change the description of an ALSA node, you would create a file such as ~/.config/wireplumber/main.lua.d/51-alsa-rename.lua
with the following content:
51-alsa-rename.lua
rule = { matches = { { { "node.name", "equals", "alsa_output.pci-0000_00_1f.3.output_analog-stereo" }, }, }, apply_properties = { ["node.description"] = "Laptop", }, } table.insert(alsa_monitor.rules,rule)
If instead you wish to change something on a Bluetooth node or device, you could create ~/.config/wireplumber/bluetooth.lua.d/51-rename.lua
with a content such as:
51-rename.lua
rule = { matches = { { { "node.name", "equals", "bluez_output.02_11_45_A0_B3_27.a2dp-sink" }, }, }, apply_properties = { ["node.nick"] = "Headphones", }, } table.insert(bluez_monitor.rules,rule)
The Lua scripts' filenames and locations are thus devised in a way that allows WirePlumber's Multi-path merging to run them just after the default config files (e.g. /usr/share/wireplumber/main.lua.d/50-alsa-config.lua
) but before the file that loads and enables the devices (e.g. /usr/share/wireplumber/main.lua.d/90-enable-all.lua
).
The properties that you can change as well as the matching rules to select devices or nodes are documented at ALSA configuration and Bluetooth configuration.
参照
- Documentation — Official documentation
- WirePlumber, the PipeWire session manager — Blog post by George Kiagiadakis (Collabora) from May 2020, detailing how WirePlumber works