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

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

Bluetooth HFP: Use WBS by default (1/5)

Bug: 72624793
Test: compilation
Change-Id: Ia64c49210769581bba5be7354b67fa50d89cfdaa
parent e3d7fa1c
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -118,16 +118,6 @@ struct btif_hf_cb_t {

static btif_hf_cb_t btif_hf_cb[BTA_AG_MAX_NUM_CLIENTS];

/* By default, even though codec negotiation is enabled, we will not use WBS as
 * the default
 * codec unless this variable is set to true.
 */
#ifndef BTIF_HF_WBS_PREFERRED
#define BTIF_HF_WBS_PREFERRED false
#endif

static bool btif_conf_hf_force_wbs = BTIF_HF_WBS_PREFERRED;

static const char* dump_hf_call_state(bthf_call_state_t call_state) {
  switch (call_state) {
    CASE_RETURN_STR(BTHF_CALL_STATE_IDLE)
@@ -511,7 +501,7 @@ static void btif_hf_upstreams_evt(uint16_t event, char* p_param) {
      we should set the BTA AG Codec to mSBC. This would trigger a +BCS to mSBC
      at the time
      of SCO connection establishment */
      if ((btif_conf_hf_force_wbs) && (p_data->val.num & BTA_AG_CODEC_MSBC)) {
      if (p_data->val.num & BTA_AG_CODEC_MSBC) {
        BTIF_TRACE_EVENT("%s: btif_hf override-Preferred Codec to MSBC",
                         __func__);
        BTA_AgSetCodec(btif_hf_cb[idx].handle, BTA_AG_CODEC_MSBC);