Re: [PATCH v3 18/22] avrcp: send response for registered events

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

 



Hi Luiz,

On Thu, Aug 11, 2011 at 5:15 AM, Luiz Augusto von Dentz
<luiz.dentz@xxxxxxxxx> wrote:
> Hi Lucas,
>
> On Wed, Aug 10, 2011 at 4:06 PM, Lucas De Marchi
> <lucas.demarchi@xxxxxxxxxxxxxx> wrote:
>>  static void mp_get_playback_status(struct media_player *mp, uint8_t *status,
>>                                        uint32_t *elapsed, uint32_t *track_len)
>>  {
>> @@ -754,6 +823,13 @@ static void mp_set_playback_status(struct control *control, uint8_t status,
>>                return;
>>
>>        mp->status = status;
>> +
>> +       if (control->state == AVCTP_STATE_CONNECTED &&  !control->target &&
>> +                       (control->registered_events &
>> +                               (1 << AVRCP_EVENT_PLAYBACK_STATUS_CHANGED))) {
>> +               avctp_send_event(control, AVRCP_EVENT_PLAYBACK_STATUS_CHANGED,
>> +                                                               &status);
>> +       }
>
> Are you sure it would be valid to call mp_set_playback_status when
> acting as a controller? Im afraid we should not cache anything, or

No it's not valid. But in all cases it's implemented in this patch
we're actually acting as target, not controller. The control->target
fields refers to the remote device.

> perhaps not even register MediaPlayer interface in case the device is
> a target.

We can't since MediaPlayer accepts commands before it's connected.

Lucas De Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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