wireplumber/src/config/wireplumber.conf

663 lines
19 KiB
Plaintext

## The WirePlumber configuration
context.properties = {
## Properties to configure the PipeWire context and some modules
# application.name = WirePlumber
log.level = 2
# mem.mlock-all = false
# support.dbus = true
}
context.spa-libs = {
## PipeWire SPA Factories to load.
## Used to find spa factory names. It maps an spa factory name
## regular expression to a library name that should contain
## that factory.
##
## Syntax:
## <factory-name regex> = <library-name>
api.alsa.* = alsa/libspa-alsa
api.bluez5.* = bluez5/libspa-bluez5
api.v4l2.* = v4l2/libspa-v4l2
api.libcamera.* = libcamera/libspa-libcamera
audio.convert.* = audioconvert/libspa-audioconvert
support.* = support/libspa-support
}
context.modules = [
## PipeWire modules to load.
## If ifexists is given, the module is ignored when it is not found.
## If nofail is given, module initialization failures are ignored.
##
## Syntax:
## {
## name = <module-name>
## [ args = { <key> = <value> ... } ]
## [ flags = [ ifexists | nofail ] ]
## }
# Uses RTKit to boost the data thread priority. Also allows clamping
# of utilisation when using the Completely Fair Scheduler on Linux.
{
name = libpipewire-module-rt
args = {
nice.level = -11
# rt.prio = 88
# rt.time.soft = -1
# rt.time.hard = -1
# uclamp.min = 0
# uclamp.max = 1024
}
flags = [ ifexists, nofail ]
}
## The native communication protocol.
{ name = libpipewire-module-protocol-native }
## Support for metadata objects
{ name = libpipewire-module-metadata }
]
wireplumber.profiles = {
## Syntax:
## <profile> = {
## # optional is the default
## <feature name> = [ required | optional | disabled ]
## ...
## }
main = {
check.no-media-session = required
support.settings = required
metadata.sm-objects = required
hardware.audio = required
hardware.bluetooth = required
hardware.video-capture = required
policy.standard = required
#policy.role-priority-system = optional
}
}
wireplumber.components = [
## WirePlumber components to load
## type is mandatory; rest of the tags are optional
##
## Syntax:
## {
## name = <component-name>
## type = <component-type>
## arguments = { <json object> }
##
## # Feature that this component provides
## provides = <feature>
##
## # List of features that must be provided before this component is loaded
## requires = [ <features> ]
##
## # List of features that would offer additional functionality if provided
## # but are not strictly required
## wants = [ <features> ]
## }
## Check to avoid loading together with media-session
{
name = ensure-no-media-session, type = built-in
provides = check.no-media-session
}
## Makes a secondary connection to PipeWire for exporting objects
{
name = export-core, type = built-in
provides = support.export-core
}
## Enables creating local nodes that are exported to pipewire
## This is needed for LocalNode() / WpImplNode
## This should be used with the export-core to avoid protocol deadlocks,
## unless you know what you are doing
{
name = libpipewire-module-client-node, type = pw-module
provides = pw.client-node
wants = [ support.export-core ]
}
## Enables creating local devices that are exported to pipewire
## This is needed for SpaDevice() / WpSpaDevice
## This should be used with the export-core to avoid protocol deadlocks,
## unless you know what you are doing
{
name = libpipewire-module-client-device, type = pw-module
provides = pw.client-device
wants = [ support.export-core ]
}
# Provides a node factory to create SPA nodes
# You need this to use LocalNode("spa-node-factory", ...)
{
name = libpipewire-module-spa-node-factory, type = pw-module
provides = pw.node-factory.spa
requires = [ pw.client-node ]
}
## Provides a node factory to create SPA nodes wrapped in an adapter
## You need this to use LocalNode("adapter", ...)
{
name = libpipewire-module-adapter, type = pw-module
provides = pw.node-factory.adapter
requires = [ pw.client-node ]
}
## Settings provider
{
name = libwireplumber-module-settings, type = module
provides = support.settings
}
## The lua scripting engine
{
name = libwireplumber-module-lua-scripting, type = module
provides = support.lua-scripting
}
## Module listening for pipewire objects to push events
{
name = libwireplumber-module-standard-event-source, type = module
provides = support.standard-event-source
}
## The shared D-Bus connection
{
name = libwireplumber-module-dbus-connection, type = module
provides = support.dbus
}
## Module managing the portal permissions
{
name = libwireplumber-module-portal-permissionstore, type = module
provides = support.portal-permissionstore
requires = [ support.dbus ]
}
## Needed for device reservation to work
{
name = libwireplumber-module-reserve-device, type = module
provides = support.reserve-device
requires = [ support.dbus ]
}
## logind integration to enable certain functionality only on the active seat
{
name = libwireplumber-module-logind, type = module
provides = support.logind
}
## Session item factories
{
name = libwireplumber-module-si-node, type = module
provides = si.node
}
{
name = libwireplumber-module-si-audio-adapter, type = module
provides = si.audio-adapter
}
{
name = libwireplumber-module-si-standard-link, type = module
provides = si.standard-link
}
{
name = libwireplumber-module-si-audio-virtual, type = module
provides = si.audio-virtual
}
## API to access default nodes from scripts
{
name = libwireplumber-module-default-nodes-api, type = module
provides = api.default-nodes
}
## API to access mixer controls
{
name = libwireplumber-module-mixer-api, type = module
provides = api.mixer
}
## API to get notified about file changes
{
name = libwireplumber-module-file-monitor-api, type = module
provides = api.file-monitor
}
## Provide the "default" pw_metadata
{
name = metadata.lua, type = script/lua
arguments = { metadata.name = default }
provides = metadata.default
}
## Provide the "filters" pw_metadata
{
name = metadata.lua, type = script/lua
arguments = { metadata.name = filters }
provides = metadata.filters
}
## Provide the "sm-objects" pw_metadata, supporting dynamic loadable objects
{
name = sm-objects.lua, type = script/lua
provides = metadata.sm-objects
}
## Device monitors' optional features
{
type = virtual, provides = monitor.alsa.reserve-device,
requires = [ support.reserve-device ]
}
{
type = virtual, provides = monitor.alsa-midi.monitoring,
requires = [ api.file-monitor ]
}
{
type = virtual, provides = monitor.bluez.seat-monitoring,
requires = [ support.logind ]
}
## Device monitors
{
name = monitors/alsa.lua, type = script/lua
provides = monitor.alsa
requires = [ support.export-core, pw.client-device ]
wants = [ monitor.alsa.reserve-device ]
}
{
name = monitors/bluez.lua, type = script/lua
provides = monitor.bluez
requires = [ support.export-core,
pw.client-device,
pw.client-node,
pw.node-factory.adapter ]
wants = [ monitor.bluez.seat-monitoring ]
}
{
name = monitors/bluez-midi.lua, type = script/lua
provides = monitor.bluez-midi
requires = [ support.export-core,
pw.client-device,
pw.client-node,
pw.node-factory.spa ]
wants = [ monitor.bluez.seat-monitoring ]
}
{
name = monitors/alsa-midi.lua, type = script/lua
provides = monitor.alsa-midi
wants = [ monitor.alsa-midi.monitoring ]
}
## v4l2 monitor hooks
{
name = monitors/v4l2/name-device.lua, type = script/lua
provides = hooks.monitor.v4l2-name-device
requires = [ support.export-core,
support.standard-event-source ]
}
{
name = monitors/v4l2/create-device.lua, type = script/lua
provides = hooks.monitor.v4l2-create-device
requires = [ support.export-core,
pw.client-device,
support.standard-event-source ]
}
{
name = monitors/v4l2/name-node.lua, type = script/lua
provides = hooks.monitor.v4l2-name-node
requires = [ support.export-core,
support.standard-event-source ]
}
{
name = monitors/v4l2/create-node.lua, type = script/lua
provides = hooks.monitor.v4l2-create-node
requires = [ support.export-core,
support.standard-event-source ]
}
{
type = virtual, provides = monitor.v4l2.hooks
wants = [ hooks.monitor.v4l2-name-device,
hooks.monitor.v4l2-create-device,
hooks.monitor.v4l2-name-node,
hooks.monitor.v4l2-create-node ]
}
# enumerate-device.lua needs rest of the monitor hooks to be loaded first.
{
name = monitors/v4l2/enumerate-device.lua, type = script/lua
provides = hooks.monitor.v4l2-enumerate-device
requires = [ support.export-core,
pw.client-device,
support.standard-event-source,
monitor.v4l2.hooks ]
}
{
type = virtual, provides = monitor.v4l2
wants = [ hooks.monitor.v4l2-enumerate-device,
monitor.v4l2.hooks ]
}
## libcamera monitor hooks
{
name = monitors/libcamera/name-device.lua, type = script/lua
provides = hooks.monitor.libcamera-name-device
requires = [ support.export-core,
support.standard-event-source ]
}
{
name = monitors/libcamera/create-device.lua, type = script/lua
provides = hooks.monitor.libcamera-create-device
requires = [ support.export-core,
pw.client-device,
support.standard-event-source ]
}
{
name = monitors/libcamera/name-node.lua, type = script/lua
provides = hooks.monitor.libcamera-name-node
requires = [ support.export-core,
support.standard-event-source ]
}
{
name = monitors/libcamera/create-node.lua, type = script/lua
provides = hooks.monitor.libcamera-create-node
requires = [ support.export-core,
support.standard-event-source ]
}
{
type = virtual, provides = monitor.libcamera.hooks
wants = [ hooks.monitor.libcamera-name-device,
hooks.monitor.libcamera-create-device,
hooks.monitor.libcamera-name-node,
hooks.monitor.libcamera-create-node ]
}
# enumerate-device.lua needs rest of the monitor hooks to be loaded first.
{
name = monitors/libcamera/enumerate-device.lua, type = script/lua
provides = hooks.monitor.libcamera-enumerate-device
requires = [ support.export-core,
pw.client-device,
support.standard-event-source,
monitor.libcamera.hooks ]
}
{
type = virtual, provides = monitor.libcamera
wants = [ hooks.monitor.libcamera-enumerate-device,
monitor.libcamera.hooks ]
}
## Client access configuration hooks
{
name = client/access-default.lua, type = script/lua
provides = script.client.access-default
}
{
name = client/access-portal.lua, type = script/lua
provides = script.client.access-portal
requires = [ support.portal-permissionstore ]
}
{
type = virtual, provides = policy.client.access
wants = [ script.client.access-default,
script.client.access-portal ]
}
## Device profile selection hooks
{
name = device/select-profile.lua, type = script/lua
provides = hooks.device.profile.select
}
{
name = device/find-best-profile.lua, type = script/lua
provides = hooks.device.profile.find-best
}
{
name = device/state-profile.lua, type = script/lua
provides = hooks.device.profile.state
}
{
name = device/apply-profile.lua, type = script/lua
provides = hooks.device.profile.apply
}
{
name = device/autoswitch-bluetooth-profile.lua, type = script/lua
provides = hooks.device.profile.autoswitch-bluetooth
}
{
type = virtual, provides = policy.device.profile
requires = [ hooks.device.profile.select,
hooks.device.profile.autoswitch-bluetooth,
hooks.device.profile.apply ]
wants = [ hooks.device.profile.find-best,
hooks.device.profile.state ]
}
# Device route selection hooks
{
name = device/select-routes.lua, type = script/lua
provides = hooks.device.routes.select
}
{
name = device/find-best-routes.lua, type = script/lua
provides = hooks.device.routes.find-best
}
{
name = device/state-routes.lua, type = script/lua
provides = hooks.device.routes.state
}
{
name = device/apply-routes.lua, type = script/lua
provides = hooks.device.routes.apply
}
{
type = virtual, provides = policy.device.routes
requires = [ hooks.device.routes.select,
hooks.device.routes.apply ]
wants = [ hooks.device.routes.find-best,
hooks.device.routes.state ]
}
## Default nodes selection hooks
{
name = default-nodes/rescan.lua, type = script/lua
provides = hooks.default-nodes.rescan
}
{
name = default-nodes/find-selected-default-node.lua, type = script/lua
provides = hooks.default-nodes.find-selected
requires = [ metadata.default ]
}
{
name = default-nodes/find-best-default-node.lua, type = script/lua
provides = hooks.default-nodes.find-best
}
{
name = default-nodes/state-default-nodes.lua, type = script/lua
provides = hooks.default-nodes.state
requires = [ metadata.default ]
}
{
name = default-nodes/apply-default-node.lua, type = script/lua,
provides = hooks.default-nodes.apply
requires = [ metadata.default ]
}
{
type = virtual, provides = policy.default-nodes
requires = [ hooks.default-nodes.rescan,
hooks.default-nodes.apply ]
wants = [ hooks.default-nodes.find-selected,
hooks.default-nodes.find-best,
hooks.default-nodes.state ]
}
## Node configuration hooks
{
name = node/create-item.lua, type = script/lua
provides = hooks.node.create-session-item
requires = [ si.audio-adapter, si.node ]
}
{
name = node/suspend-node.lua, type = script/lua
provides = hooks.node.suspend
}
{
name = node/state-stream.lua, type = script/lua
provides = hooks.stream.state
}
{
name = linking/filter-forward-format.lua, type = script/lua
provides = hooks.loopback.forward-format
}
{
name = node/create-virtual-item.lua, type = script/lua
provides = script.create-role-items
requires = [ si.audio-virtual ]
}
## Linking hooks
{
name = linking/rescan.lua, type = script/lua
provides = hooks.linking.rescan
}
{
name = linking/find-defined-target.lua, type = script/lua
provides = hooks.linking.target.find-defined
}
{
name = linking/find-filter-target.lua, type = script/lua
provides = hooks.linking.target.find-filter
requires = [ metadata.filters ]
}
{
name = linking/find-default-target.lua, type = script/lua
provides = hooks.linking.target.find-default
requires = [ api.default-nodes ]
}
{
name = linking/find-best-target.lua, type = script/lua
provides = hooks.linking.target.find-best
}
{
name = linking/get-filter-from-target.lua, type = script/lua
provides = hooks.linking.target.get-filter-from
requires = [ metadata.filters ]
}
{
name = linking/prepare-link.lua, type = script/lua
provides = hooks.linking.target.prepare-link
requires = [ api.default-nodes ]
}
{
name = linking/link-target.lua, type = script/lua
provides = hooks.linking.target.link
requires = [ si.standard-link ]
}
{
type = virtual, provides = policy.linking.standard
requires = [ hooks.linking.rescan,
hooks.linking.target.prepare-link,
hooks.linking.target.link ]
wants = [ hooks.linking.target.find-defined,
hooks.linking.target.find-filter,
hooks.linking.target.find-default,
hooks.linking.target.find-best,
hooks.linking.target.get-filter-from ]
}
## Linking: Role-based priority system
{
name = linking/rescan-virtual-links.lua, type = script/lua
provides = hooks.linking.role-priority-system.links.rescan
requires = [ api.mixer ]
}
{
name = linking/find-virtual-target.lua, type = script/lua
provides = hooks.linking.role-priority-system.target.find
}
{
type = virtual, provides = policy.linking.role-priority-system
requires = [ policy.linking.standard,
hooks.linking.role-priority-system.links.rescan,
hooks.linking.role-priority-system.target.find ]
}
{
type = virtual, provides = policy.standard
requires = [ policy.client.access
policy.device.profile
policy.device.routes
policy.default-nodes
policy.linking.standard
hooks.node.create-session-item
support.standard-event-source ]
wants = [ hooks.node.suspend
hooks.stream.state
hooks.loopback.forward-format ]
}
{
type = virtual, provides = policy.role-priority-system
requires = [ policy.standard,
script.create-role-items,
policy.linking.role-priority-system ]
}
## Load targets
{
type = virtual, provides = hardware.audio
wants = [ monitor.alsa, monitor.alsa-midi ]
}
{
type = virtual, provides = hardware.bluetooth
wants = [ monitor.bluez, monitor.bluez-midi ]
}
{
type = virtual, provides = hardware.video-capture
wants = [ monitor.v4l2, monitor.libcamera ]
}
]
wireplumber.components.rules = [
## Rules to apply on top of wireplumber.components
## Syntax:
## {
## matches = [
## {
## [ <key> = <value> ... ]
## }
## ...
## ]
## actions = {
## <override|merge> = {
## [ <key> = <value> ... ]
## }
## ...
## }
## }
{
matches = [
{
type = "script/lua"
}
]
actions = {
merge = {
requires = [ support.lua-scripting ]
}
}
}
]
wireplumber.settings = {
## This main config file is only supposed to contain the common settings and
## rules. rest of the settings and rules are distributed across
## wireplumber.conf.d/*.conf files.
## If this is true, the settings will be read from conf file only once and for
## subsequent reboots they will be read from the state files, till the time
## the setting is set to false.
# persistent.settings = false
}