Support for decoding AVRCP InformDisplayableCharacterSet added in Bluetooth monitor. --- monitor/avctp.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/monitor/avctp.c b/monitor/avctp.c index 1bfd9cf..28e1f34 100644 --- a/monitor/avctp.c +++ b/monitor/avctp.c @@ -863,6 +863,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, @@ -877,6 +903,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 }, { } }; -- 1.9.1 -- 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