mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
component/bt: reduce the task stack size
1. some tasks's stack size is reduced and the previous severe audio distortion issue is eliminated
This commit is contained in:
parent
dae40afffb
commit
8e77c39deb
@ -99,7 +99,7 @@ static bool hal_open(const hci_hal_callbacks_t *upper_callbacks)
|
|||||||
hci_hal_env_init(HCI_HAL_SERIAL_BUFFER_SIZE, SIZE_MAX);
|
hci_hal_env_init(HCI_HAL_SERIAL_BUFFER_SIZE, SIZE_MAX);
|
||||||
|
|
||||||
xHciH4Queue = xQueueCreate(60, sizeof(BtTaskEvt_t));
|
xHciH4Queue = xQueueCreate(60, sizeof(BtTaskEvt_t));
|
||||||
xTaskCreate(hci_hal_h4_rx_handler, "HciH4T", 4096+2048, NULL, configMAX_PRIORITIES - 3, &xHciH4TaskHandle);
|
xTaskCreate(hci_hal_h4_rx_handler, "HciH4T", 2048+1024, NULL, configMAX_PRIORITIES - 3, &xHciH4TaskHandle);
|
||||||
|
|
||||||
//register vhci host cb
|
//register vhci host cb
|
||||||
API_vhci_host_register_callback(&vhci_host_cb);
|
API_vhci_host_register_callback(&vhci_host_cb);
|
||||||
|
@ -112,7 +112,7 @@ int hci_start_up(void) {
|
|||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
xHciHostQueue = xQueueCreate(60, sizeof(BtTaskEvt_t));
|
xHciHostQueue = xQueueCreate(60, sizeof(BtTaskEvt_t));
|
||||||
xTaskCreate(hci_host_thread_handler, "HciHostT", (4096+2048), NULL, configMAX_PRIORITIES - 3, &xHciHostTaskHandle);
|
xTaskCreate(hci_host_thread_handler, "HciHostT", (1024+2048), NULL, configMAX_PRIORITIES - 3, &xHciHostTaskHandle);
|
||||||
|
|
||||||
packet_fragmenter->init(&packet_fragmenter_callbacks);
|
packet_fragmenter->init(&packet_fragmenter_callbacks);
|
||||||
hal->open(&hal_callbacks);
|
hal->open(&hal_callbacks);
|
||||||
@ -225,7 +225,6 @@ static void hci_host_thread_handler(void *arg)
|
|||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (pdTRUE == xQueueReceive(xHciHostQueue, &e, (portTickType)portMAX_DELAY)) {
|
if (pdTRUE == xQueueReceive(xHciHostQueue, &e, (portTickType)portMAX_DELAY)) {
|
||||||
|
|
||||||
if (e.sig == 0xff) {
|
if (e.sig == 0xff) {
|
||||||
if (API_vhci_host_check_send_available()) {
|
if (API_vhci_host_check_send_available()) {
|
||||||
/*Now Target only allowed one packet per TX*/
|
/*Now Target only allowed one packet per TX*/
|
||||||
|
@ -194,7 +194,7 @@ void BTU_StartUp(void)
|
|||||||
goto error_exit;
|
goto error_exit;
|
||||||
|
|
||||||
xBtuQueue = xQueueCreate(60, sizeof(BtTaskEvt_t));
|
xBtuQueue = xQueueCreate(60, sizeof(BtTaskEvt_t));
|
||||||
xTaskCreate(btu_task_thread_handler, "BtuT", 8192, NULL, configMAX_PRIORITIES - 1, &xBtuTaskHandle);
|
xTaskCreate(btu_task_thread_handler, "BtuT", 4096, NULL, configMAX_PRIORITIES - 1, &xBtuTaskHandle);
|
||||||
btu_task_post(SIG_BTU_START_UP);
|
btu_task_post(SIG_BTU_START_UP);
|
||||||
/*
|
/*
|
||||||
// Continue startup on bt workqueue thread.
|
// Continue startup on bt workqueue thread.
|
||||||
|
@ -316,7 +316,7 @@ bt_status_t btif_init_bluetooth(void) {
|
|||||||
goto error_exit;
|
goto error_exit;
|
||||||
}
|
}
|
||||||
xBtifQueue = xQueueCreate(60, sizeof(void *));
|
xBtifQueue = xQueueCreate(60, sizeof(void *));
|
||||||
xTaskCreate(btif_task_thread_handler, "BtifT", 8192, NULL, configMAX_PRIORITIES - 1, &xBtifTaskHandle);
|
xTaskCreate(btif_task_thread_handler, "BtifT", 4096, NULL, configMAX_PRIORITIES - 1, &xBtifTaskHandle);
|
||||||
fixed_queue_register_dequeue(btif_msg_queue, bt_jni_msg_ready);
|
fixed_queue_register_dequeue(btif_msg_queue, bt_jni_msg_ready);
|
||||||
|
|
||||||
return BT_STATUS_SUCCESS;
|
return BT_STATUS_SUCCESS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user