diff --git a/tools/parser/avrcp.c b/tools/parser/avrcp.c
index 029a12a..02e7325 100644
--- a/tools/parser/avrcp.c
+++ b/tools/parser/avrcp.c
}
}
+static const char *scope2str(uint8_t scope)
+{
+ switch (scope) {
+ case AVRCP_MEDIA_PLAYER_LIST:
+ return "Media Player List";
+ case AVRCP_MEDIA_PLAYER_VFS:
+ return "Media Player Virtual Filesystem";
+ case AVRCP_MEDIA_SEARCH:
+ return "Search";
+ case AVRCP_MEDIA_NOW_PLAYING:
+ return "Now Playing";
+ default:
+ return "Unknown";
+ }
+}
+
+static void avrcp_play_item_dump(int level, struct frame *frm,
+ uint8_t ctype, uint16_t len)
+{
+ uint64_t uid;
+ uint32_t uidcounter;
+ uint8_t scope, status;
+
+ p_indent(level, frm);
+
+ if (ctype > AVC_CTYPE_GENERAL_INQUIRY)
+ goto response;
+
+ if (len < 13) {
+ printf("PDU Malformed\n");
+ raw_dump(level, frm);
+ return;
+ }
+
+ scope = get_u8(frm);
+ printf("Scope: 0x%02x (%s)", scope, scope2str(scope));
+
+ p_indent(level, frm);
+
+ uid = get_u64(frm);
+ printf("UID: 0x%16" PRIx64 " (%" PRIu64 ")\n", uid, uid);
+
+ p_indent(level, frm);
+
+ uidcounter = get_u16(frm);
+ printf("UIDCounter: 0x%04x (%u)\n", uidcounter, uidcounter);
+
+ return;
+
+response:
+ status = get_u8(frm);
+ printf("Status: 0x%02x (%s)\n", status, error2str(status));
+}
+
static void avrcp_pdu_dump(int level, struct frame *frm, uint8_t ctype)
{
uint8_t pduid, pt;
case AVRCP_SET_ADDRESSED_PLAYER:
avrcp_set_addressed_player(level + 1, frm, ctype, len);
break;
+ case AVRCP_PLAY_ITEM:
+ avrcp_play_item_dump(level + 1, frm, ctype, len);
+ break;
default:
raw_dump(level, frm);
}
}
}
-static const char *scope2str(uint8_t scope)
-{
- switch (scope) {
- case AVRCP_MEDIA_PLAYER_LIST:
- return "Media Player List";
- case AVRCP_MEDIA_PLAYER_VFS:
- return "Media Player Virtual Filesystem";
- case AVRCP_MEDIA_SEARCH:
- return "Search";
- case AVRCP_MEDIA_NOW_PLAYING:
- return "Now Playing";
- default:
- return "Unknown";
- }
-}
-
static const char *playertype2str(uint8_t type)
{
switch (type & 0x0F) {