Skip to content

Commit b922352

Browse files
committed
Merge branch 'bugfix/fix_some_bt_bugs' into 'master'
fix(bt): fix some bluetooth bugs Closes IDFGH-16334 and IDFGH-15166 See merge request espressif/esp-idf!42261
2 parents 3e0545f + 8104d45 commit b922352

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

components/bt/controller/esp32/bt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1972,6 +1972,7 @@ esp_err_t esp_bt_controller_disable(void)
19721972
#endif
19731973

19741974
esp_phy_disable(PHY_MODEM_BT);
1975+
s_time_phy_rf_just_enabled = 0;
19751976
btdm_controller_status = ESP_BT_CONTROLLER_STATUS_INITED;
19761977
esp_unregister_shutdown_handler(bt_shutdown);
19771978

components/bt/host/bluedroid/bta/hf_ag/bta_ag_sco.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,8 @@ static void bta_ag_sco_read_cback(UINT16 sco_inx, BT_HDR *p_data, tBTM_SCO_DATA_
345345
APPL_TRACE_DEBUG("bta_ag_sco_read_cback: status(%d)", status);
346346
}
347347

348-
#if (BTA_HFP_EXT_CODEC == FALSE)
349348
/* Callout function must free the data. */
350349
bta_ag_sco_co_in_data(p_data, status);
351-
#endif
352350
}
353351
#endif
354352
/*******************************************************************************

components/bt/host/bluedroid/btc/profile/std/hf_ag/bta_ag_co.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,8 @@ uint32_t bta_ag_sco_co_out_data(UINT8 *p_buf)
567567
return 0;
568568
}
569569

570+
#endif
571+
570572
/*******************************************************************************
571573
**
572574
** Function bta_ag_sco_co_in_data
@@ -618,7 +620,6 @@ void bta_ag_sco_co_in_data(BT_HDR *p_buf, tBTM_SCO_DATA_FLAG status)
618620
}
619621
btc_hf_audio_data_cb_to_app((uint8_t *)p_new_buf, (uint8_t *)p_data, BTM_MSBC_FRAME_SIZE, bta_ag_co_cb.is_bad_frame);
620622
bta_ag_co_cb.is_bad_frame = false;
621-
memset(bta_ag_co_cb.decode_msbc_data, 0, BTM_MSBC_FRAME_SIZE);
622623
}
623624
bta_ag_co_cb.rx_first_pkt = !bta_ag_co_cb.rx_first_pkt;
624625
}
@@ -684,7 +685,6 @@ void bta_ag_sco_co_in_data(BT_HDR *p_buf, tBTM_SCO_DATA_FLAG status)
684685
osi_free(p_buf);
685686
#endif
686687
}
687-
#endif
688688

689689
#endif /* #if (BTM_SCO_HCI_INCLUDED == TRUE) */
690690
#endif /* #if (BTA_AG_INCLUDED == TRUE) */

0 commit comments

Comments
 (0)