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

Commit 9cff9888 authored by Chris Manton's avatar Chris Manton
Browse files

Add sco APIs stack/acl/btm_acl

sco_peer_supports_esco_2m_phy
sco_peer_supports_esco_3m_phy

Working towards encapsulation of tACL_CONN

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Ibf11fbe45ef586ed1c16cc26ff468d1a3aac5b33
parent a9aee892
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -2645,3 +2645,19 @@ void btm_sec_set_peer_sec_caps(tACL_CONN* p_acl_cb,
    p_dev_rec->remote_features_needed = false;
  }
}

bool sco_peer_supports_esco_2m_phy(uint16_t hci_handle) {
  tACL_CONN* p_acl = acl_get_connection_from_handle(hci_handle);
  if (p_acl == nullptr) {
    return false;
  }
  return HCI_EDR_ESCO_2MPS_SUPPORTED(p_acl->peer_lmp_feature_pages[0]);
}

bool sco_peer_supports_esco_3m_phy(uint16_t hci_handle) {
  tACL_CONN* p_acl = acl_get_connection_from_handle(hci_handle);
  if (p_acl == nullptr) {
    return false;
  }
  return HCI_EDR_ESCO_3MPS_SUPPORTED(p_acl->peer_lmp_feature_pages[0]);
}
+3 −0
Original line number Diff line number Diff line
@@ -243,6 +243,9 @@ void btm_establish_continue_from_address(const RawAddress& remote_bda,
bool acl_peer_supports_ble_connection_parameters_request(
    const RawAddress& remote_bda);

bool sco_peer_supports_esco_2m_phy(uint16_t hci_handle);
bool sco_peer_supports_esco_3m_phy(uint16_t hci_handle);

/*******************************************************************************
 *
 * Function         BTM_ReadConnectionAddr