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

Commit b996e07f authored by Hansong Zhang's avatar Hansong Zhang
Browse files

sco_disc_reason is unused

Test: cert/run
Tag: #gd-refactor
Bug: 141555841
Change-Id: Ib2417fa61c7a661f4b385f92645868cae270e62d
parent 163dbe4b
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -108,7 +108,6 @@ static void btm_sco_flush_sco_data(UNUSED_ATTR uint16_t sco_inx) {}
 ******************************************************************************/
void btm_sco_init(void) {
  /* Initialize nonzero defaults */
  btm_cb.sco_cb.sco_disc_reason = BTM_INVALID_SCO_DISC_REASON;
  btm_cb.sco_cb.def_esco_parms = esco_parameters_for_codec(ESCO_CODEC_CVSD);
  btm_cb.sco_cb.def_esco_parms.max_latency_ms = 12;
  btm_cb.sco_cb.sco_route = ESCO_DATA_PATH_PCM;
@@ -691,13 +690,6 @@ void btm_sco_connected(uint8_t hci_status, const RawAddress* bda,
  bool spt = false;
  tBTM_CHG_ESCO_PARAMS parms = {};

  btm_cb.sco_cb.sco_disc_reason = hci_status;

  if (bda == nullptr) {
    LOG_ERROR("Received null pointer for remote address");
    return;
  }

  for (xx = 0; xx < BTM_MAX_SCO_LINKS; xx++, p++) {
    if (((p->state == SCO_ST_CONNECTING) || (p->state == SCO_ST_LISTENING) ||
         (p->state == SCO_ST_W4_CONN_RSP)) &&
@@ -858,7 +850,6 @@ bool btm_sco_removed(uint16_t hci_handle, tHCI_REASON reason) {
      p->hci_handle = HCI_INVALID_HANDLE;
      p->rem_bd_known = false;
      p->esco.p_esco_cback = NULL; /* Deregister eSCO callback */
      btm_cb.sco_cb.sco_disc_reason = reason;
      (*p->p_disc_cb)(xx);
      LOG_DEBUG("Disconnected SCO link handle:%hu reason:%s", hci_handle,
                hci_reason_code_text(reason).c_str());
@@ -891,7 +882,6 @@ void btm_sco_on_disconnected(uint16_t hci_handle, tHCI_REASON reason) {
  p_sco->hci_handle = HCI_INVALID_HANDLE;
  p_sco->rem_bd_known = false;
  p_sco->esco.p_esco_cback = NULL; /* Deregister eSCO callback */
  btm_cb.sco_cb.sco_disc_reason = reason;
  (*p_sco->p_disc_cb)(btm_cb.sco_cb.get_index(p_sco));
  LOG_DEBUG("Disconnected SCO link handle:%hu reason:%s", hci_handle,
            hci_reason_code_text(reason).c_str());
+0 −2
Original line number Diff line number Diff line
@@ -95,7 +95,6 @@ typedef struct {
  tBTM_SCO_IND_CBACK* app_sco_ind_cb;
  tSCO_CONN sco_db[BTM_MAX_SCO_LINKS];
  enh_esco_params_t def_esco_parms;
  uint16_t sco_disc_reason;
  bool esco_supported;        /* true if 1.2 cntlr AND supports eSCO links */
  esco_data_path_t sco_route; /* HCI, PCM, or TEST */

@@ -114,7 +113,6 @@ typedef struct {
  }

  void Init() {
    sco_disc_reason = BTM_INVALID_SCO_DISC_REASON;
    def_esco_parms = esco_parameters_for_codec(ESCO_CODEC_CVSD);
    def_esco_parms.max_latency_ms = 12;
    sco_route = ESCO_DATA_PATH_PCM;