Re: [PATCH BlueZ] adapter: battery provider for non-LE controllers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Sonny Sasaka <sonnysasaka@xxxxxxxxxxxx>

On Sat, Feb 12, 2022 at 12:48 AM Daniel Trnka <daniel.trnka@xxxxxxxxx> wrote:
>
> 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
>



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux