From d91664ea97ee7bc3aa77b05507b6f5f032275ec9 Mon Sep 17 00:00:00 2001 From: Milanka Ringwald Date: Tue, 14 Jan 2025 14:09:39 +0100 Subject: [PATCH] avrcp_controller: added send generic pass through command --- CHANGELOG.md | 1 + src/classic/avrcp_controller.c | 5 +++++ src/classic/avrcp_controller.h | 8 ++++++++ 3 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5e77fb89..be04326b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## Unreleased ### Added - GAP: simulate HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE if HCI Remote Name Request fails +- AVRCP Controller: Added send generic PASS THROUGH command ### Fixed - GAP: store link key for standard/non-SSP pairing ### Changed diff --git a/src/classic/avrcp_controller.c b/src/classic/avrcp_controller.c index 9e1f0177a..622ecf496 100644 --- a/src/classic/avrcp_controller.c +++ b/src/classic/avrcp_controller.c @@ -725,10 +725,15 @@ static uint8_t avrcp_controller_request_pass_through_press_control_cmd(uint16_t return ERROR_CODE_SUCCESS; } + static uint8_t request_single_pass_through_press_control_cmd(uint16_t avrcp_cid, avrcp_operation_id_t opid, uint16_t playback_speed){ return avrcp_controller_request_pass_through_press_control_cmd(avrcp_cid, opid, playback_speed, false); } +uint8_t avrcp_controller_send_pass_through_cmd(uint16_t avrcp_cid, avrcp_operation_id_t opid){ + return avrcp_controller_request_pass_through_press_control_cmd(avrcp_cid, opid, 0, false); +} + static uint8_t request_continuous_pass_through_press_control_cmd(uint16_t avrcp_cid, avrcp_operation_id_t opid, uint16_t playback_speed){ return avrcp_controller_request_pass_through_press_control_cmd(avrcp_cid, opid, playback_speed, true); } diff --git a/src/classic/avrcp_controller.h b/src/classic/avrcp_controller.h index 6e57cba17..34456b32e 100644 --- a/src/classic/avrcp_controller.h +++ b/src/classic/avrcp_controller.h @@ -140,6 +140,14 @@ uint8_t avrcp_controller_start_press_and_hold_cmd(uint16_t avrcp_cid, avrcp_oper */ uint8_t avrcp_controller_release_press_and_hold_cmd(uint16_t avrcp_cid); +/** + * Send PASS THROUGH command. Event AVRCP_SUBEVENT_OPERATION_COMPLETE returns operation id and status. + * @param avrcp_cid + * @param operation_id + * @return + */ +uint8_t avrcp_controller_send_pass_through_cmd(uint16_t avrcp_cid, avrcp_operation_id_t operation_id); + /** * @brief Play. Event AVRCP_SUBEVENT_OPERATION_COMPLETE returns operation id and status. * @param avrcp_cid