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

Commit da46cc9e authored by Myles Watson's avatar Myles Watson
Browse files

bt_target.h: Remove always FALSE DISABLE_WBS

Bug: 327390105
Test: mma -j32
Flag: EXEMPT, build-only change
Change-Id: Ifbac5c91ec833a8a5569c52ebbed6f3b84fc3608
parent d59c11eb
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -434,12 +434,10 @@ void bta_ag_create_sco(tBTA_AG_SCB* p_scb, bool is_orig) {
    return;
  }

#if (DISABLE_WBS == FALSE)
  if ((p_scb->sco_codec == BTM_SCO_CODEC_MSBC) && !p_scb->codec_fallback &&
      hfp_hal_interface::get_wbs_supported()) {
    esco_codec = UUID_CODEC_MSBC;
  }
#endif

  if (is_hfp_aptx_voice_enabled()) {
    if ((p_scb->sco_codec == BTA_AG_SCO_APTX_SWB_SETTINGS_Q0) &&
@@ -818,14 +816,9 @@ static void bta_ag_sco_event(tBTA_AG_SCB* p_scb, uint8_t event) {
          /* remove listening connection */
          bta_ag_remove_sco(p_scb, false);

#if (DISABLE_WBS == FALSE)
          /* start codec negotiation */
          p_sco->state = BTA_AG_SCO_CODEC_ST;
          bta_ag_codec_negotiate(p_scb);
#else
          bta_ag_create_sco(p_scb, true);
          p_sco->state = BTA_AG_SCO_OPENING_ST;
#endif
          break;

        case BTA_AG_SCO_SHUTDOWN_E:
@@ -928,13 +921,11 @@ static void bta_ag_sco_event(tBTA_AG_SCB* p_scb, uint8_t event) {
          }
          break;

#if (DISABLE_WBS == FALSE)
        case BTA_AG_SCO_REOPEN_E:
          /* start codec negotiation */
          p_sco->state = BTA_AG_SCO_CODEC_ST;
          bta_ag_codec_negotiate(p_scb);
          break;
#endif

        case BTA_AG_SCO_XFER_E:
          /* save xfer scb */
@@ -1206,18 +1197,11 @@ static void bta_ag_sco_event(tBTA_AG_SCB* p_scb, uint8_t event) {
          bta_ag_create_sco(p_scb, false);
          bta_ag_remove_sco(p_sco->p_xfer_scb, false);

#if (DISABLE_WBS == FALSE)
          /* start codec negotiation */
          p_sco->state = BTA_AG_SCO_CODEC_ST;
          tBTA_AG_SCB* p_cn_scb = p_sco->p_xfer_scb;
          p_sco->p_xfer_scb = nullptr;
          bta_ag_codec_negotiate(p_cn_scb);
#else
          /* create sco connection to peer */
          bta_ag_create_sco(p_sco->p_xfer_scb, true);
          p_sco->p_xfer_scb = nullptr;
          p_sco->state = BTA_AG_SCO_OPENING_ST;
#endif
          break;
        }

+0 −4
Original line number Diff line number Diff line
@@ -192,10 +192,6 @@
 *
 *****************************************************************************/

#ifndef DISABLE_WBS
#define DISABLE_WBS FALSE
#endif

/**************************
 * Initial SCO TX credit
 ************************/
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ void init() {
}

// Android statically compiles WBS support.
bool get_wbs_supported() { return !DISABLE_WBS; }
bool get_wbs_supported() { return true; }

bool get_swb_supported() {
  return osi_property_get_bool("bluetooth.hfp.swb.supported", false) &&