Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4208274pxb; Tue, 17 Nov 2020 14:27:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJy6lgif6U8gfprcupUhKjK/2PXs/fEkfJFUmsMR7OFFqZDJUgN6OZejV/jSnCujT0nAAWG4 X-Received: by 2002:a17:906:7c48:: with SMTP id g8mr4169953ejp.522.1605652037801; Tue, 17 Nov 2020 14:27:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605652037; cv=none; d=google.com; s=arc-20160816; b=kY3Ajj6XOE2x9RsXKetWc0uRYsq8HMgl1AbO9F8li1fh4E0fHZmZnK6sGMwEE1gK1a VW6v9jWiztjtFpDAUIiCQk+1iIW3TQdjAag6A8ZMO1YmsuOl10mPfRa+VIBR43rtLiog w09bnYPKOm5YPTa21hm+z7jiIXAurcSg8os4BvTqXfpRGr0rDNTEbbR8nsDhxy+KKdoN H2YzBcxyvZ2QErgWxLHcAKWkdswWCqV05hgoe54piMELWOR1wAm5B3q2LIGw2ABNWELh 7yaX5WqoivjC7Djkjw42dXlvX9o4BHlykcHkKmuR5vta8wIbuaG1qJfrODk6yJQ8kJls IBtg== 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=9jcL402HXfmlzonKdCIzeVQZ60+q+bqYV6QCyhds2f4=; b=ccByF8f9TXCI/D1Rwg51FwwPVcaMnF8JQTE07peGOdZVbUlwSSN9G/OWbE8XqIXDvC 1QZ68ejLVNpS+XoR2ECI+bctaRfRjHo9krtKTePT/rrRD0m/riJ/252F/3YfqwMKMAsf t5qucHaicLZzI/L5wpkODZ19TvL5hi91Qc4n9u58Jc+jR2kBFuFhGlkNTVT9u6tWOSGJ JPon0e56ppOFE5AaP9Z1Zou/qx5rYeh6DZ4i1Ez3J7SE3kekD/MmCmZ9XEF/6e2OMkts NZsJWyHikXZRdVHG6WKt/M7ctZLBGd2B4v3PytWRT60IGWIl4+k/Z2DB4rKuBEkPFNoZ SwBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="L/sjVH5n"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r16si11345365ejb.207.2020.11.17.14.26.53; Tue, 17 Nov 2020 14:27:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="L/sjVH5n"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729126AbgKQW0R (ORCPT + 99 others); Tue, 17 Nov 2020 17:26:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725823AbgKQW0R (ORCPT ); Tue, 17 Nov 2020 17:26:17 -0500 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDC85C0613CF for ; Tue, 17 Nov 2020 14:26:15 -0800 (PST) Received: by mail-ed1-x542.google.com with SMTP id d18so11281314edt.7 for ; Tue, 17 Nov 2020 14:26:15 -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=9jcL402HXfmlzonKdCIzeVQZ60+q+bqYV6QCyhds2f4=; b=L/sjVH5nhgEc5delwuvdEZFGwHhFtO6tExxhzdOIF1l10t4Ffj1ziSAe9IkROAbG0M mc308BfkljcidLlFZ/hhD1Zw60tlGmnEieC3hZl8Rqrm+U50wtq2CSTHwXwlTy95E7xk TGa4KustxWwEQNpI+OINInoMVTMfNGYx9pPm0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9jcL402HXfmlzonKdCIzeVQZ60+q+bqYV6QCyhds2f4=; b=EVzARx2R9iw8OOgiLZZ1Fq26KMJXTqsjNjpoeKYCPLzcYi4dKZyfITGLs2tr+H8K9J fmmIBJ8qt4Q2aochtNGB4wMFVNdjun5SWNZsyt6H4AqVgVmrBpV4EOK1okwGr26IEfxB INuJbARYsAB+hqbpEb2CrBQzV0NAAvQphrI+yiRl4WaZSsK46Pl9RB6tyNOv/Fe4SjeV /WUttbape2sx2mr6GpWHi4CHnWnriq62cYqptf/gg7GVKBHn40BunyxHtp9ywyfA+FRa pIGQn1CKtIDye5YbGcl94MRNqW93QfOgoi2yTMZwpyEaldXXOnSWV2j3HTwtHEFeD3q6 2iTQ== X-Gm-Message-State: AOAM530EQwKN/wl6T2p7NvQzcwpXqYIdcgLwL4cWzKUlbFNusSRbnC6p tNL7ZEXA2o6celhMeJYsK4GtQ86YPMmE9g== X-Received: by 2002:a05:6402:c83:: with SMTP id cm3mr22886458edb.189.1605651974246; Tue, 17 Nov 2020 14:26:14 -0800 (PST) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com. [209.85.128.46]) by smtp.gmail.com with ESMTPSA id v16sm917834ejx.57.2020.11.17.14.26.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Nov 2020 14:26:13 -0800 (PST) Received: by mail-wm1-f46.google.com with SMTP id d142so245821wmd.4 for ; Tue, 17 Nov 2020 14:26:13 -0800 (PST) X-Received: by 2002:a1c:e4d4:: with SMTP id b203mr1143549wmh.141.1605651972869; Tue, 17 Nov 2020 14:26:12 -0800 (PST) MIME-Version: 1.0 References: <20201111011745.2016-1-sonnysasaka@chromium.org> <20201111011745.2016-7-sonnysasaka@chromium.org> <1273e316b9ec06061a1065c04521ae91ab379af1.camel@hadess.net> In-Reply-To: From: Sonny Sasaka Date: Tue, 17 Nov 2020 14:26:01 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH BlueZ v2 7/7] battery: Implement Battery Provider API To: Bastien Nocera Cc: BlueZ , Miao-chen Chou Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Bastien, On Tue, Nov 17, 2020 at 2:22 PM Sonny Sasaka wrote: > > Hi Bastien, > > More responses below. > > On Tue, Nov 17, 2020 at 10:01 AM Bastien Nocera wrote: > > > > On Tue, 2020-11-17 at 11:51 +0100, Bastien Nocera wrote: > > > < > > > didn't review the code in depth, but, having written this > > > mechanism > > > for Bluetooth battery reporting, I think that this is the right way > > > to > > > go to allow daemons like pulseaudio to report battery status. > > > > It would also be useful to know what external components, or internal > > plugins you expect to feed this API. > BlueZ could have internal plugins to read proprietary battery > reporting, e.g. JBL speakers and Bose QC35. Adding to mention that in Chrome OS we also plan to have a plugin to decode Pixel Buds 2 multiple battery values (left, right, and case). We have not yet decided whether this is going to be internal plugin or external client though. But generally the API should allow this kind of feature as well. > > > > > Apparently HSP/HFP, for example, provide more information that what can > > be expressed with the Battery1 API, whether it is charging or not, or > > whether a battery level is unknown, etc. > > > > So I would say that, even if the current battery API is extended, we > > need to make sure that the D-Bus API to feed new data is extensible > > enough to allow new properties, and they don't need to be added > > separately to org.bluez.BatteryProvider1 or org.bluez.Battery1. > I proposed the API to start simple, but I believe that it can always > be extended as we need in the future so I don't think the additional > features need to be coded now. I documented how this API could evolve > in the future by extending other features as well in this design > document that I shared with Luiz and Marcel: > https://docs.google.com/document/d/1OV4sjHLhTzB91D7LyTVT6R0SX2vXwSG1IA3q5yWQWps. > > >