Merge branch 'bugfix/btdm_backport_3_bugs_v3.1' into 'release/v3.1'
Bugfix/btdm backport 3 bugs v3.1 See merge request idf/esp-idf!5177
This commit is contained in:
commit
df12d488fb
7 changed files with 55 additions and 13 deletions
|
@ -11,6 +11,7 @@ if(CONFIG_BT_ENABLED)
|
||||||
bluedroid/bta/av/include
|
bluedroid/bta/av/include
|
||||||
bluedroid/bta/dm/include
|
bluedroid/bta/dm/include
|
||||||
bluedroid/bta/gatt/include
|
bluedroid/bta/gatt/include
|
||||||
|
bluedroid/bta/hf_client/include
|
||||||
bluedroid/bta/hh/include
|
bluedroid/bta/hh/include
|
||||||
bluedroid/bta/jv/include
|
bluedroid/bta/jv/include
|
||||||
bluedroid/bta/sdp/include
|
bluedroid/bta/sdp/include
|
||||||
|
@ -93,6 +94,14 @@ if(CONFIG_BT_ENABLED)
|
||||||
"bluedroid/bta/jv/bta_jv_api.c"
|
"bluedroid/bta/jv/bta_jv_api.c"
|
||||||
"bluedroid/bta/jv/bta_jv_cfg.c"
|
"bluedroid/bta/jv/bta_jv_cfg.c"
|
||||||
"bluedroid/bta/jv/bta_jv_main.c"
|
"bluedroid/bta/jv/bta_jv_main.c"
|
||||||
|
"bluedroid/bta/hf_client/bta_hf_client_act.c"
|
||||||
|
"bluedroid/bta/hf_client/bta_hf_client_api.c"
|
||||||
|
"bluedroid/bta/hf_client/bta_hf_client_at.c"
|
||||||
|
"bluedroid/bta/hf_client/bta_hf_client_cmd.c"
|
||||||
|
"bluedroid/bta/hf_client/bta_hf_client_main.c"
|
||||||
|
"bluedroid/bta/hf_client/bta_hf_client_rfc.c"
|
||||||
|
"bluedroid/bta/hf_client/bta_hf_client_sco.c"
|
||||||
|
"bluedroid/bta/hf_client/bta_hf_client_sdp.c"
|
||||||
"bluedroid/bta/sdp/bta_sdp.c"
|
"bluedroid/bta/sdp/bta_sdp.c"
|
||||||
"bluedroid/bta/sdp/bta_sdp_act.c"
|
"bluedroid/bta/sdp/bta_sdp_act.c"
|
||||||
"bluedroid/bta/sdp/bta_sdp_api.c"
|
"bluedroid/bta/sdp/bta_sdp_api.c"
|
||||||
|
@ -122,6 +131,8 @@ if(CONFIG_BT_ENABLED)
|
||||||
"bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c"
|
"bluedroid/btc/profile/std/a2dp/btc_a2dp_source.c"
|
||||||
"bluedroid/btc/profile/std/a2dp/btc_av.c"
|
"bluedroid/btc/profile/std/a2dp/btc_av.c"
|
||||||
"bluedroid/btc/profile/std/avrc/btc_avrc.c"
|
"bluedroid/btc/profile/std/avrc/btc_avrc.c"
|
||||||
|
"bluedroid/btc/profile/std/hf_client/btc_hf_client.c"
|
||||||
|
"bluedroid/btc/profile/std/hf_client/bta_hf_client_co.c"
|
||||||
"bluedroid/btc/profile/std/gap/btc_gap_ble.c"
|
"bluedroid/btc/profile/std/gap/btc_gap_ble.c"
|
||||||
"bluedroid/btc/profile/std/gap/btc_gap_bt.c"
|
"bluedroid/btc/profile/std/gap/btc_gap_bt.c"
|
||||||
"bluedroid/btc/profile/std/gatt/btc_gatt_common.c"
|
"bluedroid/btc/profile/std/gatt/btc_gatt_common.c"
|
||||||
|
|
|
@ -6,6 +6,29 @@ config BT_ENABLED
|
||||||
help
|
help
|
||||||
Select this option to enable Bluetooth and show the submenu with Bluetooth configuration choices.
|
Select this option to enable Bluetooth and show the submenu with Bluetooth configuration choices.
|
||||||
|
|
||||||
|
choice BTDM_CONTROLLER_BR_EDR_SCO_DATA_PATH
|
||||||
|
prompt "BR/EDR Sync(SCO/eSCO) default data path"
|
||||||
|
depends on BT_ENABLED
|
||||||
|
default BTDM_CONTROLLER_BR_EDR_SCO_DATA_PATH_PCM
|
||||||
|
help
|
||||||
|
SCO data path, i.e. HCI or PCM.
|
||||||
|
SCO data can be sent/received through HCI synchronous packets, or the data
|
||||||
|
can be routed to on-chip PCM module on ESP32. PCM input/output signals can
|
||||||
|
be "matrixed" to GPIOs. The default data path can also be set using API
|
||||||
|
"esp_bredr_sco_datapath_set"
|
||||||
|
|
||||||
|
config BTDM_CONTROLLER_BR_EDR_SCO_DATA_PATH_HCI
|
||||||
|
bool "HCI"
|
||||||
|
config BTDM_CONTROLLER_BR_EDR_SCO_DATA_PATH_PCM
|
||||||
|
bool "PCM"
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config BTDM_CONTROLLER_BR_EDR_SCO_DATA_PATH_EFF
|
||||||
|
int
|
||||||
|
default 0 if BTDM_CONTROLLER_BR_EDR_SCO_DATA_PATH_HCI
|
||||||
|
default 1 if BTDM_CONTROLLER_BR_EDR_SCO_DATA_PATH_PCM
|
||||||
|
default 0
|
||||||
|
|
||||||
choice BTDM_CONTROLLER_PINNED_TO_CORE_CHOICE
|
choice BTDM_CONTROLLER_PINNED_TO_CORE_CHOICE
|
||||||
prompt "The cpu core which bluetooth controller run"
|
prompt "The cpu core which bluetooth controller run"
|
||||||
depends on BT_ENABLED && !FREERTOS_UNICORE
|
depends on BT_ENABLED && !FREERTOS_UNICORE
|
||||||
|
@ -109,7 +132,6 @@ config BTDM_LPCLK_SEL_EXT_32K_XTAL
|
||||||
bool "External 32kHz crystal"
|
bool "External 32kHz crystal"
|
||||||
depends on ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL
|
depends on ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menuconfig BLUEDROID_ENABLED
|
menuconfig BLUEDROID_ENABLED
|
||||||
|
@ -201,15 +223,15 @@ endchoice
|
||||||
choice HFP_AUDIO_DATA_PATH
|
choice HFP_AUDIO_DATA_PATH
|
||||||
prompt "audio(SCO) data path"
|
prompt "audio(SCO) data path"
|
||||||
depends on HFP_ENABLE
|
depends on HFP_ENABLE
|
||||||
|
help
|
||||||
|
SCO data path, i.e. HCI or PCM. This option is set using API
|
||||||
|
"esp_bredr_sco_datapath_set" in Bluetooth host. Default SCO data
|
||||||
|
path can also be set in Bluetooth Controller.
|
||||||
|
|
||||||
config HFP_AUDIO_DATA_PATH_PCM
|
config HFP_AUDIO_DATA_PATH_PCM
|
||||||
bool "PCM"
|
bool "PCM"
|
||||||
help
|
|
||||||
This enables the Serial Port Profile
|
|
||||||
config HFP_AUDIO_DATA_PATH_HCI
|
config HFP_AUDIO_DATA_PATH_HCI
|
||||||
bool "HCI"
|
bool "HCI"
|
||||||
help
|
|
||||||
This enables the Serial Port Profile
|
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
config GATTS_ENABLE
|
config GATTS_ENABLE
|
||||||
|
|
|
@ -1156,10 +1156,16 @@ static UINT8 btc_get_num_aa_frame(void)
|
||||||
|
|
||||||
/* calculate nbr of frames pending for this media tick */
|
/* calculate nbr of frames pending for this media tick */
|
||||||
result = btc_aa_src_cb.media_feeding_state.pcm.counter / pcm_bytes_per_frame;
|
result = btc_aa_src_cb.media_feeding_state.pcm.counter / pcm_bytes_per_frame;
|
||||||
if (result > MAX_PCM_FRAME_NUM_PER_TICK) {
|
|
||||||
APPL_TRACE_WARNING("%s() - Limiting frames to be sent from %d to %d"
|
/* limit the frames to be sent */
|
||||||
, __FUNCTION__, result, MAX_PCM_FRAME_NUM_PER_TICK);
|
UINT32 frm_nb_threshold = MAX_OUTPUT_A2DP_SRC_FRAME_QUEUE_SZ - fixed_queue_length(btc_aa_src_cb.TxAaQ);
|
||||||
result = MAX_PCM_FRAME_NUM_PER_TICK;
|
if (frm_nb_threshold > MAX_PCM_FRAME_NUM_PER_TICK) {
|
||||||
|
frm_nb_threshold = MAX_PCM_FRAME_NUM_PER_TICK;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result > frm_nb_threshold) {
|
||||||
|
APPL_TRACE_EVENT("Limit frms to send from %d to %d", result, frm_nb_threshold);
|
||||||
|
result = frm_nb_threshold;
|
||||||
}
|
}
|
||||||
btc_aa_src_cb.media_feeding_state.pcm.counter -= result * pcm_bytes_per_frame;
|
btc_aa_src_cb.media_feeding_state.pcm.counter -= result * pcm_bytes_per_frame;
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ typedef enum {
|
||||||
#define BTC_A2DP_SOURCE_TASK_STACK_SIZE (CONFIG_A2DP_SOURCE_TASK_STACK_SIZE + BT_TASK_EXTRA_STACK_SIZE) // by menuconfig
|
#define BTC_A2DP_SOURCE_TASK_STACK_SIZE (CONFIG_A2DP_SOURCE_TASK_STACK_SIZE + BT_TASK_EXTRA_STACK_SIZE) // by menuconfig
|
||||||
#define BTC_A2DP_SOURCE_TASK_NAME "BtA2dSourceT"
|
#define BTC_A2DP_SOURCE_TASK_NAME "BtA2dSourceT"
|
||||||
#define BTC_A2DP_SOURCE_TASK_PRIO (configMAX_PRIORITIES - 3)
|
#define BTC_A2DP_SOURCE_TASK_PRIO (configMAX_PRIORITIES - 3)
|
||||||
#define BTC_A2DP_SOURCE_DATA_QUEUE_LEN (3)
|
#define BTC_A2DP_SOURCE_DATA_QUEUE_LEN (1)
|
||||||
#define BTC_A2DP_SOURCE_CTRL_QUEUE_LEN (5)
|
#define BTC_A2DP_SOURCE_CTRL_QUEUE_LEN (5)
|
||||||
#define BTC_A2DP_SOURCE_TASK_QUEUE_SET_LEN (BTC_A2DP_SOURCE_DATA_QUEUE_LEN + BTC_A2DP_SOURCE_CTRL_QUEUE_LEN)
|
#define BTC_A2DP_SOURCE_TASK_QUEUE_SET_LEN (BTC_A2DP_SOURCE_DATA_QUEUE_LEN + BTC_A2DP_SOURCE_CTRL_QUEUE_LEN)
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ typedef struct {
|
||||||
uint16_t mesh_adv_size; /*!< Mesh adv size for scan duplicate */
|
uint16_t mesh_adv_size; /*!< Mesh adv size for scan duplicate */
|
||||||
uint16_t send_adv_reserved_size; /*!< Controller minimum memory value */
|
uint16_t send_adv_reserved_size; /*!< Controller minimum memory value */
|
||||||
uint32_t controller_debug_flag; /*!< Controller debug log flag */
|
uint32_t controller_debug_flag; /*!< Controller debug log flag */
|
||||||
|
uint8_t bt_sco_datapath; /*!< SCO data path, i.e. HCI or PCM module */
|
||||||
} esp_bt_controller_config_t;
|
} esp_bt_controller_config_t;
|
||||||
|
|
||||||
#ifdef CONFIG_BT_ENABLED
|
#ifdef CONFIG_BT_ENABLED
|
||||||
|
@ -97,6 +98,7 @@ the adv packet will be discarded until the memory is restored. */
|
||||||
.mesh_adv_size = MESH_DUPLICATE_SCAN_CACHE_SIZE, \
|
.mesh_adv_size = MESH_DUPLICATE_SCAN_CACHE_SIZE, \
|
||||||
.send_adv_reserved_size = SCAN_SEND_ADV_RESERVED_SIZE, \
|
.send_adv_reserved_size = SCAN_SEND_ADV_RESERVED_SIZE, \
|
||||||
.controller_debug_flag = CONTROLLER_ADV_LOST_DEBUG_BIT, \
|
.controller_debug_flag = CONTROLLER_ADV_LOST_DEBUG_BIT, \
|
||||||
|
.bt_sco_datapath = CONFIG_BTDM_CONTROLLER_BR_EDR_SCO_DATA_PATH_EFF, \
|
||||||
};
|
};
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit caa305942b66cafaacaf0ed23acbd71d1f327dfd
|
Subproject commit b09b0d11195b2ec49e3cb9fdbba63349c362823d
|
|
@ -1591,6 +1591,7 @@ PROVIDE ( ets_update_cpu_frequency_rom = 0x40008550 ); /* Updates g_ticks_per_u
|
||||||
PROVIDE ( hci_tl_env = 0x3ffb8154 );
|
PROVIDE ( hci_tl_env = 0x3ffb8154 );
|
||||||
PROVIDE ( ld_acl_env = 0x3ffb8258 );
|
PROVIDE ( ld_acl_env = 0x3ffb8258 );
|
||||||
PROVIDE ( ea_env = 0x3ffb80ec );
|
PROVIDE ( ea_env = 0x3ffb80ec );
|
||||||
|
PROVIDE ( lc_sco_env = 0x3ffb81fc );
|
||||||
PROVIDE ( lc_sco_data_path_config = 0x3ffb81f8 );
|
PROVIDE ( lc_sco_data_path_config = 0x3ffb81f8 );
|
||||||
PROVIDE ( ld_active_ch_map = 0x3ffb8334 );
|
PROVIDE ( ld_active_ch_map = 0x3ffb8334 );
|
||||||
PROVIDE ( ld_bcst_acl_env = 0x3ffb8274 );
|
PROVIDE ( ld_bcst_acl_env = 0x3ffb8274 );
|
||||||
|
|
Loading…
Reference in a new issue