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

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

Add tSCO_CONN::get_sco_connection_from_index am: 2945ced2 am: 108b05c8

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I48b23965c3e73a1765848b0dd413b577d82389cc
parents 71b21b91 108b05c8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@
#include "device/include/esco_parameters.h"
#include "stack/include/btm_api_types.h"

constexpr uint16_t kMaxScoLinks = static_cast<uint16_t>(BTM_MAX_SCO_LINKS);

/* Define the structures needed by sco
 */

@@ -92,6 +94,10 @@ typedef struct {
  bool esco_supported;        /* true if 1.2 cntlr AND supports eSCO links */
  esco_data_path_t sco_route; /* HCI, PCM, or TEST */

  tSCO_CONN* get_sco_connection_from_index(uint16_t index) {
    return (index < kMaxScoLinks) ? (&sco_db[index]) : nullptr;
  }

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