2023-10-05 17:33:53

by Pauli Virtanen

[permalink] [raw]
Subject: [PATCH BlueZ 1/2] battery: mark all battery DBus APIs non-experimental

Remove experimental marker from BatteryProvider1 and Battery1.Source.

It's common that headsets send battery information via HFP, and often
this is also the only way to get it. Pipewire/pulseaudio manage HFP,
parse the battery commands, and use the BatteryProvider API if present
to forward it. No problems with the API appeared here, and it's been
experimental for a few years, so it's useful to enable it by default
now.
---
src/adapter.c | 6 ++----
src/battery.c | 7 +++----
2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index 8c267d418..6c539a81e 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -9286,10 +9286,8 @@ static int adapter_register(struct btd_adapter *adapter)
agent_unref(agent);
}

- if (g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL) {
- adapter->battery_provider_manager =
- btd_battery_provider_manager_create(adapter);
- }
+ adapter->battery_provider_manager =
+ btd_battery_provider_manager_create(adapter);

/* Don't start GATT database and advertising managers on
* non-LE controllers.
diff --git a/src/battery.c b/src/battery.c
index 5c52581f3..59e4fc570 100644
--- a/src/battery.c
+++ b/src/battery.c
@@ -152,8 +152,7 @@ static gboolean property_source_exists(const GDBusPropertyTable *property,
static const GDBusPropertyTable battery_properties[] = {
{ "Percentage", "y", property_percentage_get, NULL,
property_percentage_exists },
- { "Source", "s", property_source_get, NULL, property_source_exists,
- G_DBUS_PROPERTY_FLAG_EXPERIMENTAL },
+ { "Source", "s", property_source_get, NULL, property_source_exists },
{}
};

@@ -523,10 +522,10 @@ static DBusMessage *unregister_battery_provider(DBusConnection *conn,
}

static const GDBusMethodTable methods[] = {
- { GDBUS_EXPERIMENTAL_METHOD("RegisterBatteryProvider",
+ { GDBUS_METHOD("RegisterBatteryProvider",
GDBUS_ARGS({ "provider", "o" }), NULL,
register_battery_provider) },
- { GDBUS_EXPERIMENTAL_METHOD("UnregisterBatteryProvider",
+ { GDBUS_METHOD("UnregisterBatteryProvider",
GDBUS_ARGS({ "provider", "o" }), NULL,
unregister_battery_provider) },
{}
--
2.41.0


2023-10-05 18:52:53

by bluez.test.bot

[permalink] [raw]
Subject: RE: [BlueZ,1/2] battery: mark all battery DBus APIs non-experimental

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=790359

---Test result---

Test Summary:
CheckPatch PASS 1.05 seconds
GitLint PASS 0.70 seconds
BuildEll PASS 28.38 seconds
BluezMake PASS 869.09 seconds
MakeCheck PASS 12.86 seconds
MakeDistcheck PASS 164.12 seconds
CheckValgrind PASS 264.21 seconds
CheckSmatch PASS 359.30 seconds
bluezmakeextell PASS 109.93 seconds
IncrementalBuild PASS 1485.18 seconds
ScanBuild PASS 1107.90 seconds



---
Regards,
Linux Bluetooth

2023-10-05 21:00:50

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH BlueZ 1/2] battery: mark all battery DBus APIs non-experimental

Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <[email protected]>:

On Thu, 5 Oct 2023 19:57:32 +0300 you wrote:
> Remove experimental marker from BatteryProvider1 and Battery1.Source.
>
> It's common that headsets send battery information via HFP, and often
> this is also the only way to get it. Pipewire/pulseaudio manage HFP,
> parse the battery commands, and use the BatteryProvider API if present
> to forward it. No problems with the API appeared here, and it's been
> experimental for a few years, so it's useful to enable it by default
> now.
>
> [...]

Here is the summary with links:
- [BlueZ,1/2] battery: mark all battery DBus APIs non-experimental
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=495a582675cf
- [BlueZ,2/2] doc: mark battery APIs non-experimental
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=85460c32d133

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html