| 1 |
## The WirePlumber configuration |
| 2 |
|
| 3 |
context.spa-libs = { |
| 4 |
## SPA factory name to library mappings |
| 5 |
## Used to find SPA factory names. It maps a SPA factory name regular |
| 6 |
## expression to a library name that should contain that factory. |
| 7 |
## |
| 8 |
## Syntax: |
| 9 |
## <factory-name regex> = <library-name> |
| 10 |
|
| 11 |
api.alsa.* = alsa/libspa-alsa |
| 12 |
api.bluez5.* = bluez5/libspa-bluez5 |
| 13 |
api.v4l2.* = v4l2/libspa-v4l2 |
| 14 |
api.libcamera.* = libcamera/libspa-libcamera |
| 15 |
audio.convert.* = audioconvert/libspa-audioconvert |
| 16 |
support.* = support/libspa-support |
| 17 |
} |
| 18 |
|
| 19 |
context.modules = [ |
| 20 |
## PipeWire modules to load. |
| 21 |
## These modules are loaded before a connection to pipewire is attempted. |
| 22 |
## This section should be kept minimal and load only the modules that are |
| 23 |
## necessary for the protocol to work. |
| 24 |
## |
| 25 |
## If ifexists is given, the module is ignored when it is not found. |
| 26 |
## If nofail is given, module initialization failures are ignored. |
| 27 |
## |
| 28 |
## Syntax: |
| 29 |
## { |
| 30 |
## name = <module-name> |
| 31 |
## [ args = { <key> = <value> ... } ] |
| 32 |
## [ flags = [ ifexists | nofail ] ] |
| 33 |
## } |
| 34 |
|
| 35 |
# Uses RTKit to boost the data thread priority. Also allows clamping |
| 36 |
# of utilisation when using the Completely Fair Scheduler on Linux. |
| 37 |
{ |
| 38 |
name = libpipewire-module-rt |
| 39 |
args = { |
| 40 |
nice.level = -11 |
| 41 |
# rt.prio = 88 |
| 42 |
# rt.time.soft = -1 |
| 43 |
# rt.time.hard = -1 |
| 44 |
# uclamp.min = 0 |
| 45 |
# uclamp.max = 1024 |
| 46 |
} |
| 47 |
flags = [ ifexists, nofail ] |
| 48 |
} |
| 49 |
|
| 50 |
## The native communication protocol. |
| 51 |
{ name = libpipewire-module-protocol-native } |
| 52 |
|
| 53 |
## Support for metadata objects |
| 54 |
{ name = libpipewire-module-metadata } |
| 55 |
] |
| 56 |
|
| 57 |
wireplumber.profiles = { |
| 58 |
## Syntax: |
| 59 |
## <profile> = { |
| 60 |
## inherits = [ other, profile, names ] # optional |
| 61 |
## # optional is the default |
| 62 |
## <feature name> = [ required | optional | disabled ] |
| 63 |
## ... |
| 64 |
## } |
| 65 |
|
| 66 |
# The default profile |
| 67 |
main = { |
| 68 |
inherits = [ base ] |
| 69 |
|
| 70 |
metadata.sm-settings = required |
| 71 |
metadata.sm-objects = required |
| 72 |
|
| 73 |
policy.standard = required |
| 74 |
|
| 75 |
hardware.audio = required |
| 76 |
hardware.bluetooth = required |
| 77 |
hardware.video-capture = required |
| 78 |
} |
| 79 |
|
| 80 |
# Profile for running on a systemwide level |
| 81 |
main-systemwide = { |
| 82 |
inherits = [ main, mixin.systemwide-session ] |
| 83 |
} |
| 84 |
|
| 85 |
# Typical profile for embedded use cases, systemwide without maintaining state |
| 86 |
main-embedded = { |
| 87 |
inherits = [ main, mixin.systemwide-session, mixin.stateless ] |
| 88 |
} |
| 89 |
|
| 90 |
# Profile for video-only use cases (camera & screen sharing) |
| 91 |
video-only = { |
| 92 |
inherits = [ main ] |
| 93 |
hardware.audio = disabled |
| 94 |
hardware.bluetooth = disabled |
| 95 |
} |
| 96 |
|
| 97 |
## |
| 98 |
## Profiles for multi-instance setup |
| 99 |
## |
| 100 |
|
| 101 |
policy = { |
| 102 |
inherits = [ base ] |
| 103 |
metadata.sm-settings = required |
| 104 |
metadata.sm-objects = required |
| 105 |
policy.standard = required |
| 106 |
} |
| 107 |
|
| 108 |
audio = { |
| 109 |
inherits = [ base ] |
| 110 |
hardware.audio = required |
| 111 |
} |
| 112 |
|
| 113 |
bluetooth = { |
| 114 |
inherits = [ base ] |
| 115 |
hardware.bluetooth = required |
| 116 |
} |
| 117 |
|
| 118 |
video-capture = { |
| 119 |
inherits = [ base ] |
| 120 |
hardware.video-capture = required |
| 121 |
} |
| 122 |
|
| 123 |
## |
| 124 |
## The following are not complete profiles, but blocks that can be inherited |
| 125 |
## |
| 126 |
|
| 127 |
# The bare minimum that all instances should have by default |
| 128 |
base = { |
| 129 |
check.no-media-session = required |
| 130 |
support.settings = required |
| 131 |
support.log-settings = required |
| 132 |
support.session-services = required |
| 133 |
} |
| 134 |
|
| 135 |
# Disable features that are meant only for user sessions |
| 136 |
mixin.systemwide-session = { |
| 137 |
support.reserve-device = disabled |
| 138 |
monitor.alsa.reserve-device = disabled |
| 139 |
|
| 140 |
support.portal-permissionstore = disabled |
| 141 |
script.client.access-portal = disabled |
| 142 |
|
| 143 |
support.logind = disabled |
| 144 |
monitor.bluez.seat-monitoring = disabled |
| 145 |
} |
| 146 |
|
| 147 |
# Disable storing/restoring runtime state information regarding |
| 148 |
# default nodes selection, profiles, routes and stream volume / properties |
| 149 |
# This makes sense for embedded systems that should always reboot to a default |
| 150 |
# state, not remembering any of the user's runtime changes |
| 151 |
mixin.stateless = { |
| 152 |
hooks.device.profile.state = disabled |
| 153 |
hooks.device.routes.state = disabled |
| 154 |
hooks.default-nodes.state = disabled |
| 155 |
hooks.stream.state = disabled |
| 156 |
} |
| 157 |
} |
| 158 |
|
| 159 |
wireplumber.components = [ |
| 160 |
## WirePlumber components to load. |
| 161 |
## These components are loaded after a connection to pipewire is established. |
| 162 |
## type is mandatory; rest of the tags are optional |
| 163 |
## |
| 164 |
## Syntax: |
| 165 |
## { |
| 166 |
## name = <component-name> |
| 167 |
## type = <component-type> |
| 168 |
## arguments = { <json object> } |
| 169 |
## |
| 170 |
## # Feature that this component provides |
| 171 |
## provides = <feature> |
| 172 |
## |
| 173 |
## # List of features that must be provided before this component is loaded |
| 174 |
## requires = [ <features> ] |
| 175 |
## |
| 176 |
## # List of features that would offer additional functionality if provided |
| 177 |
## # but are not strictly required |
| 178 |
## wants = [ <features> ] |
| 179 |
## } |
| 180 |
|
| 181 |
## Check to avoid loading together with media-session |
| 182 |
{ |
| 183 |
name = ensure-no-media-session, type = built-in |
| 184 |
provides = check.no-media-session |
| 185 |
} |
| 186 |
|
| 187 |
## Makes a secondary connection to PipeWire for exporting objects |
| 188 |
{ |
| 189 |
name = export-core, type = built-in |
| 190 |
provides = support.export-core |
| 191 |
} |
| 192 |
|
| 193 |
## Enables creating local nodes that are exported to pipewire |
| 194 |
## This is needed for LocalNode() / WpImplNode |
| 195 |
## This should be used with the export-core to avoid protocol deadlocks, |
| 196 |
## unless you know what you are doing |
| 197 |
{ |
| 198 |
name = libpipewire-module-client-node, type = pw-module |
| 199 |
provides = pw.client-node |
| 200 |
wants = [ support.export-core ] |
| 201 |
} |
| 202 |
|
| 203 |
## Enables creating local devices that are exported to pipewire |
| 204 |
## This is needed for SpaDevice() / WpSpaDevice |
| 205 |
## This should be used with the export-core to avoid protocol deadlocks, |
| 206 |
## unless you know what you are doing |
| 207 |
{ |
| 208 |
name = libpipewire-module-client-device, type = pw-module |
| 209 |
provides = pw.client-device |
| 210 |
wants = [ support.export-core ] |
| 211 |
} |
| 212 |
|
| 213 |
# Provides a node factory to create SPA nodes |
| 214 |
# You need this to use LocalNode("spa-node-factory", ...) |
| 215 |
{ |
| 216 |
name = libpipewire-module-spa-node-factory, type = pw-module |
| 217 |
provides = pw.node-factory.spa |
| 218 |
requires = [ pw.client-node ] |
| 219 |
} |
| 220 |
|
| 221 |
## Provides a node factory to create SPA nodes wrapped in an adapter |
| 222 |
## You need this to use LocalNode("adapter", ...) |
| 223 |
{ |
| 224 |
name = libpipewire-module-adapter, type = pw-module |
| 225 |
provides = pw.node-factory.adapter |
| 226 |
requires = [ pw.client-node ] |
| 227 |
} |
| 228 |
|
| 229 |
## Provides the "sm-settings" metadata object |
| 230 |
{ |
| 231 |
name = libwireplumber-module-settings, type = module |
| 232 |
arguments = { metadata.name = sm-settings } |
| 233 |
provides = metadata.sm-settings |
| 234 |
} |
| 235 |
|
| 236 |
## Activates a global WpSettings instance, providing settings from |
| 237 |
## the sm-settings metadata object. Note that this blocks and waits for the |
| 238 |
## sm-settings metadata object to become available, so one instance must |
| 239 |
## provide that, while others should only load this to access settings |
| 240 |
{ |
| 241 |
name = settings-instance, type = built-in |
| 242 |
arguments = { metadata.name = sm-settings } |
| 243 |
provides = support.settings |
| 244 |
after = [ metadata.sm-settings ] |
| 245 |
} |
| 246 |
|
| 247 |
## Log level settings |
| 248 |
{ |
| 249 |
name = libwireplumber-module-log-settings, type = module |
| 250 |
provides = support.log-settings |
| 251 |
} |
| 252 |
|
| 253 |
## The lua scripting engine |
| 254 |
{ |
| 255 |
name = libwireplumber-module-lua-scripting, type = module |
| 256 |
provides = support.lua-scripting |
| 257 |
} |
| 258 |
|
| 259 |
## Module listening for pipewire objects to push events |
| 260 |
{ |
| 261 |
name = libwireplumber-module-standard-event-source, type = module |
| 262 |
provides = support.standard-event-source |
| 263 |
} |
| 264 |
|
| 265 |
## The shared D-Bus connection |
| 266 |
{ |
| 267 |
name = libwireplumber-module-dbus-connection, type = module |
| 268 |
arguments = { plugin.name = dbus-connection, bus.system = false } |
| 269 |
provides = support.dbus |
| 270 |
} |
| 271 |
|
| 272 |
## The shared system D-Bus connection |
| 273 |
{ |
| 274 |
name = libwireplumber-module-dbus-connection, type = module |
| 275 |
arguments = { plugin.name = system-dbus-connection, bus.system = true } |
| 276 |
provides = support.system-dbus |
| 277 |
} |
| 278 |
|
| 279 |
## Module managing the portal permissions |
| 280 |
{ |
| 281 |
name = libwireplumber-module-portal-permissionstore, type = module |
| 282 |
provides = support.portal-permissionstore |
| 283 |
requires = [ support.dbus ] |
| 284 |
} |
| 285 |
|
| 286 |
## Needed for device reservation to work |
| 287 |
{ |
| 288 |
name = libwireplumber-module-reserve-device, type = module |
| 289 |
provides = support.reserve-device |
| 290 |
requires = [ support.dbus ] |
| 291 |
} |
| 292 |
|
| 293 |
## logind integration to enable certain functionality only on the active seat |
| 294 |
{ |
| 295 |
name = libwireplumber-module-logind, type = module |
| 296 |
provides = support.logind |
| 297 |
} |
| 298 |
|
| 299 |
## ModemManager integration to control call audio during a call |
| 300 |
{ |
| 301 |
name = libwireplumber-module-modem-manager, type = module |
| 302 |
provides = support.modem-manager |
| 303 |
requires = [ support.system-dbus ] |
| 304 |
} |
| 305 |
|
| 306 |
## Session item factories |
| 307 |
{ |
| 308 |
name = libwireplumber-module-si-node, type = module |
| 309 |
provides = si.node |
| 310 |
} |
| 311 |
{ |
| 312 |
name = libwireplumber-module-si-audio-adapter, type = module |
| 313 |
provides = si.audio-adapter |
| 314 |
} |
| 315 |
{ |
| 316 |
name = libwireplumber-module-si-standard-link, type = module |
| 317 |
provides = si.standard-link |
| 318 |
} |
| 319 |
|
| 320 |
## API to access default nodes from scripts |
| 321 |
{ |
| 322 |
name = libwireplumber-module-default-nodes-api, type = module |
| 323 |
provides = api.default-nodes |
| 324 |
} |
| 325 |
|
| 326 |
## API to access mixer controls |
| 327 |
{ |
| 328 |
name = libwireplumber-module-mixer-api, type = module |
| 329 |
provides = api.mixer |
| 330 |
} |
| 331 |
|
| 332 |
## API to get notified about file changes |
| 333 |
{ |
| 334 |
name = libwireplumber-module-file-monitor-api, type = module |
| 335 |
provides = api.file-monitor |
| 336 |
} |
| 337 |
|
| 338 |
## API to send D-Bus notifications |
| 339 |
{ |
| 340 |
name = libwireplumber-module-notifications-api, type = module |
| 341 |
provides = api.notifications |
| 342 |
requires = [ support.dbus ] |
| 343 |
} |
| 344 |
|
| 345 |
|
| 346 |
## Provide the "default" pw_metadata |
| 347 |
{ |
| 348 |
name = metadata.lua, type = script/lua |
| 349 |
arguments = { metadata.name = default } |
| 350 |
provides = metadata.default |
| 351 |
} |
| 352 |
|
| 353 |
## Provide the "filters" pw_metadata |
| 354 |
{ |
| 355 |
name = metadata.lua, type = script/lua |
| 356 |
arguments = { metadata.name = filters } |
| 357 |
provides = metadata.filters |
| 358 |
} |
| 359 |
|
| 360 |
## Provide the "sm-objects" pw_metadata, supporting dynamic loadable objects |
| 361 |
{ |
| 362 |
name = sm-objects.lua, type = script/lua |
| 363 |
provides = metadata.sm-objects |
| 364 |
} |
| 365 |
|
| 366 |
## Populates the "session.services" property on the WirePlumber client object |
| 367 |
{ |
| 368 |
name = session-services.lua, type = script/lua |
| 369 |
provides = support.session-services |
| 370 |
} |
| 371 |
|
| 372 |
## Provides support for MPRIS |
| 373 |
{ |
| 374 |
name = libwireplumber-module-mpris, type = module |
| 375 |
provides = support.mpris |
| 376 |
requires = [ support.dbus ] |
| 377 |
} |
| 378 |
|
| 379 |
## Device monitors' optional features |
| 380 |
{ |
| 381 |
type = virtual, provides = monitor.alsa.reserve-device, |
| 382 |
requires = [ support.reserve-device ] |
| 383 |
} |
| 384 |
{ |
| 385 |
type = virtual, provides = monitor.alsa-midi.monitoring, |
| 386 |
requires = [ api.file-monitor ] |
| 387 |
} |
| 388 |
{ |
| 389 |
type = virtual, provides = monitor.bluez.seat-monitoring, |
| 390 |
requires = [ support.logind ] |
| 391 |
} |
| 392 |
|
| 393 |
## Device monitors |
| 394 |
{ |
| 395 |
name = monitors/alsa.lua, type = script/lua |
| 396 |
provides = monitor.alsa |
| 397 |
requires = [ support.export-core, pw.client-device ] |
| 398 |
wants = [ monitor.alsa.reserve-device ] |
| 399 |
} |
| 400 |
{ |
| 401 |
name = monitors/bluez.lua, type = script/lua |
| 402 |
provides = monitor.bluez |
| 403 |
requires = [ support.export-core, |
| 404 |
pw.client-device, |
| 405 |
pw.client-node, |
| 406 |
pw.node-factory.adapter ] |
| 407 |
wants = [ monitor.bluez.seat-monitoring ] |
| 408 |
} |
| 409 |
{ |
| 410 |
name = monitors/bluez-midi.lua, type = script/lua |
| 411 |
provides = monitor.bluez-midi |
| 412 |
requires = [ support.export-core, |
| 413 |
pw.client-device, |
| 414 |
pw.client-node, |
| 415 |
pw.node-factory.spa ] |
| 416 |
wants = [ monitor.bluez.seat-monitoring ] |
| 417 |
} |
| 418 |
{ |
| 419 |
name = monitors/alsa-midi.lua, type = script/lua |
| 420 |
provides = monitor.alsa-midi |
| 421 |
wants = [ monitor.alsa-midi.monitoring ] |
| 422 |
} |
| 423 |
## v4l2 monitor |
| 424 |
{ |
| 425 |
name = monitors/v4l2/name-device.lua, type = script/lua |
| 426 |
provides = hooks.monitor.v4l2-name-device |
| 427 |
} |
| 428 |
{ |
| 429 |
name = monitors/v4l2/create-device.lua, type = script/lua |
| 430 |
provides = hooks.monitor.v4l2-create-device |
| 431 |
requires = [ support.export-core, |
| 432 |
pw.client-device, |
| 433 |
support.standard-event-source ] |
| 434 |
} |
| 435 |
{ |
| 436 |
name = monitors/v4l2/name-node.lua, type = script/lua |
| 437 |
provides = hooks.monitor.v4l2-name-node |
| 438 |
} |
| 439 |
{ |
| 440 |
name = monitors/v4l2/create-node.lua, type = script/lua |
| 441 |
provides = hooks.monitor.v4l2-create-node |
| 442 |
} |
| 443 |
{ |
| 444 |
name = monitors/v4l2/enumerate-device.lua, type = script/lua |
| 445 |
provides = monitor.v4l2 |
| 446 |
requires = [ support.export-core, |
| 447 |
pw.client-device, |
| 448 |
support.standard-event-source, |
| 449 |
hooks.monitor.v4l2-create-device, |
| 450 |
hooks.monitor.v4l2-create-node ] |
| 451 |
wants = [ hooks.monitor.v4l2-name-device, |
| 452 |
hooks.monitor.v4l2-name-node ] |
| 453 |
} |
| 454 |
## libcamera monitor |
| 455 |
{ |
| 456 |
name = monitors/libcamera/name-device.lua, type = script/lua |
| 457 |
provides = hooks.monitor.libcamera-name-device |
| 458 |
} |
| 459 |
{ |
| 460 |
name = monitors/libcamera/create-device.lua, type = script/lua |
| 461 |
provides = hooks.monitor.libcamera-create-device |
| 462 |
requires = [ support.export-core, |
| 463 |
pw.client-device, |
| 464 |
support.standard-event-source ] |
| 465 |
} |
| 466 |
{ |
| 467 |
name = monitors/libcamera/name-node.lua, type = script/lua |
| 468 |
provides = hooks.monitor.libcamera-name-node |
| 469 |
} |
| 470 |
{ |
| 471 |
name = monitors/libcamera/create-node.lua, type = script/lua |
| 472 |
provides = hooks.monitor.libcamera-create-node |
| 473 |
requires = [ support.export-core, |
| 474 |
pw.client-node, |
| 475 |
pw.node-factory.spa ] |
| 476 |
} |
| 477 |
{ |
| 478 |
name = monitors/libcamera/enumerate-device.lua, type = script/lua |
| 479 |
provides = monitor.libcamera |
| 480 |
requires = [ support.export-core, |
| 481 |
pw.client-device, |
| 482 |
support.standard-event-source, |
| 483 |
hooks.monitor.libcamera-create-device, |
| 484 |
hooks.monitor.libcamera-create-node ] |
| 485 |
wants = [ hooks.monitor.libcamera-name-device, |
| 486 |
hooks.monitor.libcamera-name-node ] |
| 487 |
} |
| 488 |
|
| 489 |
## Client access configuration hooks |
| 490 |
{ |
| 491 |
name = client/access-default.lua, type = script/lua |
| 492 |
provides = script.client.access-default |
| 493 |
} |
| 494 |
{ |
| 495 |
name = client/access-portal.lua, type = script/lua |
| 496 |
provides = script.client.access-portal |
| 497 |
requires = [ support.portal-permissionstore ] |
| 498 |
} |
| 499 |
{ |
| 500 |
name = client/access-snap.lua, type = script/lua |
| 501 |
provides = script.client.access-snap |
| 502 |
} |
| 503 |
{ |
| 504 |
type = virtual, provides = policy.client.access |
| 505 |
wants = [ script.client.access-default, |
| 506 |
script.client.access-portal, |
| 507 |
script.client.access-snap ] |
| 508 |
} |
| 509 |
|
| 510 |
## Device profile selection hooks |
| 511 |
{ |
| 512 |
name = device/select-profile.lua, type = script/lua |
| 513 |
provides = hooks.device.profile.select |
| 514 |
} |
| 515 |
{ |
| 516 |
name = device/find-voice-call-profile.lua, type = script/lua |
| 517 |
provides = hooks.device.profile.find-voice-call |
| 518 |
requires = [ support.modem-manager ] |
| 519 |
} |
| 520 |
{ |
| 521 |
name = device/find-preferred-profile.lua, type = script/lua |
| 522 |
provides = hooks.device.profile.find-preferred |
| 523 |
} |
| 524 |
{ |
| 525 |
name = device/find-best-profile.lua, type = script/lua |
| 526 |
provides = hooks.device.profile.find-best |
| 527 |
} |
| 528 |
{ |
| 529 |
name = device/state-profile.lua, type = script/lua |
| 530 |
provides = hooks.device.profile.state |
| 531 |
} |
| 532 |
{ |
| 533 |
name = device/apply-profile.lua, type = script/lua |
| 534 |
provides = hooks.device.profile.apply |
| 535 |
} |
| 536 |
{ |
| 537 |
name = device/autoswitch-bluetooth-profile.lua, type = script/lua |
| 538 |
provides = hooks.device.profile.autoswitch-bluetooth |
| 539 |
} |
| 540 |
{ |
| 541 |
type = virtual, provides = policy.device.profile |
| 542 |
requires = [ hooks.device.profile.select, |
| 543 |
hooks.device.profile.autoswitch-bluetooth, |
| 544 |
hooks.device.profile.apply ] |
| 545 |
wants = [ hooks.device.profile.find-voice-call, |
| 546 |
hooks.device.profile.find-best, |
| 547 |
hooks.device.profile.find-preferred, |
| 548 |
hooks.device.profile.state ] |
| 549 |
} |
| 550 |
|
| 551 |
# Device route selection hooks |
| 552 |
{ |
| 553 |
name = device/select-routes.lua, type = script/lua |
| 554 |
provides = hooks.device.routes.select |
| 555 |
} |
| 556 |
{ |
| 557 |
name = device/find-best-routes.lua, type = script/lua |
| 558 |
provides = hooks.device.routes.find-best |
| 559 |
} |
| 560 |
{ |
| 561 |
name = device/state-routes.lua, type = script/lua |
| 562 |
provides = hooks.device.routes.state |
| 563 |
} |
| 564 |
{ |
| 565 |
name = device/apply-routes.lua, type = script/lua |
| 566 |
provides = hooks.device.routes.apply |
| 567 |
} |
| 568 |
{ |
| 569 |
name = device/automute-alsa-routes.lua, type = script/lua |
| 570 |
provides = hooks.device.routes.automute-alsa |
| 571 |
wants = [ api.notifications ] |
| 572 |
} |
| 573 |
{ |
| 574 |
type = virtual, provides = policy.device.routes |
| 575 |
requires = [ hooks.device.routes.select, |
| 576 |
hooks.device.routes.apply ] |
| 577 |
wants = [ hooks.device.routes.find-best, |
| 578 |
hooks.device.routes.state, |
| 579 |
hooks.device.routes.automute-alsa ] |
| 580 |
} |
| 581 |
|
| 582 |
## Default nodes selection hooks |
| 583 |
{ |
| 584 |
name = default-nodes/rescan.lua, type = script/lua |
| 585 |
provides = hooks.default-nodes.rescan |
| 586 |
} |
| 587 |
{ |
| 588 |
name = default-nodes/find-selected-default-node.lua, type = script/lua |
| 589 |
provides = hooks.default-nodes.find-selected |
| 590 |
requires = [ metadata.default ] |
| 591 |
} |
| 592 |
{ |
| 593 |
name = default-nodes/find-best-default-node.lua, type = script/lua |
| 594 |
provides = hooks.default-nodes.find-best |
| 595 |
} |
| 596 |
{ |
| 597 |
name = default-nodes/state-default-nodes.lua, type = script/lua |
| 598 |
provides = hooks.default-nodes.state |
| 599 |
requires = [ metadata.default ] |
| 600 |
} |
| 601 |
{ |
| 602 |
name = default-nodes/apply-default-node.lua, type = script/lua, |
| 603 |
provides = hooks.default-nodes.apply |
| 604 |
requires = [ metadata.default ] |
| 605 |
} |
| 606 |
{ |
| 607 |
type = virtual, provides = policy.default-nodes |
| 608 |
requires = [ hooks.default-nodes.rescan, |
| 609 |
hooks.default-nodes.apply ] |
| 610 |
wants = [ hooks.default-nodes.find-selected, |
| 611 |
hooks.default-nodes.find-best, |
| 612 |
hooks.default-nodes.state ] |
| 613 |
} |
| 614 |
|
| 615 |
## Node configuration hooks |
| 616 |
{ |
| 617 |
name = node/create-item.lua, type = script/lua |
| 618 |
provides = hooks.node.create-session-item |
| 619 |
requires = [ si.audio-adapter, si.node ] |
| 620 |
} |
| 621 |
{ |
| 622 |
name = node/suspend-node.lua, type = script/lua |
| 623 |
provides = hooks.node.suspend |
| 624 |
} |
| 625 |
{ |
| 626 |
name = node/state-stream.lua, type = script/lua |
| 627 |
provides = hooks.stream.state |
| 628 |
} |
| 629 |
{ |
| 630 |
name = node/filter-forward-format.lua, type = script/lua |
| 631 |
provides = hooks.filter.forward-format |
| 632 |
} |
| 633 |
{ |
| 634 |
name = node/filter-graph.lua, type = script/lua |
| 635 |
provides = hooks.filter.graph |
| 636 |
} |
| 637 |
{ |
| 638 |
type = virtual, provides = policy.node |
| 639 |
requires = [ hooks.node.create-session-item ] |
| 640 |
wants = [ hooks.node.suspend |
| 641 |
hooks.stream.state |
| 642 |
hooks.filter.forward-format |
| 643 |
hooks.filter.graph ] |
| 644 |
} |
| 645 |
{ |
| 646 |
name = node/software-dsp.lua, type = script/lua |
| 647 |
provides = node.software-dsp |
| 648 |
} |
| 649 |
{ |
| 650 |
name = node/audio-group.lua, type = script/lua |
| 651 |
provides = node.audio-group |
| 652 |
} |
| 653 |
|
| 654 |
## Linking hooks |
| 655 |
{ |
| 656 |
name = linking/rescan.lua, type = script/lua |
| 657 |
provides = hooks.linking.rescan |
| 658 |
} |
| 659 |
{ |
| 660 |
name = linking/rescan-on-linkable.lua, type = script/lua |
| 661 |
provides = hooks.linking.rescan-on-linkable |
| 662 |
requires = [ hooks.linking.rescan ] |
| 663 |
} |
| 664 |
{ |
| 665 |
name = linking/find-media-role-target.lua, type = script/lua |
| 666 |
provides = hooks.linking.target.find-media-role |
| 667 |
} |
| 668 |
{ |
| 669 |
name = linking/find-defined-target.lua, type = script/lua |
| 670 |
provides = hooks.linking.target.find-defined |
| 671 |
} |
| 672 |
{ |
| 673 |
name = linking/find-audio-group-target.lua, type = script/lua |
| 674 |
provides = hooks.linking.target.find-audio-group |
| 675 |
requires = [ node.audio-group ] |
| 676 |
} |
| 677 |
{ |
| 678 |
name = linking/find-filter-target.lua, type = script/lua |
| 679 |
provides = hooks.linking.target.find-filter |
| 680 |
requires = [ metadata.filters ] |
| 681 |
} |
| 682 |
{ |
| 683 |
name = linking/find-default-target.lua, type = script/lua |
| 684 |
provides = hooks.linking.target.find-default |
| 685 |
requires = [ api.default-nodes ] |
| 686 |
} |
| 687 |
{ |
| 688 |
name = linking/find-best-target.lua, type = script/lua |
| 689 |
provides = hooks.linking.target.find-best |
| 690 |
requires = [ metadata.filters ] |
| 691 |
} |
| 692 |
{ |
| 693 |
name = linking/get-filter-from-target.lua, type = script/lua |
| 694 |
provides = hooks.linking.target.get-filter-from |
| 695 |
requires = [ metadata.filters ] |
| 696 |
} |
| 697 |
{ |
| 698 |
name = linking/prepare-link.lua, type = script/lua |
| 699 |
provides = hooks.linking.target.prepare-link |
| 700 |
requires = [ api.default-nodes ] |
| 701 |
} |
| 702 |
{ |
| 703 |
name = linking/link-target.lua, type = script/lua |
| 704 |
provides = hooks.linking.target.link |
| 705 |
requires = [ si.standard-link ] |
| 706 |
} |
| 707 |
{ |
| 708 |
name = linking/mpris-pause.lua, type = script/lua |
| 709 |
provides = hooks.linking.pause-playback |
| 710 |
requires = [ support.mpris ] |
| 711 |
} |
| 712 |
{ |
| 713 |
type = virtual, provides = policy.linking.standard |
| 714 |
requires = [ hooks.linking.rescan, |
| 715 |
hooks.linking.target.prepare-link, |
| 716 |
hooks.linking.target.link ] |
| 717 |
wants = [ hooks.linking.rescan-on-linkable, |
| 718 |
hooks.linking.target.find-media-role, |
| 719 |
hooks.linking.target.find-defined, |
| 720 |
hooks.linking.target.find-audio-group, |
| 721 |
hooks.linking.target.find-filter, |
| 722 |
hooks.linking.target.find-default, |
| 723 |
hooks.linking.target.find-best, |
| 724 |
hooks.linking.target.get-filter-from, |
| 725 |
hooks.linking.pause-playback ] |
| 726 |
} |
| 727 |
|
| 728 |
## Linking: Role-based priority system |
| 729 |
{ |
| 730 |
name = linking/rescan-media-role-links.lua, type = script/lua |
| 731 |
provides = hooks.linking.role-based.rescan |
| 732 |
requires = [ api.mixer ] |
| 733 |
} |
| 734 |
{ |
| 735 |
name = node/find-media-role-default-volume.lua, type = script/lua |
| 736 |
provides = hooks.node.role-based.default-volume |
| 737 |
requires = [ hooks.linking.role-based.rescan ] |
| 738 |
} |
| 739 |
{ |
| 740 |
name = linking/find-media-role-sink-target.lua, type = script/lua |
| 741 |
provides = hooks.linking.target.find-media-role-sink |
| 742 |
} |
| 743 |
{ |
| 744 |
type = virtual, provides = policy.linking.role-based |
| 745 |
requires = [ policy.linking.standard, |
| 746 |
hooks.linking.role-based.rescan, |
| 747 |
hooks.node.role-based.default-volume, |
| 748 |
hooks.linking.target.find-media-role-sink ] |
| 749 |
} |
| 750 |
|
| 751 |
## Standard policy definition |
| 752 |
{ |
| 753 |
type = virtual, provides = policy.standard |
| 754 |
requires = [ policy.client.access |
| 755 |
policy.device.profile |
| 756 |
policy.device.routes |
| 757 |
policy.default-nodes |
| 758 |
policy.linking.standard |
| 759 |
policy.linking.role-based |
| 760 |
policy.node |
| 761 |
support.standard-event-source ] |
| 762 |
} |
| 763 |
|
| 764 |
## Load targets |
| 765 |
{ |
| 766 |
type = virtual, provides = hardware.audio |
| 767 |
wants = [ monitor.alsa, monitor.alsa-midi ] |
| 768 |
} |
| 769 |
{ |
| 770 |
type = virtual, provides = hardware.bluetooth |
| 771 |
wants = [ monitor.bluez, monitor.bluez-midi ] |
| 772 |
} |
| 773 |
{ |
| 774 |
type = virtual, provides = hardware.video-capture |
| 775 |
wants = [ monitor.v4l2, monitor.libcamera ] |
| 776 |
} |
| 777 |
] |
| 778 |
|
| 779 |
wireplumber.components.rules = [ |
| 780 |
## Rules to apply on top of wireplumber.components |
| 781 |
## Syntax: |
| 782 |
## { |
| 783 |
## matches = [ |
| 784 |
## { |
| 785 |
## [ <key> = <value> ... ] |
| 786 |
## } |
| 787 |
## ... |
| 788 |
## ] |
| 789 |
## actions = { |
| 790 |
## <override|merge> = { |
| 791 |
## [ <key> = <value> ... ] |
| 792 |
## } |
| 793 |
## ... |
| 794 |
## } |
| 795 |
## } |
| 796 |
|
| 797 |
{ |
| 798 |
matches = [ |
| 799 |
{ |
| 800 |
type = "script/lua" |
| 801 |
} |
| 802 |
] |
| 803 |
actions = { |
| 804 |
merge = { |
| 805 |
requires = [ support.lua-scripting ] |
| 806 |
} |
| 807 |
} |
| 808 |
} |
| 809 |
{ |
| 810 |
matches = [ |
| 811 |
{ |
| 812 |
provides = "~hooks.*" |
| 813 |
name = "!~monitors/.*" |
| 814 |
} |
| 815 |
] |
| 816 |
actions = { |
| 817 |
merge = { |
| 818 |
before = [ support.standard-event-source ] |
| 819 |
} |
| 820 |
} |
| 821 |
} |
| 822 |
{ |
| 823 |
matches = [ |
| 824 |
{ provides = "~monitor.*" } |
| 825 |
] |
| 826 |
actions = { |
| 827 |
merge = { |
| 828 |
after = [ support.standard-event-source ] |
| 829 |
} |
| 830 |
} |
| 831 |
} |
| 832 |
# session-services.lua must execute at the very end |
| 833 |
{ |
| 834 |
matches = [ |
| 835 |
{ name = "!session-services.lua" } |
| 836 |
] |
| 837 |
actions = { |
| 838 |
merge = { |
| 839 |
before = [ support.session-services ] |
| 840 |
} |
| 841 |
} |
| 842 |
} |
| 843 |
] |
| 844 |
|
| 845 |
wireplumber.settings.schema = { |
| 846 |
## Bluetooth |
| 847 |
bluetooth.use-persistent-storage = { |
| 848 |
name = "Persistent storage" |
| 849 |
description = "Remember and restore Bluetooth headset mode status" |
| 850 |
type = "bool" |
| 851 |
default = true |
| 852 |
} |
| 853 |
bluetooth.autoswitch-to-headset-profile = { |
| 854 |
name = "Auto-switch to headset profile" |
| 855 |
description = "Always show microphone for Bluetooth headsets, and switch to headset mode when recording" |
| 856 |
type = "bool" |
| 857 |
default = true |
| 858 |
} |
| 859 |
|
| 860 |
## Device |
| 861 |
device.restore-profile = { |
| 862 |
name = "Restore profile" |
| 863 |
description = "Remember and restore device profiles" |
| 864 |
type = "bool" |
| 865 |
default = true |
| 866 |
} |
| 867 |
device.restore-routes = { |
| 868 |
name = "Restore routes" |
| 869 |
description = "Remember and restore device routes" |
| 870 |
type = "bool" |
| 871 |
default = true |
| 872 |
} |
| 873 |
device.routes.default-sink-volume = { |
| 874 |
name = "Default sink volume" |
| 875 |
description = "The default volume for audio sinks" |
| 876 |
type = "float" |
| 877 |
default = 0.064 |
| 878 |
min = 0.0 |
| 879 |
max = 1.0 |
| 880 |
} |
| 881 |
device.routes.default-source-volume = { |
| 882 |
name = "Default source volume" |
| 883 |
description = "The default volume for audio sources" |
| 884 |
type = "float" |
| 885 |
default = 1.0 |
| 886 |
min = 0.0 |
| 887 |
max = 1.0 |
| 888 |
} |
| 889 |
device.routes.mute-on-alsa-playback-removed = { |
| 890 |
name = "Auto-mute on wired audio disconnect" |
| 891 |
description = "Automatically mute all audio devices when active wired headphones/speakers are disconnected to prevent unintended sound output" |
| 892 |
type = "bool" |
| 893 |
default = false |
| 894 |
} |
| 895 |
device.routes.mute-on-bluetooth-playback-removed = { |
| 896 |
name = "Auto-mute on Bluetooth audio disconnect" |
| 897 |
description = "Automatically mute all audio devices when active Bluetooth headphones/speakers are disconnected to prevent unintended sound output" |
| 898 |
type = "bool" |
| 899 |
default = false |
| 900 |
} |
| 901 |
|
| 902 |
|
| 903 |
## Linking |
| 904 |
linking.role-based.duck-level = { |
| 905 |
name = "Ducking level" |
| 906 |
description = "The volume level to apply when ducking (= reducing volume for a higher priority stream to be audible) in the role-based linking policy" |
| 907 |
type = "float" |
| 908 |
default = 0.3 |
| 909 |
min = 0.0 |
| 910 |
max = 1.0 |
| 911 |
} |
| 912 |
linking.allow-moving-streams = { |
| 913 |
name = "Allow moving streams" |
| 914 |
description = "Streams may be moved by adding PipeWire metadata at runtime" |
| 915 |
type = "bool" |
| 916 |
default = true |
| 917 |
} |
| 918 |
linking.follow-default-target = { |
| 919 |
name = "Follow default target" |
| 920 |
description = "Streams connected to the default device follow when default changes" |
| 921 |
type = "bool" |
| 922 |
default = true |
| 923 |
} |
| 924 |
linking.pause-playback = { |
| 925 |
name = "Pause playback if output removed" |
| 926 |
description = "Pause media players if their target sink is removed" |
| 927 |
type = "bool" |
| 928 |
default = true |
| 929 |
} |
| 930 |
|
| 931 |
## Monitor |
| 932 |
monitor.camera-discovery-timeout = { |
| 933 |
name = "Discovery timeout" |
| 934 |
description = "The camera discovery timeout in milliseconds" |
| 935 |
type = "int" |
| 936 |
default = 1000 |
| 937 |
min = 0 |
| 938 |
max = 60000 |
| 939 |
} |
| 940 |
monitor.alsa.autodetect-hdmi-channels = { |
| 941 |
name = "Automatically detect HDMI channels (experimental)" |
| 942 |
description = "Automatically detect channel count and positions for HDMI devices (experimental)" |
| 943 |
type = "bool" |
| 944 |
default = false |
| 945 |
} |
| 946 |
|
| 947 |
## Node |
| 948 |
node.features.audio.no-dsp = { |
| 949 |
name = "No DSP" |
| 950 |
description = "Do not convert audio to F32 format" |
| 951 |
type = "bool" |
| 952 |
default = false |
| 953 |
} |
| 954 |
node.features.audio.monitor-ports = { |
| 955 |
name = "Monitor ports" |
| 956 |
description = "Enable monitor ports on audio nodes" |
| 957 |
type = "bool" |
| 958 |
default = true |
| 959 |
} |
| 960 |
node.features.audio.control-port = { |
| 961 |
name = "Control ports" |
| 962 |
description = "Enable control ports on audio nodes" |
| 963 |
type = "bool" |
| 964 |
default = false |
| 965 |
} |
| 966 |
node.features.audio.mono = { |
| 967 |
name = "Mono" |
| 968 |
description = "Configure all audio device sink nodes in MONO" |
| 969 |
type = "bool" |
| 970 |
default = false |
| 971 |
} |
| 972 |
node.stream.restore-props = { |
| 973 |
name = "Restore properties" |
| 974 |
description = "Remember and restore properties of streams" |
| 975 |
type = "bool" |
| 976 |
default = true |
| 977 |
} |
| 978 |
node.stream.restore-target = { |
| 979 |
name = "Restore target" |
| 980 |
description = "Remember and restore stream targets" |
| 981 |
type = "bool" |
| 982 |
default = true |
| 983 |
} |
| 984 |
node.stream.default-playback-volume = { |
| 985 |
name = "Default playback volume" |
| 986 |
description = "The default volume for playback nodes" |
| 987 |
type = "float" |
| 988 |
default = 1.0 |
| 989 |
min = 0.0 |
| 990 |
max = 1.0 |
| 991 |
} |
| 992 |
node.stream.default-capture-volume = { |
| 993 |
name = "Default capture volume" |
| 994 |
description = "The default volume for capture nodes" |
| 995 |
type = "float" |
| 996 |
default = 1.0 |
| 997 |
min = 0.0 |
| 998 |
max = 1.0 |
| 999 |
} |
| 1000 |
node.stream.default-media-role = { |
| 1001 |
name = "Default media role" |
| 1002 |
description = "Default media.role to assign on streams that do not specify it" |
| 1003 |
type = "string" |
| 1004 |
default = null |
| 1005 |
} |
| 1006 |
node.filter.forward-format = { |
| 1007 |
name = "Forward format" |
| 1008 |
description = "Forward format on filter nodes or not" |
| 1009 |
type = "bool" |
| 1010 |
default = false |
| 1011 |
} |
| 1012 |
node.restore-default-targets = { |
| 1013 |
name = "Restore default target" |
| 1014 |
description = "Remember and restore default audio/video input/output devices" |
| 1015 |
type = "bool" |
| 1016 |
default = true |
| 1017 |
} |
| 1018 |
} |