linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH v3 6/6] a2dp: Reword LastUsed
Date: Tue, 7 May 2019 13:13:17 +0300	[thread overview]
Message-ID: <CABBYNZJz1jXF6DtTerwZz4cpKYpzDP7TyO1fjnYTyEJ026M3LQ@mail.gmail.com> (raw)
In-Reply-To: <20190507085255.zplj5ddopl3z5n2v@pali>

Hi Pali,

On Tue, May 7, 2019 at 11:52 AM Pali Rohár <pali.rohar@gmail.com> wrote:
>
> On Monday 06 May 2019 15:02:25 Pali Rohár wrote:
> > On Monday 06 May 2019 15:46:03 Luiz Augusto von Dentz wrote:
> > > Hi Pali,
> > >
> > > I hope this fixes the problems you have been seeing, it should at
> > > least take care of the issues with wrong order of SelectConfiguration
> > > and restoring the exact same endpoint used last time.
> >
> > Hi Luiz! Great, this should make bluez to be more deterministic.
>
> Hi! Now I looked at it and in cache file I see:
>
> LastUsed=04:01
>
> What would happen when A2DP application (e.g. pulseaudio) register DBus
> endpoints in different order? Or e.g. do not register some endpoints due
> to missing codec librayr (aptX).
>
> I guess that in this case LastUsed information stops working...

It would most likely fail at SelectConfiguration and then try with the
other endpoints.

>
> Should not be there stored rather dbus endpoint name identifier?

Originally I tried to avoid having the local endpoints because of this
problem, but now that SelectConfiguration can fail it shouldn't really
be a problem. At least with the seid if you have a system that didn't
changed the order or number of endpoints it will keep working as
expected, if we choose to encode the D-Bus connection, etc, as soon as
PA is restarted, the system is rebooted, etc, the D-Bus connection may
have changed making the stored values in LastUsed invalid. Anyway
chances are the LastUsed is only invalidated if you update PA, in
which case there could be new endpoints or a change in their order and
package can also provide a script to clear the LastUsed if that
happens, but then again LastUsed setting does not actually store the
configuration just the endpoint so SelectConfiguration has control
over the configuration.

-- 
Luiz Augusto von Dentz

  reply	other threads:[~2019-05-07 10:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 12:43 [PATCH v3 1/6] a2dp: Fix crash when endpoint respond with an error Luiz Augusto von Dentz
2019-05-06 12:43 ` [PATCH v3 2/6] a2dp: Try aborting when switching endpoints Luiz Augusto von Dentz
2019-05-06 12:43 ` [PATCH v3 3/6] a2dp: Update last used on open indication Luiz Augusto von Dentz
2019-05-06 12:43 ` [PATCH v3 4/6] a2dp: Fix reconfiguring when there multiple devices connected Luiz Augusto von Dentz
2019-05-06 12:43 ` [PATCH v3 5/6] a2dp: Fix useless statement Luiz Augusto von Dentz
2019-05-06 12:43 ` [PATCH v3 6/6] a2dp: Reword LastUsed Luiz Augusto von Dentz
2019-05-06 12:46   ` Luiz Augusto von Dentz
2019-05-06 13:02     ` Pali Rohár
2019-05-07  8:52       ` Pali Rohár
2019-05-07 10:13         ` Luiz Augusto von Dentz [this message]
2019-05-07 18:57           ` Pali Rohár
2019-06-07 13:04             ` Pali Rohár
2019-06-07 15:18               ` Luiz Augusto von Dentz
2019-06-10 12:35                 ` Pali Rohár
2019-06-10 13:02                   ` Luiz Augusto von Dentz
2019-05-07 10:17 ` [PATCH v3 1/6] a2dp: Fix crash when endpoint respond with an error Luiz Augusto von Dentz

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=CABBYNZJz1jXF6DtTerwZz4cpKYpzDP7TyO1fjnYTyEJ026M3LQ@mail.gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    /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).