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

Commit 8743fbc6 authored by Hansong Zhang's avatar Hansong Zhang
Browse files

No need to expose BTM_ChangeEScoLinkParms

Only used in btm_sco.cc.

No need to check BTM_MAX_SCO_LINKS here.  The next check does that
already.

Bug: 195344796
Tag: #refactor
Test: cert/run
Change-Id: I475b02486bac9345a4df7d503f143d77b66bd073
parent 5f328b53
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
@@ -1297,28 +1297,6 @@ tBTM_STATUS BTM_SetEScoMode(enh_esco_params_t* p_parms);
 ******************************************************************************/
tBTM_STATUS BTM_RegForEScoEvts(uint16_t sco_inx, tBTM_ESCO_CBACK* p_esco_cback);

/*******************************************************************************
 *
 * Function         BTM_ChangeEScoLinkParms
 *
 * Description      This function requests renegotiation of the parameters on
 *                  the current eSCO Link.  If any of the changes are accepted
 *                  by the controllers, the BTM_ESCO_CHG_EVT event is sent in
 *                  the tBTM_ESCO_CBACK function with the current settings of
 *                  the link. The callback is registered through the call to
 *                  BTM_SetEScoMode.
 *
 *
 * Returns          BTM_CMD_STARTED if command is successfully initiated.
 *                  BTM_ILLEGAL_VALUE if no connection for specified sco_inx.
 *                  BTM_NO_RESOURCES - not enough resources to initiate command.
 *                  BTM_MODE_UNSUPPORTED if local controller does not support
 *                      1.2 specification.
 *
 ******************************************************************************/
tBTM_STATUS BTM_ChangeEScoLinkParms(uint16_t sco_inx,
                                    tBTM_CHG_ESCO_PARAMS* p_parms);

/*******************************************************************************
 *
 * Function         BTM_EScoConnRsp
+5 −6
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@
#include "stack/include/btm_api.h"
#include "stack/include/btm_api_types.h"
#include "stack/include/hci_error_code.h"
#include "stack/include/hcidefs.h"
#include "stack/include/hcimsgs.h"
#include "types/class_of_device.h"
#include "types/raw_address.h"
@@ -84,6 +85,8 @@ const bluetooth::legacy::hci::Interface& GetLegacyHciInterface() {
/******************************************************************************/
/*            L O C A L    F U N C T I O N     P R O T O T Y P E S            */
/******************************************************************************/
static tBTM_STATUS BTM_ChangeEScoLinkParms(uint16_t sco_inx,
                                           tBTM_CHG_ESCO_PARAMS* p_parms);

static uint16_t btm_sco_voice_settings_to_legacy(enh_esco_params_t* p_parms);

@@ -1070,12 +1073,8 @@ tBTM_STATUS BTM_RegForEScoEvts(uint16_t sco_inx,
 *                                 sco_inx.
 *
 ******************************************************************************/
tBTM_STATUS BTM_ChangeEScoLinkParms(uint16_t sco_inx,
static tBTM_STATUS BTM_ChangeEScoLinkParms(uint16_t sco_inx,
                                           tBTM_CHG_ESCO_PARAMS* p_parms) {
  if (BTM_MAX_SCO_LINKS == 0) {
    return BTM_WRONG_MODE;
  }

  /* Make sure sco handle is valid and on an active link */
  if (sco_inx >= BTM_MAX_SCO_LINKS ||
      btm_cb.sco_cb.sco_db[sco_inx].state != SCO_ST_CONNECTED)
+0 −22
Original line number Diff line number Diff line
@@ -558,28 +558,6 @@ tBTM_STATUS BTM_SetEScoMode(enh_esco_params_t* p_parms);
 ******************************************************************************/
tBTM_STATUS BTM_RegForEScoEvts(uint16_t sco_inx, tBTM_ESCO_CBACK* p_esco_cback);

/*******************************************************************************
 *
 * Function         BTM_ChangeEScoLinkParms
 *
 * Description      This function requests renegotiation of the parameters on
 *                  the current eSCO Link.  If any of the changes are accepted
 *                  by the controllers, the BTM_ESCO_CHG_EVT event is sent in
 *                  the tBTM_ESCO_CBACK function with the current settings of
 *                  the link. The callback is registered through the call to
 *                  BTM_SetEScoMode.
 *
 *
 * Returns          BTM_CMD_STARTED if command is successfully initiated.
 *                  BTM_ILLEGAL_VALUE if no connection for specified sco_inx.
 *                  BTM_NO_RESOURCES - not enough resources to initiate command.
 *                  BTM_MODE_UNSUPPORTED if local controller does not support
 *                      1.2 specification.
 *
 ******************************************************************************/
tBTM_STATUS BTM_ChangeEScoLinkParms(uint16_t sco_inx,
                                    tBTM_CHG_ESCO_PARAMS* p_parms);

/*******************************************************************************
 *
 * Function         BTM_EScoConnRsp
+0 −5
Original line number Diff line number Diff line
@@ -51,11 +51,6 @@ const RawAddress* BTM_ReadScoBdAddr(uint16_t sco_inx) {
  mock_function_count_map[__func__]++;
  return nullptr;
}
tBTM_STATUS BTM_ChangeEScoLinkParms(uint16_t sco_inx,
                                    tBTM_CHG_ESCO_PARAMS* p_parms) {
  mock_function_count_map[__func__]++;
  return BTM_SUCCESS;
}
tBTM_STATUS BTM_CreateSco(const RawAddress* remote_bda, bool is_orig,
                          uint16_t pkt_types, uint16_t* p_sco_inx,
                          tBTM_SCO_CB* p_conn_cb, tBTM_SCO_CB* p_disc_cb) {