wireplumber merge requestshttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests2019-09-17T13:36:27Zhttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/31Monitor refactoring2019-09-17T13:36:27ZGeorge KiagiadakisMonitor refactoring0.2.0Julian Bouzasjulian.bouzas@collabora.comJulian Bouzasjulian.bouzas@collabora.comhttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/29Core refactoring2019-09-09T12:42:07ZGeorge KiagiadakisCore refactoringCode merging & cleanup :)Code merging & cleanup :)0.2.0Julian Bouzasjulian.bouzas@collabora.comJulian Bouzasjulian.bouzas@collabora.comhttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/608m-mixer-api: use gboolean instead of bool2024-03-04T17:24:49ZJulian Bouzasjulian.bouzas@collabora.comm-mixer-api: use gboolean instead of boolThe `WpSpaPodParser` always expects `gboolean` for boolean values. We should never use `bool` in WirePlumber unless strictly necessary.
Fixes #584The `WpSpaPodParser` always expects `gboolean` for boolean values. We should never use `bool` in WirePlumber unless strictly necessary.
Fixes #5840.4.90 (0.5.0~rc1)George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/607meson: bump min pipewire version to 0.3.822024-03-04T16:15:36ZJulian Bouzasjulian.bouzas@collabora.commeson: bump min pipewire version to 0.3.82Wireplumber does not currently build if using the current minimum pipewire version (0.3.75) because of the following error:
```
In file included from ../lib/wp/conf.c:471:
../lib/wp/private/parse-conf-section.c:16:10: fatal error: spa/u...Wireplumber does not currently build if using the current minimum pipewire version (0.3.75) because of the following error:
```
In file included from ../lib/wp/conf.c:471:
../lib/wp/private/parse-conf-section.c:16:10: fatal error: spa/utils/cleanup.h: No such file or directory
16 | #include <spa/utils/cleanup.h>
```
Even though pipewire `0.3.75` has the `<spa/utils/cleanup.h>` header, it wasn't really exposed until pipewire `0.3.82`. Here is the pipewire commit that exposes the header: https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/15e14946fb2087bb226164e1acab457c92db87a10.4.90 (0.5.0~rc1)George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/606lua: change the Conf API, cache rules early, close WpConf2024-03-04T17:17:59ZGeorge Kiagiadakislua: change the Conf API, cache rules early, close WpConfIn some cases we need to get a section as JSON, so that we can pass it
down to the rules parser, while in other cases we need to get it as a
table to use it natively, and in that case we even need to differentiate
between it being an obj...In some cases we need to get a section as JSON, so that we can pass it
down to the rules parser, while in other cases we need to get it as a
table to use it natively, and in that case we even need to differentiate
between it being an object, an array or an object with WpProperties.
Make it also possible to optionally pass tables with default values to
the functions so that we can get rid of cutils.get_config_section()
as well.
---
Cache the rules in a global variable in each script, as JSON,
and use JsonUtils directly to evaluate them. This will allow us to
close the WpConf in the future after loading the scripts.
Also change the order of the return values of the match_rules_apply_properties
function to be able to easily ignore the number of changed values,
which is useless in most cases.
---
Finally, close WpConf after loading all components.0.4.90 (0.5.0~rc1)George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/605conf: fix settings schema typos2024-03-04T14:06:29ZJulian Bouzasjulian.bouzas@collabora.comconf: fix settings schema typosFixes #583Fixes #5830.4.90 (0.5.0~rc1)George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/603docs: fix documentation for WpMetadataItem2024-03-04T07:38:59ZJulian Bouzasjulian.bouzas@collabora.comdocs: fix documentation for WpMetadataItem0.4.90 (0.5.0~rc1)George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/602settings: fix all coverity scan defects2024-03-04T07:38:58ZJulian Bouzasjulian.bouzas@collabora.comsettings: fix all coverity scan defectsThis MR fixes all coverity scan defects reported after the settings refactoring MR was merged.This MR fixes all coverity scan defects reported after the settings refactoring MR was merged.0.4.90 (0.5.0~rc1)Julian Bouzasjulian.bouzas@collabora.comJulian Bouzasjulian.bouzas@collabora.comhttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/601refactor WpConf to locate and parse its own files, plus drop the singleton2024-03-04T07:37:16ZGeorge Kiagiadakisrefactor WpConf to locate and parse its own files, plus drop the singletonThis is rebased on top of the settings-schema branch, so the diff is quite big.This is rebased on top of the settings-schema branch, so the diff is quite big.0.4.90 (0.5.0~rc1)George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/600Add settings schema2024-03-04T07:38:58ZJulian Bouzasjulian.bouzas@collabora.comAdd settings schemaThis MR adds a settings schema that is defined in JSON format in a new section of `wireplumber.conf` called `wireplumber.settings.schema`. This settings schema is then exported into a new `schema-sm-settings` metadata object so that the ...This MR adds a settings schema that is defined in JSON format in a new section of `wireplumber.conf` called `wireplumber.settings.schema`. This settings schema is then exported into a new `schema-sm-settings` metadata object so that the `WpSettings` object can know more information about each wireplumber settings.
Apart from this, new improvements have been done involving WpSettings:
- New APIs were added to set, save, reset, delete, get_saved, iterate and get the spec of a setting.
- The WpSettings unit tests have been refactored and improved to test all these new APIs
- The wpctl tool uses the WpSettings API instead of the metadata to show, set, reset, save and delete settings
- When wireplumber starts, all the settings are loaded into the `sm-settings` metadata, and they are initialized to the default value if not defined in the `wireplumber.settings` section of `wireplumber.conf`.
- Types and boundaries are now checked when updating a setting. For example, you cannot set a JSON boolean setting with a JSON array value.
- The `settings-manager.lua` has been removed because it is not needed anymore. This is because the `WpSettings` API always checks for the default value of a setting if it does not exist, and returns that value.0.4.90 (0.5.0~rc1)George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/599wpctl: add settings subcomand to show, delete or change settings2024-03-04T07:38:57ZJulian Bouzasjulian.bouzas@collabora.comwpctl: add settings subcomand to show, delete or change settingsThis MR removes the `clear-persistent` sub-command from the `wpctl` tool, and add a new `settings` command to show, delete or change settings. Here all the possible usages:
Show all settings and their saved values:
$ wpctl settings...This MR removes the `clear-persistent` sub-command from the `wpctl` tool, and add a new `settings` command to show, delete or change settings. Here all the possible usages:
Show all settings and their saved values:
$ wpctl settings
Save all current setting values:
$ wpctl settings -s
Delete all current setting values:
$ wpctl settings -d
Show the value of a particular setting
$ wpctl settings <setting-name>
Save the current value of a particular setting
$ wpctl settings -s <setting-name>
Remove the saved value of a particular setting
$ wpctl settings -d <setting-name>
Set a particular setting to some value
$ wpctl settings <setting-name> <value>
Set a particular setting to some value and also save it
$ wpctl settings -s <setting-name> <value>
Note that if no settings are saved and we just started wireplumber, the command `wpctl settings` won't show any settings because the `sm-settings` metadata is empty (the configuration does not set anything by default). Ideally, it would be nice for wireplumber to set all the settings with their default values in `sm-settings` metadata, even if those are not in the configuration.0.4.90 (0.5.0~rc1)George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/617Run stream-state.lua before m-standard-event-source2024-03-19T13:52:02ZAshok SidipotuRun stream-state.lua before m-standard-event-sourceRestore-stream hook is missing some of the node-added events if it is run after
they are reported by the m-standard-event-sourceRestore-stream hook is missing some of the node-added events if it is run after
they are reported by the m-standard-event-source0.5.0Ashok SidipotuAshok Sidipotuhttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/616docs: configuration: update docs on "settings" after the latest changes2024-03-13T16:23:57ZGeorge Kiagiadakisdocs: configuration: update docs on "settings" after the latest changes0.5.0George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/615si-linkables: do not fully reset when the underlying proxy is destroyed2024-03-12T10:54:03ZGeorge Kiagiadakissi-linkables: do not fully reset when the underlying proxy is destroyedReset back to the session item's "configured" state instead of clearing
the si properties completely. This allows the "session-item-removed"
event to be dispatched with all the original properties of the node
intact, for constraint match...Reset back to the session item's "configured" state instead of clearing
the si properties completely. This allows the "session-item-removed"
event to be dispatched with all the original properties of the node
intact, for constraint matching purposes.
Fixes #5880.5.0George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/614monitors/bluez: add 'internal' prefix to internal bluez node names.2024-03-12T06:10:22ZJulian Bouzasjulian.bouzas@collabora.commonitors/bluez: add 'internal' prefix to internal bluez node names.This MR adds 'internal' prefix to internal bluez node names, and also names the loopback source node to be the same as the bluez source without 'internal' prefix. This keeps consistency with input/output node names when switching bluetoo...This MR adds 'internal' prefix to internal bluez node names, and also names the loopback source node to be the same as the bluez source without 'internal' prefix. This keeps consistency with input/output node names when switching bluetooth profiles.
For example, if we have a `5C_FB_7C_30_9C_AE` BT device, the names would be:
- A2DP profile:
- A2DP sink node: `bluez_output.5C_FB_7C_30_9C_AE`
- HFP profile:
- HFP sink node: `bluez_output.5C_FB_7C_30_9C_AE`
- HFP source node (hidden): `bluez_input_internal.5C_FB_7C_30_9C_AE`
- HFP loopback source node: `bluez_input.5C_FB_7C_30_9C_AE`
- HFP loopback stream node (hidden): `bluez_capture_internal.5C_FB_7C_30_9C_AE`0.5.0George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/613meson: bump min pipewire version to 1.0.22024-03-11T16:32:00ZJulian Bouzasjulian.bouzas@collabora.commeson: bump min pipewire version to 1.0.2This is because of using 'api.bluez5.internal' property in bluez.lua.
See !589This is because of using 'api.bluez5.internal' property in bluez.lua.
See !5890.5.0George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/612scripts: make sure target is not nil when iterating filters with matching tar...2024-03-08T16:03:30ZJulian Bouzasjulian.bouzas@collabora.comscripts: make sure target is not nil when iterating filters with matching targetsThis avoids the following Lua error if we have 2 smart filters, one with a smart target and the other without a smart target:
wplua ../modules/module-lua-scripting/wplua/wplua.c:51:_wplua_errhandler: [string "filter-utils.lua"]:427:...This avoids the following Lua error if we have 2 smart filters, one with a smart target and the other without a smart target:
wplua ../modules/module-lua-scripting/wplua/wplua.c:51:_wplua_errhandler: [string "filter-utils.lua"]:427: attempt to index a nil value (field 'target')0.5.0George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/611use parseBool for boolean properties in rules2024-03-11T07:20:01ZAshok Sidipotuuse parseBool for boolean properties in rulesThe boolean values of properties in rules are strings in JSON config files and
they will retain the same type when they are translated to Lua.
Use cutils.parseBool() function when they have to be interpreted as bools.The boolean values of properties in rules are strings in JSON config files and
they will retain the same type when they are translated to Lua.
Use cutils.parseBool() function when they have to be interpreted as bools.0.5.0Ashok SidipotuAshok Sidipotuhttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/610scripts: fix regression in state-routes.lua when marking routes as 'active'2024-03-11T11:54:39ZJulian Bouzasjulian.bouzas@collabora.comscripts: fix regression in state-routes.lua when marking routes as 'active'Like WirePlumber 0.4.17, we need to mark the current routes as 'active' if they were previously not active as soon as we detect it. This avoids a possible infinite loop that restores the routes and saves them constantly, which happens wh...Like WirePlumber 0.4.17, we need to mark the current routes as 'active' if they were previously not active as soon as we detect it. This avoids a possible infinite loop that restores the routes and saves them constantly, which happens when the device's Route param has changed more than once before the event 'select-routes' is triggered.
This infinite loop is not easy to reproduce because it does not happen all the time when `EnumRoute` param changes, but with this change I am not able to reproduce it anymore.0.5.0George KiagiadakisGeorge Kiagiadakishttps://gitlab.freedesktop.org/pipewire/wireplumber/-/merge_requests/609Fix available routes check when selecting the default node2024-03-11T14:42:45ZJulian Bouzasjulian.bouzas@collabora.comFix available routes check when selecting the default nodeThis MR fixes the Lua logic when checking available routes when selecting the default node.
On the other hand, default nodes and linking policy is also now reevaluated when the device `EnumRoute` param changes, which is needed for devic...This MR fixes the Lua logic when checking available routes when selecting the default node.
On the other hand, default nodes and linking policy is also now reevaluated when the device `EnumRoute` param changes, which is needed for devices that expose both the Headset node and Speakers node, and applications want to be auto-linked to the proper node when plugging and unplugging a headset.0.5.0George KiagiadakisGeorge Kiagiadakis