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

Commit bcaae9f8 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

Add tSCO_CB::get_sco_connection_from_handle am: cfcc8ec0 am: 78c1d873

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1553560

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I617771b2c560aacd791d50169b010d756c2ee1a0
parents 42eba317 78c1d873
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -103,6 +103,16 @@ typedef struct {
    return (index < kMaxScoLinks) ? (&sco_db[index]) : nullptr;
  }

  tSCO_CONN* get_sco_connection_from_handle(uint16_t handle) {
    tSCO_CONN* p_sco = sco_db;
    for (uint16_t xx = 0; xx < kMaxScoLinks; xx++, p_sco++) {
      if (p_sco->hci_handle == handle) {
        return p_sco;
      }
    }
    return nullptr;
  }

  void Init() {
    sco_disc_reason = BTM_INVALID_SCO_DISC_REASON;
    def_esco_parms = esco_parameters_for_codec(ESCO_CODEC_CVSD);