system/bt
Revisão | 419bd3c6ca4294696f3c224d42aa2f7dde131da2 (tree) |
---|---|
Hora | 2016-08-24 23:09:56 |
Autor | pramod kotreshappa <pramodk@code...> |
Commiter | Linux Build Service Account |
Bluetooth: Dynamic ACL buffer allocation based on ACL Priority
1. A2dp acl link priority is set to high once streaming starts
2. Allocation min 2 ACL bufferswq to high priority link
CRs-fixed: 1040557
Change-Id: I8f7742ae193998643ff2a12bf87f9874844ee0f7
@@ -87,6 +87,7 @@ BOOLEAN hci_blacklistted_for_role_switch (BD_ADDR addr) | ||
87 | 87 | return FALSE; |
88 | 88 | } |
89 | 89 | |
90 | +#define HI_PRI_LINK_QUOTA 2 //Mininum ACL buffer quota for high priority link | |
90 | 91 | /******************************************************************************* |
91 | 92 | ** |
92 | 93 | ** Function l2c_link_hci_conn_req |
@@ -848,6 +849,14 @@ void l2c_link_adjust_allocation (void) | ||
848 | 849 | while ( (num_hipri_links * high_pri_link_quota + low_quota) > controller_xmit_quota ) |
849 | 850 | high_pri_link_quota--; |
850 | 851 | |
852 | + /*Adjust high pri link with min 3 buffers*/ | |
853 | + if(num_hipri_links > 0) | |
854 | + { | |
855 | + if(high_pri_link_quota < HI_PRI_LINK_QUOTA) | |
856 | + { | |
857 | + high_pri_link_quota = HI_PRI_LINK_QUOTA; | |
858 | + } | |
859 | + } | |
851 | 860 | /* Work out the xmit quota and buffer quota high and low priorities */ |
852 | 861 | hi_quota = num_hipri_links * high_pri_link_quota; |
853 | 862 | low_quota = (hi_quota < controller_xmit_quota) ? controller_xmit_quota - hi_quota : 1; |
@@ -2572,6 +2572,12 @@ BOOLEAN l2cu_set_acl_priority (BD_ADDR bd_addr, UINT8 priority, BOOLEAN reset_af | ||
2572 | 2572 | return (FALSE); |
2573 | 2573 | } |
2574 | 2574 | |
2575 | + if (p_lcb->acl_priority != priority) | |
2576 | + { | |
2577 | + p_lcb->acl_priority = priority; | |
2578 | + l2c_link_adjust_allocation(); | |
2579 | + } | |
2580 | + | |
2575 | 2581 | if (BTM_IS_BRCM_CONTROLLER()) |
2576 | 2582 | { |
2577 | 2583 | /* Called from above L2CAP through API; send VSC if changed */ |