Răsfoiți Sursa

component/bt: reduce the task stack size

1. some tasks's stack size is reduced and the previous severe audio distortion issue is eliminated
wangmengyang 9 ani în urmă
părinte
comite
8e77c39deb

+ 1 - 1
components/bt/bluedroid/hci/hci_hal_h4.c

@@ -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);
   
   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
   API_vhci_host_register_callback(&vhci_host_cb);

+ 1 - 2
components/bt/bluedroid/hci/hci_layer.c

@@ -112,7 +112,7 @@ int hci_start_up(void) {
     goto error;
 
   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);
   hal->open(&hal_callbacks);
@@ -225,7 +225,6 @@ static void hci_host_thread_handler(void *arg)
 
     for (;;) {
         if (pdTRUE == xQueueReceive(xHciHostQueue, &e, (portTickType)portMAX_DELAY)) {
-
             if (e.sig == 0xff) {
                 if (API_vhci_host_check_send_available()) {
                     /*Now Target only allowed one packet per TX*/

+ 1 - 1
components/bt/bluedroid/stack/btu/btu_init.c

@@ -194,7 +194,7 @@ void BTU_StartUp(void)
          goto error_exit;
 
     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);
 /*
     // Continue startup on bt workqueue thread.

+ 1 - 1
examples/09_a2dp/components/bluedroid_demos/btif/btif_core.c

@@ -316,7 +316,7 @@ bt_status_t btif_init_bluetooth(void) {
         goto error_exit;
     }
     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);
     
     return BT_STATUS_SUCCESS;