linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali.rohar@gmail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: "Pasi Kärkkäinen" <pasik@iki.fi>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH BlueZ 1/4] doc/media-api: Add RegisterApplication method
Date: Thu, 17 Oct 2019 11:59:57 +0200	[thread overview]
Message-ID: <20191017095957.cce7jzejvn76kwkc@pali> (raw)
In-Reply-To: <20191009131921.ysl3ianpv5e4m677@pali>

On Wednesday 09 October 2019 15:19:21 Pali Rohár wrote:
> On Wednesday 09 October 2019 16:15:59 Luiz Augusto von Dentz wrote:
> > Hi Pali,
> > 
> > On Tue, Oct 8, 2019 at 1:33 PM Pali Rohár <pali.rohar@gmail.com> wrote:
> > >
> > > On Tuesday 08 October 2019 13:28:53 Luiz Augusto von Dentz wrote:
> > > > Hi Pali,
> > > >
> > > > On Mon, Oct 7, 2019 at 5:33 PM Pali Rohár <pali.rohar@gmail.com> wrote:
> > > > >
> > > > > On Sunday 06 October 2019 14:02:45 Pali Rohár wrote:
> > > > > > On Sunday 06 October 2019 13:53:37 Luiz Augusto von Dentz wrote:
> > > > > > > Hi Pali,
> > > > > > >
> > > > > > > On Sun, Oct 6, 2019 at 1:05 PM Pali Rohár <pali.rohar@gmail.com> wrote:
> > > > > > > >
> > > > > > > > On Thursday 03 October 2019 21:18:55 Pasi Kärkkäinen wrote:
> > > > > > > > > Hi,
> > > > > > > > >
> > > > > > > > > On Thu, Aug 29, 2019 at 10:05:13PM +0200, Pali Rohár wrote:
> > > > > > > > > > On Thursday 29 August 2019 15:57:34 Pasi Kärkkäinen wrote:
> > > > > > > > > > > Pali: How does it look with porting the PA patches to use the new interfaces?
> > > > > > > > > >
> > > > > > > > > > Hello, I have not had a time yet to play with these pulseaudio patches
> > > > > > > > > > and porting to the new interface. I guess that I could have more free
> > > > > > > > > > time in the last week of next month.
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > > It seems BlueZ 5.51 has been released meanwhile (http://www.bluez.org/release-of-bluez-5-51/)
> > > > > > > > > So now at least the new interfaces are in a released bluez version.
> > > > > > > >
> > > > > > > > Ok! Today I have looked at this new Bluez API, but seems that there is
> > > > > > > > not only missing some examples or usages with libdbus-1, but also
> > > > > > > > documentation. I have tried to find something how to register endpoints
> > > > > > > > throw GetManagedObjects() via libdbus-1, but seems that there is no
> > > > > > > > usage of it and also unusable documentation for it in libdbus-1. So
> > > > > > > > currently I'm stuck how to use this exotic API in pulseaudio...
> > > > > > >
> > > > > > > It is just another D-Bus method, the only difference is that it
> > > > > > > carries the entire object tree, btw I did add an example of how to
> > > > > > > register Endpoints in python:
> > > > > > >
> > > > > > > https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/test/example-endpoint
> > > > > >
> > > > > > This example uses undocumented property "DelayReporting". What it is doing?
> > > > >
> > > > > Also this new Managed Objects API bring some inconsistency. Codec
> > > > > switching API is available only when bluetoothd was started with
> > > > > --experimental flag, but this new Object API is available also without
> > > > > it. So it just complicated implementation.
> > > > >
> > > > > How could application (e.g. pulseaudio) check if A2DP codec switching is
> > > > > available and based on this decide if via Managed Objects API export
> > > > > more codecs or just only default SBC?
> > > >
> > > > The idea was that this API would be experimental as well but it seems
> > > > it is not,
> > >
> > > No, it is not experimental. Managed Objects API is available also when
> > > bluetoothd is started without --experimental argument.
> > >
> > > > they should go hand in hand with Endpoint objects to ensure
> > > > they will be available as well so we might have to fix this in 5.52,
> > > > too bad we didn't see this before 5.51 went out.
> > >
> > > So... what should applications expects and how they should implement
> > > above decision?
> > 
> > Actually the decision should be based on the presence of
> > RegisterApplication method, if that exists then endpoint switching
> > should be supported as well, so has nothing to do the
> > GetManagedObjects API of the bluetoothd. That said RegisterApplication
> > was not made experimental which kind makes 5.51 broken because it
> > would appear that it endpoint objects would be exposed but when in
> > fact there are not, anyway lets finally have the code to use this
> > interface and then we can remove the experimental flag from
> > MediaEndpoint.
> 
> Ok, so can pulseaudio do following?
> 
> Call RegisterApplication. If success then expects that codec switching
> is possible and via GetManagedObjects exports all available codecs.
> If RegisterApplication fails then fallback to RegisterEndpoint, expects
> that codec switching is not possible and so register only one SBC codec.

Also can we solve this problem in bluez ASAP? Last released bluez
version is due to that non-experimental API broken and once applications
(e.g. pulseaudio) starts using this new API then A2DP without bluetoothd
-E would be broken.

I would propose to remove experimental mark for codec switching API and
release a new bugfix version of bluez, so people would not use released
5.51 broken version... which could prevent breakage of A2DP in future.

> > > > > > > You can also have a look at how our gdbus internal library (uses
> > > > > > > libdbus) utilize it:
> > > > > > >
> > > > > > > https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/gdbus/client.c#n1269
> > > > > > >
> > > > > >
> > > > >
> > > > > --
> > > > > Pali Rohár
> > > > > pali.rohar@gmail.com
> > > >
> > > >
> > > >
> > >
> > > --
> > > Pali Rohár
> > > pali.rohar@gmail.com
> > 
> > 
> > 
> 

-- 
Pali Rohár
pali.rohar@gmail.com

  reply	other threads:[~2019-10-17 10:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-12 15:13 [PATCH BlueZ 1/4] doc/media-api: Add RegisterApplication method Luiz Augusto von Dentz
2019-07-12 15:13 ` [PATCH BlueZ 2/4] media: Add implementation of RegisterApplication Luiz Augusto von Dentz
2019-07-12 15:13 ` [PATCH BlueZ 3/4] test: Add example-endpoint Luiz Augusto von Dentz
2019-07-12 15:13 ` [PATCH BlueZ 4/4] test: Add example-player Luiz Augusto von Dentz
2019-07-13 14:52 ` [PATCH BlueZ 1/4] doc/media-api: Add RegisterApplication method Luiz Augusto von Dentz
2019-07-18 10:00   ` Pali Rohár
2019-07-21 15:55     ` Pali Rohár
2019-08-10  6:54       ` Luiz Augusto von Dentz
2019-08-29 12:57         ` Pasi Kärkkäinen
2019-08-29 20:05           ` Pali Rohár
2019-10-03 18:18             ` Pasi Kärkkäinen
2019-10-06 10:05               ` Pali Rohár
2019-10-06 10:53                 ` Luiz Augusto von Dentz
2019-10-06 10:56                   ` Pali Rohár
2019-10-06 11:14                     ` Luiz Augusto von Dentz
2019-10-06 11:17                       ` Pali Rohár
2019-10-06 18:02                         ` Pali Rohár
2019-10-06 12:02                   ` Pali Rohár
2019-10-07 14:33                     ` Pali Rohár
2019-10-08 10:28                       ` Luiz Augusto von Dentz
2019-10-08 10:33                         ` Pali Rohár
2019-10-09 13:15                           ` Luiz Augusto von Dentz
2019-10-09 13:19                             ` Pali Rohár
2019-10-17  9:59                               ` Pali Rohár [this message]
2019-10-18  8:37                                 ` Pasi Kärkkäinen
2019-10-18 10:55                                   ` Luiz Augusto von Dentz
2019-10-18 11:30                                     ` Pali Rohár
2019-10-09 13:20                     ` Pali Rohár
2019-11-14 11:27                       ` Pali Rohár
2020-04-14 23:07                         ` Undocumented property "DelayReporting" (Was: Re: [PATCH BlueZ 1/4] doc/media-api: Add RegisterApplication method) Pali Rohár

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=20191017095957.cce7jzejvn76kwkc@pali \
    --to=pali.rohar@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=pasik@iki.fi \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).