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

Commit 8833f414 authored by Yun-hao Chung's avatar Yun-hao Chung Committed by Gerrit Code Review
Browse files

Merge "Floss: Fix SCO state when retrying different parameters" into main

parents 6e9e4973 d50b7538
Loading
Loading
Loading
Loading
+17 −2
Original line number Diff line number Diff line
@@ -231,7 +231,16 @@ static void bta_ag_sco_disc_cback(uint16_t sco_idx) {
       * 'Safe setting' first. If T1 also fails, try CVSD
       * same operations for LC3 settings */
      if (bta_ag_sco_is_opening(bta_ag_cb.sco.p_curr_scb)) {
        /* Don't bother to edit |p_curr_scb->state| because it is in
         * |BTA_AG_OPEN_ST|, which has the same value as |BTA_AG_SCO_CODEC_ST|
         */
#if TARGET_FLOSS
        if (false) {
#else
        if (!IS_FLAG_ENABLED(fix_hfp_qual_1_9)) {
#endif
          bta_ag_cb.sco.p_curr_scb->state = BTA_AG_SCO_CODEC_ST;
        }
        if (bta_ag_cb.sco.p_curr_scb->inuse_codec == UUID_CODEC_LC3) {
          if (bta_ag_cb.sco.p_curr_scb->codec_lc3_settings ==
              BTA_AG_SCO_LC3_SETTINGS_T2) {
@@ -263,7 +272,13 @@ static void bta_ag_sco_disc_cback(uint16_t sco_idx) {
      if (IS_FLAG_ENABLED(retry_esco_with_zero_retransmission_effort) &&
          bta_ag_cb.sco.p_curr_scb->retransmission_effort_retries == 0) {
        bta_ag_cb.sco.p_curr_scb->retransmission_effort_retries++;
#if TARGET_FLOSS
        if (false) {
#else
        if (!IS_FLAG_ENABLED(fix_hfp_qual_1_9)) {
#endif
          bta_ag_cb.sco.p_curr_scb->state = BTA_AG_SCO_CODEC_ST;
        }
        log::warn("eSCO/SCO failed to open, retry with retransmission_effort");
      } else {
        log::error("eSCO/SCO failed to open, no more fall back");