OSDN Git Service

AVRCP: Fix setting reserved bit in GetCapabilities response
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 5 Jun 2013 07:04:04 +0000 (14:04 +0700)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 11 Jun 2013 12:26:40 +0000 (15:26 +0300)
EventID 0x00 is reserved:

< ACL data: handle 12 flags 0x00 dlen 25
    L2CAP(d): cid 0x0541 len 21 [psm 23]
      AVCTP Control: Response : pt 0x00 transaction 2 pid 0x110e
        AV/C: Stable: address 0x48 opcode 0x00
          Subunit: Panel
          Opcode: Vendor Dependent
          Company ID: 0x001958
          AVRCP: GetCapabilities: pt Single len 0x0008
            CapabilityID: 0x03 (EventsID)
            CapabilityCount: 0x06
            EventsID: 0x00 (Reserved)
            EventsID: 0x01 (EVENT_PLAYBACK_STATUS_CHANGED)
            EventsID: 0x02 (EVENT_TRACK_CHANGED)
            EventsID: 0x03 (EVENT_TRACK_REACHED_END)
            EventsID: 0x04 (EVENT_TRACK_REACHED_START)
            EventsID: 0x08 (EVENT_PLAYER_APPLICATION_SETTING_CHANGED)

profiles/audio/avrcp.c

index 86939e4..7a20186 100644 (file)
@@ -896,7 +896,7 @@ static uint8_t avrcp_handle_get_capabilities(struct avrcp *session,
 
                return AVC_CTYPE_STABLE;
        case CAP_EVENTS_SUPPORTED:
-               for (i = 0; i <= AVRCP_EVENT_LAST; i++) {
+               for (i = 1; i <= AVRCP_EVENT_LAST; i++) {
                        if (session->supported_events & (1 << i)) {
                                pdu->params[1]++;
                                pdu->params[pdu->params[1] + 1] = i;