Commit graph

2975 commits

Author SHA1 Message Date
Julian Bouzas
0cc8a212e0 Merge branch 'collection' into 'master'
Draft: Add new collections API and a configuration to create ALSA loopbacks

See merge request pipewire/wireplumber!779
2026-05-05 15:01:50 +00:00
Julian Bouzas
8b42a5a3ae wpctl: Apply the same volume to all nodes when setting by PID
Fixes #944
2026-05-05 07:43:21 -04:00
bhack
5a2f52dab4 spa-pod: mark borrowed string out params transfer none 2026-05-04 22:05:35 +02:00
Julian Bouzas
7fa44ef8d0 find-preferred-profile: Add new 'bluetooth.profile-preference' setting
This setting will use the best quality or latency profiles  for BT devices if
available. HSP/HFP profiles will always be ignored. The setting is a string that
only accepts 'quality' and 'latency' strings. Any other value will be treated
the same way as the 'quality' value.
2026-04-30 07:35:38 -04:00
qaqland
c579d1d839 wpctl: add bash completion for list subcommand
Refs: 85a7201409
Signed-off-by: qaqland <anguoli@uniontech.com>
2026-04-29 16:13:25 +03:00
Torkel Niklasson
26f5fc11a6 permission-manager: Add core_permissions support
The core object (ID 0) is implicit in the PipeWire connection and never
appears in the permission manager's ObjectManager. Add a
core_permissions field to set explicit permissions on it independently
of default_permissions.
2026-04-29 08:20:55 +02:00
Torkel Niklasson
1f0c590f49 docs: add WpPermissionManager API page and document permission managers in access config 2026-04-29 08:20:55 +02:00
zhouyong
1f8475b15f find-portal-access:Add a cache for camera permission checks to avoid frequent calls 2026-04-23 18:06:05 +08:00
zhouyong
bd4beadb43 portal-permissionstore: Add 3s timeout to D-Bus calls and fix Set create parameter 2026-04-22 19:39:05 +08:00
Sergey Veselkov
85a7201409 wpctl: add list subcommand to show objects in a more script-friendly format 2026-04-14 19:14:40 +03:00
Sergey Veselkov
5c0712322f meson: fix tools build without daemon 2026-04-14 18:38:55 +03:00
Марко М. Костић (Marko M. Kostić)
2fa1414fbe
po: Format the updated Serbian and Serbian Latin translations 2026-04-11 14:06:45 +02:00
Марко М. Костић (Marko M. Kostić)
45a2786c1b
po: Update Serbian and add Serbian Latin translations 2026-04-11 14:03:06 +02:00
George Kiagiadakis
409446046c Revert "object, registry: Increase prio of idle sources"
This is suspected to be the reason why the CI pipelines fail on some
of the linking tests. Reverting the commit for now, until the issue
is better understood.

See #934

This reverts commit 529aaa66cb.
2026-04-09 15:29:43 +03:00
Julian Bouzas
767a83a5f0 state-profile: Fix nil value when logging
Use warning instead of critical as there is no critical level API in Lua.
2026-04-09 11:00:07 +03:00
Julian Bouzas
f4f1a33446 permission-manager: Fix null pointer dereference
This fixes issue reported by coverity scan.
2026-04-09 09:26:51 +03:00
Julian Bouzas
13e07b101e linking: Add ALSA loopback policy scripts
This policy script is in charge of linking all nodes from all ALSA loopback
collections.
2026-04-08 16:20:06 -04:00
Julian Bouzas
6634ce8f17 Restrict the policy to session items that are not part of any collection
This will avoid conflics with collection specific policies. The policy scripts
have also been moved inside the 'default' sub-directory.
2026-04-08 16:19:59 -04:00
Julian Bouzas
f66d91a842 linking: Make sure we don't handle metadata collections
Since collections are also metadata objects, this avoids possible conflics if
some collection metadatas have matching names.
2026-04-08 16:19:54 -04:00
Julian Bouzas
0bbf7f9f81 filter-utils.lua: Restrict smart filters to nodes that are not part of any collection
Smart filters are not meant to be used with collection specific policy.
2026-04-08 16:19:48 -04:00
Julian Bouzas
340a41e699 scripts/default-nodes: Restrict to nodes that are not part of any collection
Nodes that are part of a collection are handled separately.
2026-04-08 16:19:43 -04:00
Julian Bouzas
81f86f8132 scripts: Add 'device/create-alsa-loopback.lua' script
This new script allows creating loopback filters for ALSA nodes matching a
particular route using a JSON configuration file. See the provided example
configuration file for more info.
2026-04-08 16:19:38 -04:00
Julian Bouzas
b96c97e294 create-item.lua: Handle nodes that are collected into collections
This change makes sure the session items are always updated even after nodes
are collected or dropped from a collection. We also set a 'collection.name'
property so we can easily filter nodes by collection.
2026-04-08 16:19:33 -04:00
Julian Bouzas
5f26e4d01a m-standard-event-source: Add priority for new 'destroy-' local event types
This new event type have the same priority as the 'create-' one.
2026-04-08 16:19:28 -04:00
Julian Bouzas
bf1d2c82b7 global-proxy: Add collection-name property
Helper function to get the collection name of a global proxy easily. This
property can also be used in object interest constrains to select objects of
a particular collection.
2026-04-08 16:19:23 -04:00
Julian Bouzas
e78a28f5b6 permission-manager: Update permissions when a matched object has been collected or dropped
This is needed because the 'collection-name' gobject property changes if the
object has been collected or dropped.
2026-04-08 16:19:18 -04:00
Julian Bouzas
a713270769 m-standard-event-source: Emit '*-collected' and '*-dropped' events
These events are emitted when a global was collected into a collection or
dropped from a collection respectively.
2026-04-08 16:19:13 -04:00
Julian Bouzas
5a2b15c1a0 m-standard-event-source: Emit 'select-collection' event for all added objects
This new event has higher priority than the 'added' event, and it is meant to
be used by hooks that collect objects into collections.
2026-04-08 16:19:07 -04:00
Julian Bouzas
155bbbfc38 m-lua-scripting: Add WpCollection and WpCollectionManager Lua APIs
This allows using the new collections API in Lua scripts.
2026-04-08 16:19:02 -04:00
Julian Bouzas
58ad3a1976 wpctl: Add new 'collections' command
This new command shows information about collections.
2026-04-08 16:18:57 -04:00
Julian Bouzas
1913a4f239 modules: Add new collection-manager module
This module is in charge of creating all the collection metadatas.
2026-04-08 16:18:52 -04:00
Julian Bouzas
a3803de00b lib: Add new WpCollectionManager API
This API allows handling of collections easily. It mainly allows creating them,
destroying them, collect globals into a them and dropping glovals from them.
The manager also automatically destroys a collection of all globals where
dropped from the collection.
2026-04-08 16:18:45 -04:00
Julian Bouzas
82be02e8fa lib: Add new WpCollection API
This API allows grouping globals into collections. A collection is essentially
a metadata object with information about all the globals it collects. Grouping
globals into collections has the advantage of avoiding defining complex set of
properties to match the interested globals, and they are also a more generic way
to represent a set of globals that share something in common.
2026-04-08 16:18:39 -04:00
Julian Bouzas
e1874f8b31 wpctl: Connect to the manager socket if possible
This gives the tool unrestricted access.
2026-04-07 09:38:58 -04:00
Julian Bouzas
478c9402fc module: Call parent's destructor before finalizing
This fixes memleaks when unreferencing the module.
2026-04-01 08:36:39 -04:00
Julian Bouzas
210467c5ce scripts/client: Refactor scripts to use the new PermissionManager API
The refactoring uses a new 'select-access' event to select the access for each
client with a fallback mechanism. The fallback priority is: configuration,
flatpak, snap, portal, and default.

The access JSON configuration has also been improved so that users can create
their custom permission managers and attach them to any client. See the access
configuration example for more information describing how to do this.
2026-03-31 12:15:14 +03:00
Julian Bouzas
dcd59bc31d client: Add _attach_permission_manager () API
This attaches a permission manager to a client so that it can handle permissions
automatically when the interested objects have changed.
2026-03-31 12:15:14 +03:00
Julian Bouzas
c03f4fd4d7 m-lua-scripting: Add Lua API for WpPermissionManager
This allows using the new permission manager API in Lua scripts.
2026-03-31 12:15:14 +03:00
Julian Bouzas
484e1f0fb7 lib: Add new WpPermissionManager API
This allows setting object specific permissions on any client easily.
2026-03-31 12:15:14 +03:00
Julian Bouzas
78bd42cad8 bluez: Don't set bluez5.autoswitch-routes on BT devices
This seems to cause some issues with BT profile autoswitch.

See #932
2026-03-30 07:33:58 -04:00
Jonas Holmberg
529aaa66cb object, registry: Increase prio of idle sources
Raise the priority of all idle sources that need to be dispatched in
order to make the linking/linkable-added-immediate hook run.
2026-03-25 16:30:46 +01:00
Jonas Holmberg
374c48b339 event-dispatcher: Dispatch one event at a time
Return after dispatching one event so that other GSources also can be
dispatched in between events when there are many events in queue.
2026-03-25 16:30:46 +01:00
George Kiagiadakis
07e730b279 0.5.14 2026-03-25 12:49:03 +02:00
Barnabás Pőcze
c2b96ebb39 m-lua-scripting: impl_module_new(): fix property list memory leak
The `properties` argument of `wp_impl_module_load()` is marked
"transfer none", thus the caller's reference remains valid and
must be disposed of.

Fixes: ef29018c55 ("m-lua-scripting: Add WpImplModule bindings")
2026-03-20 20:30:44 +01:00
Torkel Niklasson
1cfeab9a86 linking: Make rescan optional on linkable changes
Split rescan-on-linkable triggering into a separate script file
(linking/rescan-on-linkable.lua) that can be disabled via
wireplumber.profiles by setting hooks.linking.rescan-on-linkable =
disabled.
2026-03-19 20:29:32 +02:00
Julian Bouzas
b453464320 autoswitch-bluetooth-profile: Switch/restore the profile using 'autoswitch-*' event hooks
Since 'autoswitch-*' events have lower priority than 'select-*' events,
this guarantees that the autoswitch hooks will always run after the
'device/apply-profile' hook, avoiding possible race conditions.
2026-03-19 20:25:38 +02:00
Julian Bouzas
7023ad0c2c m-standard-event-source: Add 'autoswitch-*' local event priority
These local events have lower priority than the 'create-*' and 'select-*' ones,
and are meant to be used when wireplumber wants to automatically switch profiles
or other things.
2026-03-19 20:25:38 +02:00
Julian Bouzas
20238072e2 autoswitch-bluetooth-profile: Ensure the saved profile is headset/non-headset before switching/restoring
Otherwise find the highest priority one.
2026-03-19 20:25:38 +02:00
Julian Bouzas
f38f1a2af8 autoswitch-bluetooth-profile: Rename device-profile-changed hook name to be more consistent
This makes all the script hooks more consistent.
2026-03-19 20:25:38 +02:00
Julian Bouzas
9fb963d4e5 autoswitch-bluetooth-profile: Don't evaluate if node state changes from 'idle' to 'suspended'
This is not needed and can improve performance a little bit.
2026-03-19 20:25:38 +02:00