From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> This function can be used to generate ListPlayerValues response PDUs. --- android/avrcp-lib.c | 16 ++++++++++++++++ android/avrcp-lib.h | 2 ++ 2 files changed, 18 insertions(+) diff --git a/android/avrcp-lib.c b/android/avrcp-lib.c index 05ec329..fe3205e 100644 --- a/android/avrcp-lib.c +++ b/android/avrcp-lib.c @@ -864,6 +864,22 @@ int avrcp_get_player_attribute_text_rsp(struct avrcp *session, pdu, length); } +int avrcp_list_player_values_rsp(struct avrcp *session, uint8_t transaction, + uint8_t number, uint8_t *values) +{ + uint8_t pdu[AVRCP_ATTRIBUTE_LAST + 1]; + + if (number > AVRCP_ATTRIBUTE_LAST) + return -EINVAL; + + pdu[0] = number; + memcpy(&pdu[1], values, number); + + return avrcp_send(session, transaction, AVC_CTYPE_STABLE, + AVC_SUBUNIT_PANEL, AVRCP_LIST_PLAYER_VALUES, + pdu, number + 1); +} + int avrcp_get_play_status_rsp(struct avrcp *session, uint8_t transaction, uint32_t position, uint32_t duration, uint8_t status) diff --git a/android/avrcp-lib.h b/android/avrcp-lib.h index b53b916..a9485b2 100644 --- a/android/avrcp-lib.h +++ b/android/avrcp-lib.h @@ -235,6 +235,8 @@ int avrcp_list_player_attributes_rsp(struct avrcp *session, uint8_t transaction, int avrcp_get_player_attribute_text_rsp(struct avrcp *session, uint8_t transaction, uint8_t number, uint8_t *attrs, const char **text); +int avrcp_list_player_values_rsp(struct avrcp *session, uint8_t transaction, + uint8_t number, uint8_t *values); int avrcp_get_play_status_rsp(struct avrcp *session, uint8_t transaction, uint32_t position, uint32_t duration, uint8_t status); -- 1.8.5.3 -- 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