Commit graph

2983 commits

Author SHA1 Message Date
Julian Bouzas
bc4fa8f5e8 0.5.15 2026-06-18 08:24:35 -04:00
George Kiagiadakis
6347f5acd6 wpctl: update shell-completions
Assisted-by: Claude Sonnet 4.6
2026-06-11 17:18:14 +03:00
George Kiagiadakis
c882e606e3 wpctl: add reset command
This removes wireplumber's state files and optionally also config
files of both wireplumber and pipewire. The purpose of it is to reset
the state easily to the distribution's defaults, as if it's the first
run right after installation.

Fixes: #397
2026-06-11 17:05:34 +03:00
Diego Viola
5ce13f8874 Fix typos
Signed-off-by: Diego Viola <diego.viola@gmail.com>
2026-06-08 13:55:33 -03:00
Julian Bouzas
48c7a1aa18 state-stream: Only use 'media.role' key if its value is 'Notification' when forming key
This avoids different applications sharing the same role to have the same volume
at startup, unless those are part of the Notification role.

Fixes #955
2026-06-04 08:43:04 -04:00
Julian Bouzas
a824ae910f m-lua-scripting: only hold a strong reference of the Lua state when the script is enabled
Scripts are always deactivated (and not finalized) before core disconnects, so
we need to make sure the scripts don't hold a strong reference when creating
them. They must only hold a strong reference of the Lua state if activated.

In order to implement this properly, the lua_State has been wrapped into a
GObject so that the 'lua-engine' construct-only property is a weak reference of
the Lua state. Then, when the script is activated, a strong reference of the Lua
state is held so the script can work. This strong reference is later dropped
when the script is deactivated (right before the core is disconnected), avoiding
leaked proxy warning messages in the log if a script has a global variable
holding a proxy (Eg the alsa monitor in alsa.lua).
2026-06-01 07:37:02 -04:00
zhouyong
b1a199a8dd pw-obj-mixin: apply filter when enumerating cached params 2026-06-01 10:09:52 +00:00
zhouyong
daadb67860 pw-obj-mixin: deduplicate subscribed param ids 2026-06-01 09:51:35 +00:00
zhouyong
28a63cebbe m-lua-scripting: validate Bool values in Pod.Choice.Enum 2026-06-01 09:42:26 +00:00
Julian Bouzas
9651e6f8b4 spa-device: add params-changed signal
This is emitted when the params have changed.
2026-05-30 18:11:36 -04:00
Julian Bouzas
72b67605f3 device: Add 'event' signal in WpSpaDevice
This is triggered every time a new spa_device event is emitted.
2026-05-26 12:24:10 +00:00
Julian Bouzas
594c04911f m-lua-scripting: Add Lua API for SPA device _enum_params_sync() and _set_params() 2026-05-26 12:24:10 +00:00
Julian Bouzas
7f5e7257b1 device: Add _enum_params_sync() and _set_param() APIs for WpSpaDevice 2026-05-26 12:24:10 +00:00
Julian Bouzas
bca07a12c0 monitors/alsa: Set profile to Off and restore it back if node state changes to error
This forces a close/open of the ALSA device, which recovers some ALSA devices.
2026-05-24 09:59:36 +03:00
Val Packett
1282903e0d find-voice-call-profile: don't skip profiles with "unknown" availability
While testing this script I've found out that all profiles on my device
have "unknown" availablility rather than "yes", so they were skipped.
Fix by changing the check to not-"no".

While here, add more debug logging that would've helped debug this,
and fix the indentation on one line where it was off.
2026-05-14 04:55:01 -03:00
Julian Bouzas
0e8a6706e6 state-profile: Use state metadata to store saved profiles
This allows users to clear the stored profile for any device at runtime using
the pw-metadata tool.
2026-05-12 17:08:55 +03:00
Julian Bouzas
b35d6131f9 m-lua-scripting: Add Lua API for new WpStateMetadata class 2026-05-12 17:08:55 +03:00
Julian Bouzas
d375495aa5 state: Add new WpStateMetadata class
This new class is similar to WpState, but also reflects the state into a
metadata object with the same name as the state file.
2026-05-12 17:08:55 +03:00
Julian Bouzas
959c3f8e30 properties: Add API to clear all properties
This is useful if we want to clear all properties without destroying the instance.
2026-05-12 17:08:55 +03:00
Torkel Niklasson
f20c6e4eb8 client, permission-manager: add getters for runtime introspection
Add wp_client_get_permission_manager() and
wp_permission_manager_get_default_permissions() and expose both as Lua
methods. This allows Lua scripts to verify a client's trust level at
runtime by inspecting the actual permission bits of its attached PM.
2026-05-11 18:59:48 +00:00
Torkel Niklasson
6c74f4b77f docs: document Client and PermissionManager Lua API 2026-05-11 18:59:48 +00:00
Julian Bouzas
440e78c3b3 find-portal-access: un-gate portal clients after permission setup
The PW daemon can gate portal clients on stolen-fd reconnect by
removing PW_PERM_R from PW_ID_CORE, but only when the session manager
advertises support so set pipewire.access.portal.gate-supported on
portal clients before the async PermissionManager activation so it is
present by the time the portal steals the fd.

Fixes: #941
2026-05-11 07:56:25 -04:00
Julian Bouzas
6433beafbe permission-manager: Add client-properties-changed singal
This is emitted when the properties of an attached client has changed.
2026-05-11 07:56:25 -04:00
Chengyi Zhao
91cc2387a3 registry: Deactivate all objects before clearing the registry
This avoids possible shutdown races between registered objects.
2026-05-08 08:38:39 -04:00
Chengyi Zhao
93ccf7b22e m-lua-scripting: Deactivate all scripts before deactivating module
This avoids possible Lua GC crash on exit.
2026-05-08 08:35:29 -04:00
lumingzh
862925ff9b update zh_CN.po 2026-05-07 17:03:41 +08: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
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