Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp6024626pxb; Mon, 14 Feb 2022 13:22:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJw8ymS7yqNj+0f2JrGv/hy8ZABYAbAp0oFzWHvWTSLAMsZFGB09/nXib5dfx/VHHf7g3VGT X-Received: by 2002:a05:6a00:1914:: with SMTP id y20mr813585pfi.39.1644873771778; Mon, 14 Feb 2022 13:22:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644873771; cv=none; d=google.com; s=arc-20160816; b=OabAlfzLPFpFgRkd3DFJh/fuGibQPjAMYEJHF0uYnVYpp4bWSJddnyuD0z/0wIRvMF pc6i3+RjFavPGNryFxxt+Rb7fJeJg00XEm0ZpSjY/wpNiQT6XhrUVGp9SufVphgOrDnS a9VFn2Rr/icdVya5B10opkuKVC2eGxOXLghofiqr4HfevZTqr8fONkMVwhVDrtxNYTKQ Ok3giP6QJKEUT1UvllkmtgkCy+Q0jfvMg69pZtD+qpom6lnKd6kIIHr39w5j42jtIfSS lOMn3KKOncGBCMBskNAgrJqH8X1YL9oFS7UOpHXlcJUPCTQsCxMHGYmQ+g7PiHwUn0+r 8Jaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=xdr3WFp3E9OzgNCWLotNQ7VjdvztBcysFRD6qohkMU4=; b=Ac9a64/cu59/sOL13Soi+WWVqXgWV4KXBCVy23dUAsoo4wS3kpa9EEI5Yb1TWxcGUn BMxSZXFfRiTiXvjWUOv2BD43iUNAvRt1kAHvifRC5mmEh/rKLBXG+dDjcLF08CdCxFCS oSnpawiogyVm5LSRORrZ6TboDZlUO5wwYSKUWzdnqnuPu62OeTYmpxILEaoMEpNd3HjJ WYhdjQRFPd21v+/HAmqpDhyqYVLn2hOzIiPj1I7/m347d8mCuWNRoTGVeUsj6CX8t9MD accBfJTNTdN3UHAheeJWgWfS5xPwkT9JpCCl7GNahJlKQ9C1mzJbgDR/W97TJW0jAiDR mkpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="IAj/f401"; spf=softfail (google.com: domain of transitioning linux-bluetooth-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id u189si716965pgd.33.2022.02.14.13.22.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 13:22:51 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-bluetooth-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="IAj/f401"; spf=softfail (google.com: domain of transitioning linux-bluetooth-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9D6BC235850; Mon, 14 Feb 2022 12:40:02 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229946AbiBNTEj (ORCPT + 99 others); Mon, 14 Feb 2022 14:04:39 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:50740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbiBNTEN (ORCPT ); Mon, 14 Feb 2022 14:04:13 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1171C8C49D for ; Mon, 14 Feb 2022 11:03:54 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id w2so9825748edc.8 for ; Mon, 14 Feb 2022 11:03:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xdr3WFp3E9OzgNCWLotNQ7VjdvztBcysFRD6qohkMU4=; b=IAj/f401Pamj54tFk8U9adtcleW7eXX912sjBfKSWPtoZKqN7gFSxwHebO0+kVIu5K +uE6bJcXGJv6avd3tDOTJgfx6bZ4vVOh9sAiTle1ScL1lAy7/XBbE2E0rqrLgnHEk1sp Rr5dep5YOvLSEO2ogfKAEs+jgEXAITnpjt6u8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xdr3WFp3E9OzgNCWLotNQ7VjdvztBcysFRD6qohkMU4=; b=y0rGXWXTa2CVu1/M3ULWcffDapcDsZxd7Xztkjcf4faY0njCzMNDoWYiiy6YXFjoh4 BR8Kagl1RfMTEPFH19vR7jFV1Lbl0mR1rm7u+iSvLkNXP7mpSdIwt64X1WLcpGjMf9zy D1+rVYdQJ3Fh14WWVl5vPhacNTZGtDZ9wBDAt1+T4VxKwr3h9hQGSJtk1N1pgBX/1gvC qoqgxWkxUZVoIifB+iyppq+0Jp9wDjRIF4e6M8kZzNm2BEsPDNvoijAMJrw6/OT0z6Be aoFkOiCGQthdJxdQ00wxNEe9Nj5euOqrMzylHcd6+hNwalSGXzwKp8H4kTfT6S18A72P MvLA== X-Gm-Message-State: AOAM530+sH+rWstnQ3nAUG9UqN5bag3dRJ0NilSf3mTC0ips07GQ5z0Y dGkV1e+rShh7SysA9rU+YUNONwBm3JyfZg== X-Received: by 2002:a05:6402:22b7:: with SMTP id cx23mr185373edb.91.1644865144206; Mon, 14 Feb 2022 10:59:04 -0800 (PST) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com. [209.85.221.49]) by smtp.gmail.com with ESMTPSA id c5sm16005229edk.43.2022.02.14.10.59.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Feb 2022 10:59:03 -0800 (PST) Received: by mail-wr1-f49.google.com with SMTP id d27so24645539wrb.5 for ; Mon, 14 Feb 2022 10:59:03 -0800 (PST) X-Received: by 2002:a05:6000:1683:: with SMTP id y3mr357342wrd.222.1644865143200; Mon, 14 Feb 2022 10:59:03 -0800 (PST) MIME-Version: 1.0 References: <20220212084541.221196-1-daniel.trnka@gmail.com> In-Reply-To: <20220212084541.221196-1-daniel.trnka@gmail.com> From: Sonny Sasaka Date: Mon, 14 Feb 2022 10:58:52 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH BlueZ] adapter: battery provider for non-LE controllers To: Daniel Trnka Cc: BlueZ Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Reviewed-by: Sonny Sasaka On Sat, Feb 12, 2022 at 12:48 AM Daniel Trnka 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 >