Loading system/bta/dm/bta_dm_cfg.cc +7 −5 Original line number Diff line number Diff line Loading @@ -171,7 +171,8 @@ tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_SPEC bta_dm_pm_spec[BTA_DM_NUM_PM_SPEC] = { {BTA_DM_PM_NO_ACTION, 0}}, /* sco open, active */ {{BTA_DM_PM_SNIFF_A2DP_IDX, 7000}, {BTA_DM_PM_NO_ACTION, 0}}, /* sco close sniff */ {{BTA_DM_PM_SNIFF_A2DP_IDX, 7000}, {BTA_DM_PM_NO_ACTION, 0}}, /* idle */ {{BTA_DM_PM_SNIFF_A2DP_IDX, 7000}, {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_NO_ACTION, 0}} /* mode change retry */ Loading Loading @@ -241,7 +242,7 @@ tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_SPEC bta_dm_pm_spec[BTA_DM_NUM_PM_SPEC] = { /* AV : 4 */ {(BTA_DM_PM_SNIFF), /* allow sniff */ #if (BTM_SSR_INCLUDED == TRUE) (BTA_DM_PM_SSR0), /* the SSR entry */ (BTA_DM_PM_SSR2), /* the SSR entry */ #endif { {{BTA_DM_PM_SNIFF_A2DP_IDX, 7000}, Loading Loading @@ -586,7 +587,8 @@ tBTA_DM_SSR_SPEC bta_dm_ssr_spec[] = { individual device preference from HH module */ {0, 0, 2}, {1200, 2, 2}, /* BTA_DM_PM_SSR2 - others (as long as sniff is allowed)*/ {360, 160, 1600} /* BTA_DM_PM_SSR3 - HD */ {360, 160, 1600}, /* BTA_DM_PM_SSR3 - HD */ {1200, 65534, 65534} /* BTA_DM_PM_SSR4 - A2DP streaming */ }; tBTA_DM_SSR_SPEC* p_bta_dm_ssr_spec = &bta_dm_ssr_spec[0]; Loading system/bta/dm/bta_dm_pm.cc +13 −6 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ static void bta_dm_pm_stop_timer_by_index(tBTA_PM_TIMER* p_timer, * can use it */ #define BTA_DM_PM_SSR_HH BTA_DM_PM_SSR1 #endif static void bta_dm_pm_ssr(const RawAddress& peer_addr); static void bta_dm_pm_ssr(const RawAddress& peer_addr, int ssr); #endif tBTA_DM_CONNECTED_SRVCS bta_dm_conn_srvcs; Loading Loading @@ -363,6 +363,13 @@ static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, uint8_t id, if ((BTA_SYS_CONN_OPEN == status) && p_dev && (p_dev->info & BTA_DM_DI_USE_SSR)) { index = p_bta_dm_pm_spec[p_bta_dm_pm_cfg[i].spec_idx].ssr; } else if (BTA_ID_AV == id) { if (BTA_SYS_CONN_BUSY == status) { /* set SSR4 for A2DP on SYS CONN BUSY */ index = BTA_DM_PM_SSR4; } else if (BTA_SYS_CONN_IDLE == status) { index = p_bta_dm_pm_spec[p_bta_dm_pm_cfg[i].spec_idx].ssr; } } #endif Loading Loading @@ -446,7 +453,7 @@ static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, uint8_t id, || index == BTA_DM_PM_SSR_HH #endif ) { bta_dm_pm_ssr(peer_addr); bta_dm_pm_ssr(peer_addr, index); } else { uint8_t* p = NULL; if (((NULL != (p = BTM_ReadLocalFeatures())) && Loading @@ -459,7 +466,7 @@ static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, uint8_t id, BTM_SetSsrParams(peer_addr, 0, 0, 0); } else if (status == BTA_SYS_SCO_CLOSE) { APPL_TRACE_DEBUG("%s: SCO active, back to old SSR", __func__); bta_dm_pm_ssr(peer_addr); bta_dm_pm_ssr(peer_addr, BTA_DM_PM_SSR0); } } } Loading Loading @@ -751,9 +758,9 @@ static bool bta_dm_pm_sniff(tBTA_DM_PEER_DEVICE* p_peer_dev, uint8_t index) { * ******************************************************************************/ #if (BTM_SSR_INCLUDED == TRUE) static void bta_dm_pm_ssr(const RawAddress& peer_addr) { static void bta_dm_pm_ssr(const RawAddress& peer_addr, int ssr) { int current_ssr_index; int ssr_index = BTA_DM_PM_SSR0; int ssr_index = ssr; tBTA_DM_SSR_SPEC* p_spec = &p_bta_dm_ssr_spec[ssr_index]; /* go through the connected services */ Loading Loading @@ -913,7 +920,7 @@ void bta_dm_pm_btm_status(const RawAddress& bd_addr, tBTM_PM_STATUS status, #if (BTM_SSR_INCLUDED == TRUE) if (p_dev->prev_low) { /* need to send the SSR paramaters to controller again */ bta_dm_pm_ssr(p_dev->peer_bdaddr); bta_dm_pm_ssr(p_dev->peer_bdaddr, BTA_DM_PM_SSR0); } p_dev->prev_low = BTM_PM_STS_ACTIVE; #endif Loading Loading
system/bta/dm/bta_dm_cfg.cc +7 −5 Original line number Diff line number Diff line Loading @@ -171,7 +171,8 @@ tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_SPEC bta_dm_pm_spec[BTA_DM_NUM_PM_SPEC] = { {BTA_DM_PM_NO_ACTION, 0}}, /* sco open, active */ {{BTA_DM_PM_SNIFF_A2DP_IDX, 7000}, {BTA_DM_PM_NO_ACTION, 0}}, /* sco close sniff */ {{BTA_DM_PM_SNIFF_A2DP_IDX, 7000}, {BTA_DM_PM_NO_ACTION, 0}}, /* idle */ {{BTA_DM_PM_SNIFF_A2DP_IDX, 7000}, {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_NO_ACTION, 0}} /* mode change retry */ Loading Loading @@ -241,7 +242,7 @@ tBTA_DM_PM_TYPE_QUALIFIER tBTA_DM_PM_SPEC bta_dm_pm_spec[BTA_DM_NUM_PM_SPEC] = { /* AV : 4 */ {(BTA_DM_PM_SNIFF), /* allow sniff */ #if (BTM_SSR_INCLUDED == TRUE) (BTA_DM_PM_SSR0), /* the SSR entry */ (BTA_DM_PM_SSR2), /* the SSR entry */ #endif { {{BTA_DM_PM_SNIFF_A2DP_IDX, 7000}, Loading Loading @@ -586,7 +587,8 @@ tBTA_DM_SSR_SPEC bta_dm_ssr_spec[] = { individual device preference from HH module */ {0, 0, 2}, {1200, 2, 2}, /* BTA_DM_PM_SSR2 - others (as long as sniff is allowed)*/ {360, 160, 1600} /* BTA_DM_PM_SSR3 - HD */ {360, 160, 1600}, /* BTA_DM_PM_SSR3 - HD */ {1200, 65534, 65534} /* BTA_DM_PM_SSR4 - A2DP streaming */ }; tBTA_DM_SSR_SPEC* p_bta_dm_ssr_spec = &bta_dm_ssr_spec[0]; Loading
system/bta/dm/bta_dm_pm.cc +13 −6 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ static void bta_dm_pm_stop_timer_by_index(tBTA_PM_TIMER* p_timer, * can use it */ #define BTA_DM_PM_SSR_HH BTA_DM_PM_SSR1 #endif static void bta_dm_pm_ssr(const RawAddress& peer_addr); static void bta_dm_pm_ssr(const RawAddress& peer_addr, int ssr); #endif tBTA_DM_CONNECTED_SRVCS bta_dm_conn_srvcs; Loading Loading @@ -363,6 +363,13 @@ static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, uint8_t id, if ((BTA_SYS_CONN_OPEN == status) && p_dev && (p_dev->info & BTA_DM_DI_USE_SSR)) { index = p_bta_dm_pm_spec[p_bta_dm_pm_cfg[i].spec_idx].ssr; } else if (BTA_ID_AV == id) { if (BTA_SYS_CONN_BUSY == status) { /* set SSR4 for A2DP on SYS CONN BUSY */ index = BTA_DM_PM_SSR4; } else if (BTA_SYS_CONN_IDLE == status) { index = p_bta_dm_pm_spec[p_bta_dm_pm_cfg[i].spec_idx].ssr; } } #endif Loading Loading @@ -446,7 +453,7 @@ static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, uint8_t id, || index == BTA_DM_PM_SSR_HH #endif ) { bta_dm_pm_ssr(peer_addr); bta_dm_pm_ssr(peer_addr, index); } else { uint8_t* p = NULL; if (((NULL != (p = BTM_ReadLocalFeatures())) && Loading @@ -459,7 +466,7 @@ static void bta_dm_pm_cback(tBTA_SYS_CONN_STATUS status, uint8_t id, BTM_SetSsrParams(peer_addr, 0, 0, 0); } else if (status == BTA_SYS_SCO_CLOSE) { APPL_TRACE_DEBUG("%s: SCO active, back to old SSR", __func__); bta_dm_pm_ssr(peer_addr); bta_dm_pm_ssr(peer_addr, BTA_DM_PM_SSR0); } } } Loading Loading @@ -751,9 +758,9 @@ static bool bta_dm_pm_sniff(tBTA_DM_PEER_DEVICE* p_peer_dev, uint8_t index) { * ******************************************************************************/ #if (BTM_SSR_INCLUDED == TRUE) static void bta_dm_pm_ssr(const RawAddress& peer_addr) { static void bta_dm_pm_ssr(const RawAddress& peer_addr, int ssr) { int current_ssr_index; int ssr_index = BTA_DM_PM_SSR0; int ssr_index = ssr; tBTA_DM_SSR_SPEC* p_spec = &p_bta_dm_ssr_spec[ssr_index]; /* go through the connected services */ Loading Loading @@ -913,7 +920,7 @@ void bta_dm_pm_btm_status(const RawAddress& bd_addr, tBTM_PM_STATUS status, #if (BTM_SSR_INCLUDED == TRUE) if (p_dev->prev_low) { /* need to send the SSR paramaters to controller again */ bta_dm_pm_ssr(p_dev->peer_bdaddr); bta_dm_pm_ssr(p_dev->peer_bdaddr, BTA_DM_PM_SSR0); } p_dev->prev_low = BTM_PM_STS_ACTIVE; #endif Loading