All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sonny Sasaka <sonnysasaka@chromium.org>
To: Bastien Nocera <hadess@hadess.net>
Cc: BlueZ <linux-bluetooth@vger.kernel.org>,
	Miao-chen Chou <mcchou@chromium.org>
Subject: Re: [PATCH BlueZ v2 7/7] battery: Implement Battery Provider API
Date: Thu, 19 Nov 2020 12:25:13 -0800	[thread overview]
Message-ID: <CAO271mkJuCyLsCKnLfo61chEkTsY-hanU-1F5i9NkTWY3uhuwQ@mail.gmail.com> (raw)
In-Reply-To: <d4ab4a00d074c9f7b80b52eacde380037ac87ff6.camel@hadess.net>

Hi Bastien,

On Thu, Nov 19, 2020 at 2:53 AM Bastien Nocera <hadess@hadess.net> wrote:
>
> 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 <hadess@hadess.net>
> > wrote:
> > >
> > > On Tue, 2020-11-17 at 11:51 +0100, Bastien Nocera wrote:
> > > > <
> > > > <snip> 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.
Some proprietary protocols may not want to become an internal BlueZ
plugin, for example because it is developed closed source. D-Bus API
is useful to support these cases.
>
> >
> > >
> > > 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.
I am considering doing this. Let me think it through to make sure we
don't stumble on anything in the future if we do it this way.

>
> >
> > >
>
>

  reply	other threads:[~2020-11-19 20:25 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11  1:17 [PATCH BlueZ v2 1/7] battery: Add the internal Battery API Sonny Sasaka
2020-11-11  1:17 ` [PATCH BlueZ v2 2/7] profiles/battery: Refactor to use battery library Sonny Sasaka
2020-11-11  1:17 ` [PATCH BlueZ v2 3/7] battery: Add Source property to Battery API Sonny Sasaka
2020-11-11  1:17 ` [PATCH BlueZ v2 4/7] doc: Add Battery Provider API doc Sonny Sasaka
2020-11-17  0:16   ` Luiz Augusto von Dentz
2020-11-17 22:37     ` Sonny Sasaka
2020-11-17 23:01       ` Luiz Augusto von Dentz
2020-11-17 23:16         ` Sonny Sasaka
2020-11-17 23:33           ` Luiz Augusto von Dentz
2020-11-17 23:55             ` Sonny Sasaka
2020-11-20 21:00               ` Sonny Sasaka
2020-11-11  1:17 ` [PATCH BlueZ v2 5/7] test: Add test app for Battery Provider API Sonny Sasaka
2020-11-11  1:17 ` [PATCH BlueZ v2 6/7] adapter: Add a public function to find a device by path Sonny Sasaka
2020-11-11  1:17 ` [PATCH BlueZ v2 7/7] battery: Implement Battery Provider API Sonny Sasaka
2020-11-17 10:51   ` Bastien Nocera
2020-11-17 18:01     ` Bastien Nocera
2020-11-17 22:22       ` Sonny Sasaka
2020-11-17 22:26         ` Sonny Sasaka
2020-11-19 10:53         ` Bastien Nocera
2020-11-19 20:25           ` Sonny Sasaka [this message]
2020-11-17 22:16     ` Sonny Sasaka
2020-11-17 22:26       ` Luiz Augusto von Dentz
2020-11-19 20:15         ` Sonny Sasaka
2020-11-19 23:56           ` Luiz Augusto von Dentz
2020-11-20 20:33             ` Sonny Sasaka
2020-11-19 10:44       ` Bastien Nocera
2020-11-19 20:20         ` Sonny Sasaka
2020-11-20 10:33           ` Bastien Nocera
2020-11-20 19:41             ` Sonny Sasaka
2020-11-11  1:28 ` [BlueZ,v2,1/7] battery: Add the internal Battery API bluez.test.bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAO271mkJuCyLsCKnLfo61chEkTsY-hanU-1F5i9NkTWY3uhuwQ@mail.gmail.com \
    --to=sonnysasaka@chromium.org \
    --cc=hadess@hadess.net \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=mcchou@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.