Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp348686pxb; Thu, 19 Nov 2020 02:53:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJwOS/e7B45rrCjzQGBj7eNDe1lEVE9cgQ1yputELTLrO5AE61v+M4IF532gAFtA11C7JT0L X-Received: by 2002:aa7:cac2:: with SMTP id l2mr30376915edt.141.1605783238545; Thu, 19 Nov 2020 02:53:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605783238; cv=none; d=google.com; s=arc-20160816; b=hnFA7ggrE533IkRocYRvEtpEWdSONzoFyoeBvzj6PlBZULXKW4qUpPTrUjh2fJYlag EBiQaRRQQI4jGv5/ohPEZq/rouOqHlefKuQE/HTzrOOan4B8ch1nqenugRuHSrr+F2C9 01tTB6a84tO6N/Dtoo2+SPt17hOiafTtxUsHZ5BKL0nrIE6AC8e43blYpNqaTvNPHlSC L0bxlYvtgstXUpOFCqOFAJhW7q/9L8w4L+BDSIBmX25dabzv1d3MEAY9ML+vbytyXRk+ AKfBLxPz07hkMAZF1kk+p6W/ONopA/J5AP013sacbZtuytM4ig/OdrqBYjStseznTIbO CP6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=sk/3cEQHXFYce3oAYvBiKC5kVc3iSo+w05U3h8XfYXA=; b=Ugj7V88A74OG2uUkiLwn2av1Fp62mEbpgP/NB+z8YMpWXBMHSRxxn8fcVQGgKtmqoZ JAZgIRpdZSQYj5kJlV1WhncVTw0iegNJQjj1av8hCsFUZNjCj0BMLc16ydhBx2nLMGQW EIUqMIJlEwh0fpEjpzC4V1m4mgKxo24DxefJK/syE5iXx24qPJWAIAB6nr4reoMpuZdN EVPpOxrVgM7XhpjAkpmMOHntUZ6cxOlxWbW7ciSM9/VljJYQCukkglSnieCkqMoc0tSn 8xrbnYltdfGePrmOrrx8pYSeEmmfcl3mVv39NT2MWY+6ttwlsLyPrW61uNFFaQMLmPDC pGSA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si19260723ejm.476.2020.11.19.02.53.32; Thu, 19 Nov 2020 02:53:58 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726759AbgKSKxD (ORCPT + 99 others); Thu, 19 Nov 2020 05:53:03 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:49653 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726751AbgKSKxD (ORCPT ); Thu, 19 Nov 2020 05:53:03 -0500 X-Originating-IP: 82.255.60.242 Received: from [192.168.0.28] (lns-bzn-39-82-255-60-242.adsl.proxad.net [82.255.60.242]) (Authenticated sender: hadess@hadess.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 13E29E000E; Thu, 19 Nov 2020 10:53:00 +0000 (UTC) Message-ID: Subject: Re: [PATCH BlueZ v2 7/7] battery: Implement Battery Provider API From: Bastien Nocera To: Sonny Sasaka Cc: BlueZ , Miao-chen Chou Date: Thu, 19 Nov 2020 11:53:00 +0100 In-Reply-To: References: <20201111011745.2016-1-sonnysasaka@chromium.org> <20201111011745.2016-7-sonnysasaka@chromium.org> <1273e316b9ec06061a1065c04521ae91ab379af1.camel@hadess.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.1 (3.38.1-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org On Tue, 2020-11-17 at 14:22 -0800, 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. But you don't need to go over D-Bus to implement this. > > > > > 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 > . Right. My advice would have been to say "the properties exported by BatteryProvider1 API match the properties exported by the Battery1 API", so you don't need to update 2 APIs separately when the API is extended. > > >