diff --git a/.codespellrc b/.codespellrc index a886554427d..e9be43f2160 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,4 +1,4 @@ [codespell] skip = build,*.yuv,components/fatfs/src/*,alice.txt,*.rgb,components/wpa_supplicant/*,components/esp_wifi/*,*.pem -ignore-words-list = ser,dout,rsource,fram,inout,shs,ans,aci,unstall,unstalling,hart,wheight,wel,ot,fane,assertIn,registr,oen +ignore-words-list = ser,dout,rsource,fram,inout,shs,ans,aci,unstall,unstalling,hart,wheight,wel,ot,fane,assertIn,registr,oen,parms write-changes = true diff --git a/components/bt/host/bluedroid/stack/btm/btm_main.c b/components/bt/host/bluedroid/stack/btm/btm_main.c index e9e443380c8..1519ecb990a 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_main.c +++ b/components/bt/host/bluedroid/stack/btm/btm_main.c @@ -110,6 +110,9 @@ void btm_free(void) fixed_queue_free(btm_cb.sec_pending_q, osi_free_func); btm_acl_free(); btm_sec_dev_free(); +#if BTM_SCO_INCLUDED == TRUE + btm_sco_free(); +#endif #if BTM_DYNAMIC_MEMORY FREE_AND_RESET(btm_cb_ptr); #endif diff --git a/components/bt/host/bluedroid/stack/btm/btm_sco.c b/components/bt/host/bluedroid/stack/btm/btm_sco.c index 53a9768a1ae..7dede5d4d3f 100644 --- a/components/bt/host/bluedroid/stack/btm/btm_sco.c +++ b/components/bt/host/bluedroid/stack/btm/btm_sco.c @@ -123,6 +123,22 @@ void btm_sco_init (void) btm_cb.sco_cb.desired_sco_mode = BTM_DEFAULT_SCO_MODE; } +/******************************************************************************* +** +** Function btm_sco_free +** +** Description Free sco specific fixed_queue from btm control block +** +*******************************************************************************/ +void btm_sco_free(void) +{ +#if (BTM_SCO_HCI_INCLUDED == TRUE) + for (int i = 0; i < BTM_MAX_SCO_LINKS; i++) { + fixed_queue_free(btm_cb.sco_cb.sco_db[i].xmit_data_q, osi_free_func); + } +#endif +} + /******************************************************************************* ** ** Function btm_esco_conn_rsp @@ -233,7 +249,7 @@ void btm_sco_process_num_bufs (UINT16 num_lm_sco_bufs) ** pointer is used, PCM parameter maintained in ** the control block will be used; otherwise update ** control block value. -** err_data_rpt: Lisbon feature to enable the erronous data report +** err_data_rpt: Lisbon feature to enable the erroneous data report ** or not. ** ** Returns BTM_SUCCESS if the successful. @@ -947,7 +963,7 @@ void btm_sco_conn_req (BD_ADDR bda, DEV_CLASS dev_class, UINT8 link_type) for (xx = 0; xx < BTM_MAX_SCO_LINKS; xx++, p++) { /* * If the sco state is in the SCO_ST_CONNECTING state, we still need - * to return accept sco to avoid race conditon for sco creation + * to return accept sco to avoid race condition for sco creation */ int rem_bd_matches = p->rem_bd_known && !memcmp (p->esco.data.bd_addr, bda, BD_ADDR_LEN); diff --git a/components/bt/host/bluedroid/stack/btm/include/btm_int.h b/components/bt/host/bluedroid/stack/btm/include/btm_int.h index 64bcc300cd2..df7e435db1a 100644 --- a/components/bt/host/bluedroid/stack/btm/include/btm_int.h +++ b/components/bt/host/bluedroid/stack/btm/include/btm_int.h @@ -1119,6 +1119,7 @@ void btm_ble_periodic_adv_sync_trans_complete(UINT16 op_code, UINT8 hci_status, ******************************************** */ void btm_sco_init (void); +void btm_sco_free(void); void btm_sco_connected (UINT8 hci_status, BD_ADDR bda, UINT16 hci_handle, tBTM_ESCO_DATA *p_esco_data); void btm_esco_proc_conn_chg (UINT8 status, UINT16 handle, UINT8 tx_interval,