All of lore.kernel.org
 help / color / mirror / Atom feed
* AVRCPv1.3 NOTIFY from CT per notification from TG
@ 2012-07-20 20:39 Pavan Savoy
  2012-07-21 16:45 ` Lucas De Marchi
  0 siblings, 1 reply; 4+ messages in thread
From: Pavan Savoy @ 2012-07-20 20:39 UTC (permalink / raw)
  To: linux-bluetooth, luiz.von.dentz

Hi,

Went through the archives, don't see this being discussed.
I read the AVRCPv1.3 spec section mentioned below and to me it looks
like it's been implemented the way it is supposed to be, However, the
question is WHY ?

        /* Unregister event as per AVRCP 1.3 spec, section 5.4.2 */
        player->registered_events ^= 1 << id;

Does that mean - A car-kit product would keep asking for new
notifications time and again ? That too, It needs to be requesting for
notification for each individual EVENT_ID again and again ? Since 1
notification request is good for 1 notification & for 1 particular
event ?

Wouldn't this make the devices more chatty then they are supposed to
be? Why not enable/disable notifications - And capability to OR
various event IDs ?

Thanks & Regards,
Pavan Savoy.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: AVRCPv1.3 NOTIFY from CT per notification from TG
  2012-07-20 20:39 AVRCPv1.3 NOTIFY from CT per notification from TG Pavan Savoy
@ 2012-07-21 16:45 ` Lucas De Marchi
  2012-07-22  2:07   ` Pavan Savoy
  0 siblings, 1 reply; 4+ messages in thread
From: Lucas De Marchi @ 2012-07-21 16:45 UTC (permalink / raw)
  To: Pavan Savoy; +Cc: linux-bluetooth, luiz.von.dentz

Hi Pavan,

On Fri, Jul 20, 2012 at 5:39 PM, Pavan Savoy <pavan_savoy@sify.com> wrote:
> Hi,
>
> Went through the archives, don't see this being discussed.
> I read the AVRCPv1.3 spec section mentioned below and to me it looks
> like it's been implemented the way it is supposed to be, However, the
> question is WHY ?
>
>         /* Unregister event as per AVRCP 1.3 spec, section 5.4.2 */
>         player->registered_events ^= 1 << id;
>
> Does that mean - A car-kit product would keep asking for new
> notifications time and again ? That too, It needs to be requesting for
> notification for each individual EVENT_ID again and again ? Since 1
> notification request is good for 1 notification & for 1 particular
> event ?

Yes, TG side can't send an event CT was not registered to. And that
means we have to remove the registered event after it has been
generated. It's indeed not well designed IMO, but it is what other
devices are supposed to implement. Once they receive a notification,
if they are still interested in a certain even, they register again to
that event. It's racy, but devices out there use it expecting this
behavior.

>
> Wouldn't this make the devices more chatty then they are supposed to
> be? Why not enable/disable notifications - And capability to OR
> various event IDs ?

Not sure I understand what you mean here.


Lucas De Marchi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: AVRCPv1.3 NOTIFY from CT per notification from TG
  2012-07-21 16:45 ` Lucas De Marchi
@ 2012-07-22  2:07   ` Pavan Savoy
  2012-07-22  9:11     ` Von Dentz, Luiz
  0 siblings, 1 reply; 4+ messages in thread
From: Pavan Savoy @ 2012-07-22  2:07 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: linux-bluetooth, luiz.von.dentz

On Sat, Jul 21, 2012 at 11:45 AM, Lucas De Marchi
<lucas.demarchi@profusion.mobi> wrote:
> Hi Pavan,
>
> On Fri, Jul 20, 2012 at 5:39 PM, Pavan Savoy <pavan_savoy@sify.com> wrote:
>> Hi,
>>
>> Went through the archives, don't see this being discussed.
>> I read the AVRCPv1.3 spec section mentioned below and to me it looks
>> like it's been implemented the way it is supposed to be, However, the
>> question is WHY ?
>>
>>         /* Unregister event as per AVRCP 1.3 spec, section 5.4.2 */
>>         player->registered_events ^= 1 << id;
>>
>> Does that mean - A car-kit product would keep asking for new
>> notifications time and again ? That too, It needs to be requesting for
>> notification for each individual EVENT_ID again and again ? Since 1
>> notification request is good for 1 notification & for 1 particular
>> event ?
>
> Yes, TG side can't send an event CT was not registered to. And that
> means we have to remove the registered event after it has been
> generated. It's indeed not well designed IMO, but it is what other
> devices are supposed to implement. Once they receive a notification,
> if they are still interested in a certain even, they register again to
> that event. It's racy, but devices out there use it expecting this
> behavior.
>
>>
>> Wouldn't this make the devices more chatty then they are supposed to
>> be? Why not enable/disable notifications - And capability to OR
>> various event IDs ?
>
> Not sure I understand what you mean here.

What I meant here is If I design a car-kit in which I plan to display say,
"Playing My-Song"

Now, I am interested to know whether the "Playing" needs to be
displayed or something like "Paused" along with another bit of info,
which is My-Song.
So, say to begin with I register for track-changed notification, now
to read the attributes of song again, but If I have to display
"Paused" then I will have to register for "Play Status" & I can get
only 1 of them at a time ?

I wonder how it should be implemented that's all..

>
> Lucas De Marchi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: AVRCPv1.3 NOTIFY from CT per notification from TG
  2012-07-22  2:07   ` Pavan Savoy
@ 2012-07-22  9:11     ` Von Dentz, Luiz
  0 siblings, 0 replies; 4+ messages in thread
From: Von Dentz, Luiz @ 2012-07-22  9:11 UTC (permalink / raw)
  To: Pavan Savoy; +Cc: Lucas De Marchi, linux-bluetooth

Hi Pavan

On Sun, Jul 22, 2012 at 5:07 AM, Pavan Savoy <pavan_savoy@sify.com> wrote:
> Now, I am interested to know whether the "Playing" needs to be
> displayed or something like "Paused" along with another bit of info,
> which is My-Song.
> So, say to begin with I register for track-changed notification, now
> to read the attributes of song again, but If I have to display
> "Paused" then I will have to register for "Play Status" & I can get
> only 1 of them at a time ?

You can register multiple events simultaneously, the only problem is
that you need to register again every time it changes. Apparently this
idea of registration not being persistent came from AV/C spec, while
doing support for VolumeChanged event I actually step in it see patch:
AVRCP: Fix not registering to VolumeChanged event again when notified

Its pretty broken design if you ask me, but one that we have to live with...

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-22  9:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-20 20:39 AVRCPv1.3 NOTIFY from CT per notification from TG Pavan Savoy
2012-07-21 16:45 ` Lucas De Marchi
2012-07-22  2:07   ` Pavan Savoy
2012-07-22  9:11     ` Von Dentz, Luiz

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.