Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1add75f1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "stack::avrc Check alarm state before setting" into main

parents 9c2f489c 944a9dca
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -82,6 +82,8 @@ static const uint8_t avrc_ctrl_event_map[] = {
#define AVRC_MSG_MASK_IS_VENDOR_CMD 0x01
#define AVRC_MSG_MASK_IS_CONTINUATION_RSP 0x02

static void avrc_start_cmd_timer(uint8_t handle, uint8_t label, uint8_t msg_mask);

/******************************************************************************
 *
 * Function         avrcp_absolute_volume_is_enabled
@@ -216,14 +218,19 @@ void avrc_send_next_vendor_cmd(uint8_t handle) {
 * Returns          Nothing.
 *
 *****************************************************************************/
void avrc_start_cmd_timer(uint8_t handle, uint8_t label, uint8_t msg_mask) {
static void avrc_start_cmd_timer(uint8_t handle, uint8_t label, uint8_t msg_mask) {
  if (!avrc_cb.ccb_int[handle].tle) {
    log::warn("Unable to start response timer handle=0x{:02x} label=0x{:02x} msg_mask:0x{:02x}",
              handle, label, msg_mask);
    return;
  }

  tAVRC_PARAM* param = static_cast<tAVRC_PARAM*>(osi_malloc(sizeof(tAVRC_PARAM)));
  param->handle = handle;
  param->label = label;
  param->msg_mask = msg_mask;

  log::verbose("AVRC: starting timer (handle=0x{:02x}, label=0x{:02x})", handle, label);

  log::verbose("AVRC: starting timer (handle=0x{:02x} label=0x{:02x})", handle, label);
  alarm_set_on_mloop(avrc_cb.ccb_int[handle].tle, AVRC_CMD_TOUT_MS, avrc_process_timeout, param);
}

+0 −1
Original line number Diff line number Diff line
@@ -159,7 +159,6 @@ tAVRC_STS avrc_pars_pass_thru(tAVRC_MSG_PASS* p_msg, uint16_t* p_vendor_unique_i
uint8_t avrc_opcode_from_pdu(uint8_t pdu);
bool avrc_is_valid_opcode(uint8_t opcode);
void avrc_flush_cmd_q(uint8_t handle);
void avrc_start_cmd_timer(uint8_t handle, uint8_t label, uint8_t msg_mask);
void avrc_send_next_vendor_cmd(uint8_t handle);

#endif /* AVRC_INT_H */
+0 −3
Original line number Diff line number Diff line
@@ -77,6 +77,3 @@ uint16_t AVRC_PassRsp(uint8_t /* handle */, uint8_t /* label */, tAVRC_MSG_PASS*
}
void avrc_flush_cmd_q(uint8_t /* handle */) { inc_func_call_count(__func__); }
void avrc_send_next_vendor_cmd(uint8_t /* handle */) { inc_func_call_count(__func__); }
void avrc_start_cmd_timer(uint8_t /* handle */, uint8_t /* label */, uint8_t /* msg_mask */) {
  inc_func_call_count(__func__);
}