Re: [Bluez PATCH v1 1/2] doc/media-api: Add Press method for MediaPlayer1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luiz,

On Tue, 1 Sep 2020 at 14:30, Archie Pusaka <apusaka@xxxxxxxxxx> wrote:
>
> On Tue, 1 Sep 2020 at 13:42, Luiz Augusto von Dentz
> <luiz.dentz@xxxxxxxxx> wrote:
> >
> > Hi Archie,
> >
> > On Mon, Aug 31, 2020 at 10:33 PM Archie Pusaka <apusaka@xxxxxxxxxx> wrote:
> > >
> > > Hi Luiz,
> > >
> > > On Tue, 1 Sep 2020 at 13:20, Luiz Augusto von Dentz
> > > <luiz.dentz@xxxxxxxxx> wrote:
> > > >
> > > > Hi Archie,
> > > >
> > > > On Mon, Aug 31, 2020 at 8:19 PM Archie Pusaka <apusaka@xxxxxxxxxx> wrote:
> > > > >
> > > > > Hi Luiz,
> > > > >
> > > > > The reason we introduced this method is because we need to send some
> > > > > of AVRCP category 2 passthroughs in order to be able to qualify the
> > > > > AVRCP absolute volume control as an audio source, despite we don't
> > > > > actually plan to send any passthrough in the practice.
> > > >
> > > > I wonder what those are, are they volume up/down?
> > > Yes, volume up/down and mute are the ones that are unique to category
> > > 2, but there are also some other buttons which are included in
> > > category 2 as well but not unique to it, for example button 0 - 9,
> > > help, and power.
> >
> > Weird, there are dedicated commands for setting absolut volume, not
> > sure why one would use volume up/down to qualify? Or is that testing
> > any button that belongs to category 2? Anyway it would be nice to know
> > what test that is and what is the expected behavior the test case
> > expects from us.
>
> Weird, yes. Sending absolute volume command capability is declared in
> the AVRCP ICS 2/50, but it can only be selected if 2/8 is also
> selected, which is sending passthrough command for category 2.
> Therefore, we also need to be able to send a category 2 passthrough.
>
> The test itself is AVRCP/CT/PTT/BV-02-I. This is the test to see
> whether we can send a category 2 passthrough, not the one to see
> whether we can send the absolute volume command. The test asks us to
> send every category 2 passthrough we declared in the ICS file (table
> 4). There should be at least one passthrough declared.
>
> >
> > >
> > > >
> > > > > Therefore, which passthrough we send is actually not important (to
> > > > > us), as long as we can do that to satisfy the requirement.
> > > > > However, I see that there are over 50 passthroughs across category 1 -
> > > > > 4, and thought that it would be cumbersome to have a different method
> > > > > for each key if one day we decided to support them all, hence the
> > > > > generic method.
> > > >
> > > > Yep, but there are button presses so things gets a little more
> > > > complicated if we need to emulate press/hold/release semantics.
> > > For now, I don't think having a separate method for each key will make
> > > it easier if we need to emulate hold and release semantics.
> > >
> > > Could we have 3 methods as follows, all have avc_key as a param:
> > > (a) press. This means BlueZ will auto-release it within a short amount of time
> > > (b) hold. Bluez wouldn't release it unless it received (c).
> > > (c) release. Bluez will release the previously held button.
> > > What do you think?
> >
> > I'm fine with that, we might have to start the status of each request
> > though, also the holding should not last longer than 2 seconds if I
> > recall correctly.
>
> Then I shall try to have this implemented.
> Btw I only took a quick glance, but I did not find the 2 seconds
> limitation in the spec.

I found it in the AV/C Panel Subunit specification from 1394 trade
association. It says we want to support "hold", then we need to
frequently resend the key with "pressed" state, because if 2 seconds
passed without the TG receiving it, then the TG will assume a
"release" state is sent (but is lost).
Also, the specification doesn't support multiple simultaneous button
presses, because we are supposed to send "release" before sending a
new "pressed" key, so I think we don't need to track the status for
each request.

>
> >
> > > >
> > > > > May I have some questions?
> > > > > (1) Why do you prefer a dedicated method per key?
> > > > > (2) Let's say I need to add a dedicated method for a single category 2
> > > > > passthrough key, do you have a key in mind or I can just pick by
> > > > > myself?
> > > > >
> > > > > Thanks,
> > > > > Archie
> > > > >
> > > > >
> > > > > On Tue, 1 Sep 2020 at 01:16, Luiz Augusto von Dentz
> > > > > <luiz.dentz@xxxxxxxxx> wrote:
> > > > > >
> > > > > > Hi Archie,
> > > > > >
> > > > > > On Mon, Aug 31, 2020 at 12:37 AM Archie Pusaka <apusaka@xxxxxxxxxx> wrote:
> > > > > > >
> > > > > > > From: Archie Pusaka <apusaka@xxxxxxxxxxxx>
> > > > > > >
> > > > > > > This allows us to send any passthrough command.
> > > > > > >
> > > > > > > Reviewed-by: Michael Sun <michaelfsun@xxxxxxxxxx>
> > > > > > > ---
> > > > > > >
> > > > > > >  doc/media-api.txt | 8 ++++++++
> > > > > > >  1 file changed, 8 insertions(+)
> > > > > > >
> > > > > > > diff --git a/doc/media-api.txt b/doc/media-api.txt
> > > > > > > index dabc69936..fe7222eef 100644
> > > > > > > --- a/doc/media-api.txt
> > > > > > > +++ b/doc/media-api.txt
> > > > > > > @@ -199,6 +199,14 @@ Methods            void Play()
> > > > > > >                         Possible Errors: org.bluez.Error.NotSupported
> > > > > > >                                          org.bluez.Error.Failed
> > > > > > >
> > > > > > > +               void Press(byte avc_key)
> > > > > > > +
> > > > > > > +                       Press a specific key to send as passthrough command.
> > > > > > > +
> > > > > > > +                       Possible Errors: org.bluez.Error.InvalidArguments
> > > > > > > +                                        org.bluez.Error.NotSupported
> > > > > > > +                                        org.bluez.Error.Failed
> > > > > > > +
> > > > > > >  Properties     string Equalizer [readwrite]
> > > > > > >
> > > > > > >                         Possible values: "off" or "on"
> > > > > > > --
> > > > > > > 2.28.0.402.g5ffc5be6b7-goog
> > > > > >
> > > > > > For now I would prefer to use dedicated method per key or are there
> > > > > > many keys you would like to use from the upper layer?
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Luiz Augusto von Dentz
> > > >
> > > >
> > > >
> > > > --
> > > > Luiz Augusto von Dentz
> > >
> > > Thanks,
> > > Archie
> >
> >
> >
> > --
> > Luiz Augusto von Dentz

Thanks,
Archie



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux