All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] adapter: battery provider for non-LE controllers
@ 2022-02-12  8:45 Daniel Trnka
  2022-02-12 10:35 ` [BlueZ] " bluez.test.bot
  2022-02-14 18:58 ` [PATCH BlueZ] " Sonny Sasaka
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Trnka @ 2022-02-12  8:45 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Daniel Trnka

Enable battery provider dbus interface BatteryProviderManager1 for
non-LE controllers, so external clients like pipewire can provide
battery information for bluetooth headsets on non-LE controllers.
---
 src/adapter.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/adapter.c b/src/adapter.c
index eef50f67a..2071cf8db 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -8976,6 +8976,11 @@ 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);
+	}
+
 	/* Don't start GATT database and advertising managers on
 	 * non-LE controllers.
 	 */
@@ -9010,11 +9015,6 @@ static int adapter_register(struct btd_adapter *adapter)
 		}
 	}
 
-	if (g_dbus_get_flags() & G_DBUS_FLAG_ENABLE_EXPERIMENTAL) {
-		adapter->battery_provider_manager =
-			btd_battery_provider_manager_create(adapter);
-	}
-
 	db = btd_gatt_database_get_db(adapter->database);
 	adapter->db_id = gatt_db_register(db, services_modified,
 							services_modified,
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-14 19:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-12  8:45 [PATCH BlueZ] adapter: battery provider for non-LE controllers Daniel Trnka
2022-02-12 10:35 ` [BlueZ] " bluez.test.bot
2022-02-14 18:58 ` [PATCH BlueZ] " Sonny Sasaka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.