From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx> --- android/avctp.c | 13 +++++++++++++ android/avctp.h | 3 +++ 2 files changed, 16 insertions(+) diff --git a/android/avctp.c b/android/avctp.c index 1e414d1..57a8c23 100644 --- a/android/avctp.c +++ b/android/avctp.c @@ -1266,6 +1266,19 @@ int avctp_send_vendordep_req(struct avctp *session, uint8_t code, func, user_data); } +int avctp_send_unit_info_req(struct avctp *session, avctp_rsp_cb func, + void *user_data) +{ + uint8_t operands[5]; + + memset(operands, 0xFF, sizeof(operands)); + + return avctp_send_req(session, AVC_CTYPE_STATUS, + AVC_SUBUNIT_UNIT, AVC_OP_UNITINFO, + operands, sizeof(operands), + func, user_data); +} + unsigned int avctp_register_passthrough_handler(struct avctp *session, avctp_passthrough_cb cb, void *user_data) diff --git a/android/avctp.h b/android/avctp.h index dfa0ca6..7496e53 100644 --- a/android/avctp.h +++ b/android/avctp.h @@ -46,6 +46,7 @@ /* subunits of interest */ #define AVC_SUBUNIT_PANEL 0x09 +#define AVC_SUBUNIT_UNIT 0x1f /* operands in passthrough commands */ #define AVC_SELECT 0x00 @@ -170,3 +171,5 @@ int avctp_send_vendordep_req(struct avctp *session, uint8_t code, int avctp_send_browsing_req(struct avctp *session, uint8_t *operands, size_t operand_count, avctp_browsing_rsp_cb func, void *user_data); +int avctp_send_unit_info_req(struct avctp *session, avctp_rsp_cb func, + void *user_data); -- 1.8.3.2 -- 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