Merge branch 'bugfix/hfp_sniff_mng_v5.0' into 'release/v5.0'

bugfix/hf_and_ag_cannot_enter/exit sniff mode. (v5.0)

See merge request espressif/esp-idf!34470
release/v5.0
Wang Meng Yang 2024-11-11 15:09:23 +08:00
commit 7c02cb4517
3 zmienionych plików z 22 dodań i 8 usunięć

Wyświetl plik

@ -151,13 +151,13 @@ tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_SPEC bta_dm_pm_spec[BTA_DM_NUM_PM_SPEC] = {
(BTA_DM_PM_SSR2), /* the SSR entry */
#endif
{
{{BTA_DM_PM_SNIFF_A2DP_IDX, 7000 + BTA_DM_PM_SPEC_TO_OFFSET}, {BTA_DM_PM_NO_ACTION, 0}}, /* conn open sniff */
{{BTA_DM_PM_SNIFF_AG_OPEN_IDX, 7000 + BTA_DM_PM_SPEC_TO_OFFSET}, {BTA_DM_PM_NO_ACTION, 0}}, /* conn open sniff */
{{BTA_DM_PM_NO_PREF, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* conn close */
{{BTA_DM_PM_NO_ACTION, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* app open */
{{BTA_DM_PM_NO_ACTION, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* app close */
{{BTA_DM_PM_SNIFF_SCO_OPEN_IDX, 7000 + BTA_DM_PM_SPEC_TO_OFFSET}, {BTA_DM_PM_NO_ACTION, 0}}, /* sco open, active */
{{BTA_DM_PM_SNIFF_A2DP_IDX, 7000 + BTA_DM_PM_SPEC_TO_OFFSET}, {BTA_DM_PM_NO_ACTION, 0}}, /* sco close sniff */
{{BTA_DM_PM_NO_ACTION, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* idle */
{{BTA_DM_PM_SNIFF_SCO_CLOSE_IDX, 7000 + BTA_DM_PM_SPEC_TO_OFFSET}, {BTA_DM_PM_NO_ACTION, 0}}, /* sco close sniff */
{{BTA_DM_PM_SNIFF_AG_IDLE_IDX, 7000 + BTA_DM_PM_SPEC_TO_OFFSET}, {BTA_DM_PM_NO_ACTION, 0}}, /* idle */
{{BTA_DM_PM_ACTIVE, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* busy */
{{BTA_DM_PM_RETRY, 7000 + BTA_DM_PM_SPEC_TO_OFFSET}, {BTA_DM_PM_NO_ACTION, 0}} /* mode change retry */
}
@ -231,9 +231,9 @@ tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_SPEC bta_dm_pm_spec[BTA_DM_NUM_PM_SPEC] = {
{{BTA_DM_PM_NO_PREF, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* conn close */
{{BTA_DM_PM_NO_ACTION, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* app open */
{{BTA_DM_PM_NO_ACTION, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* app close */
{{BTA_DM_PM_NO_ACTION, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* sco open, active */
{{BTA_DM_PM_NO_ACTION, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* sco close sniff */
{{BTA_DM_PM_NO_ACTION, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* idle */
{{BTA_DM_PM_SNIFF3, 7000 + BTA_DM_PM_SPEC_TO_OFFSET}, {BTA_DM_PM_NO_ACTION, 0}}, /* sco open, active */
{{BTA_DM_PM_SNIFF, 7000 + BTA_DM_PM_SPEC_TO_OFFSET}, {BTA_DM_PM_NO_ACTION, 0}}, /* sco close sniff */
{{BTA_DM_PM_SNIFF, 7000 + BTA_DM_PM_SPEC_TO_OFFSET}, {BTA_DM_PM_NO_ACTION, 0}}, /* idle */
{{BTA_DM_PM_ACTIVE, 0}, {BTA_DM_PM_NO_ACTION, 0}}, /* busy */
{{BTA_DM_PM_RETRY, 7000 + BTA_DM_PM_SPEC_TO_OFFSET}, {BTA_DM_PM_NO_ACTION, 0}} /* mode change retry */
}
@ -409,7 +409,7 @@ tBTA_DM_SSR_SPEC bta_dm_ssr_spec[] = {
/*max_lat, min_rmt_to, min_loc_to*/
{0, 0, 0}, /* BTA_DM_PM_SSR0 - do not use SSR */
{0, 0, 2}, /* BTA_DM_PM_SSR1 - HH, can NOT share entry with any other profile,
seting default max latency and min remote timeout as 0,
setting default max latency and min remote timeout as 0,
and always read individual device preference from HH module */
{1200, 2, 2}, /* BTA_DM_PM_SSR2 - others (as long as sniff is allowed)*/
{360, 160, 1600} /* BTA_DM_PM_SSR3 - HD */
@ -466,7 +466,7 @@ tBTA_DM_EIR_CONF bta_dm_eir_cfg = {
{ /* mask of UUID list in EIR */
0xFFFFFFFF, /* LSB is the first UUID of the first 32 UUIDs in BTM_EIR_UUID_LKUP_TBL */
0xFFFFFFFF /* LSB is the first UUID of the next 32 UUIDs in BTM_EIR_UUID_LKUP_TBL */
/* BTM_EIR_UUID_LKUP_TBL can be overrided */
/* BTM_EIR_UUID_LKUP_TBL can be overridden */
},
#endif // BTA_EIR_CANNED_UUID_LIST
FALSE, /* Not included TX power*/

Wyświetl plik

@ -511,7 +511,9 @@ void bta_hf_client_rfc_data(tBTA_HF_CLIENT_DATA *p_data)
break;
}
bta_sys_busy(BTA_ID_HS, 1, bta_hf_client_cb.scb.peer_addr);
bta_hf_client_at_parse(buf, len);
bta_sys_idle(BTA_ID_HS, 1, bta_hf_client_cb.scb.peer_addr);
/* no more data to read, we're done */
if (len < BTA_HF_CLIENT_RFC_READ_MAX) {

Wyświetl plik

@ -1339,10 +1339,22 @@ typedef UINT8 tBTA_DM_PM_ACTION;
#define BTA_DM_PM_SNIFF_HD_IDLE_IDX BTA_DM_PM_SNIFF4
#endif
#ifndef BTA_DM_PM_SNIFF_AG_OPEN_IDX
#define BTA_DM_PM_SNIFF_AG_OPEN_IDX BTA_DM_PM_SNIFF
#endif
#ifndef BTA_DM_PM_SNIFF_AG_IDLE_IDX
#define BTA_DM_PM_SNIFF_AG_IDLE_IDX BTA_DM_PM_SNIFF
#endif
#ifndef BTA_DM_PM_SNIFF_SCO_OPEN_IDX
#define BTA_DM_PM_SNIFF_SCO_OPEN_IDX BTA_DM_PM_SNIFF3
#endif
#ifndef BTA_DM_PM_SNIFF_SCO_CLOSE_IDX
#define BTA_DM_PM_SNIFF_SCO_CLOSE_IDX BTA_DM_PM_SNIFF
#endif
#ifndef BTA_DM_PM_SNIFF_HD_ACTIVE_IDX
#define BTA_DM_PM_SNIFF_HD_ACTIVE_IDX BTA_DM_PM_SNIFF5
#endif