diff options
author | Vikrampal Yadav <vikram.pal@samsung.com> | 2014-08-26 19:50:52 +0530 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-09-05 13:16:43 +0300 |
commit | ab77c4b6f3645e432500aed6cad793366322b8fd (patch) | |
tree | 3d1c373eead94d39ee3df853dd0a349602043615 /monitor/avctp.c | |
parent | 58918f0ef5d635cb2a2a8b7c03e6fecaa63be8ea (diff) | |
download | bluez-ab77c4b6f3645e432500aed6cad793366322b8fd.tar.gz |
monitor: Add AVRCP InformDisplayableCharacterSet support
Support for decoding AVRCP InformDisplayableCharacterSet added in
Bluetooth monitor.
Diffstat (limited to 'monitor/avctp.c')
-rw-r--r-- | monitor/avctp.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/monitor/avctp.c b/monitor/avctp.c index b4dd81738..4968dcf81 100644 --- a/monitor/avctp.c +++ b/monitor/avctp.c @@ -861,6 +861,32 @@ response: return true; } +static bool avrcp_displayable_charset(struct l2cap_frame *frame, uint8_t ctype, + uint8_t len, uint8_t indent) +{ + uint8_t num; + + if (ctype > AVC_CTYPE_GENERAL_INQUIRY) + return true; + + if (!l2cap_frame_get_u8(frame, &num)) + return false; + + print_field("%*cCharsetCount: 0x%02x", (indent - 8), ' ', num); + + for (; num > 0; num--) { + uint16_t charset; + + if (!l2cap_frame_get_be16(frame, &charset)) + return false; + + print_field("%*cCharsetID: 0x%04x (%s)", (indent - 8), + ' ', charset, charset2str(charset)); + } + + return true; +} + struct avrcp_ctrl_pdu_data { uint8_t pduid; bool (*func) (struct l2cap_frame *frame, uint8_t ctype, uint8_t len, @@ -875,6 +901,7 @@ static const struct avrcp_ctrl_pdu_data avrcp_ctrl_pdu_table[] = { { 0x14, avrcp_set_player_value }, { 0x15, avrcp_get_player_attribute_text }, { 0x16, avrcp_get_player_value_text }, + { 0x17, avrcp_displayable_charset }, { } }; |