Lines Matching refs:pm_timer
91 bta_dm_cb.pm_timer[i].srvc_id[j] = BTA_ID_MAX; in bta_dm_init_pm()
121 bta_dm_pm_stop_timer_by_index(&bta_dm_cb.pm_timer[i], j); in bta_dm_disable_pm()
122 bta_dm_cb.pm_timer[i].pm_action[j] = BTA_DM_PM_NO_ACTION; in bta_dm_disable_pm()
164 if (bta_dm_cb.pm_timer[i].in_use && !bdcmp(bta_dm_cb.pm_timer[i].peer_bdaddr, peer_addr)) in bta_dm_pm_stop_timer()
168 bta_dm_pm_stop_timer_by_index(&bta_dm_cb.pm_timer[i], j); in bta_dm_pm_stop_timer()
226 if (bta_dm_cb.pm_timer[i].in_use && !bdcmp(bta_dm_cb.pm_timer[i].peer_bdaddr, peer_addr)) in bta_dm_pm_stop_timer_by_mode()
228 if (bta_dm_cb.pm_timer[i].srvc_id[timer_idx] != BTA_ID_MAX) in bta_dm_pm_stop_timer_by_mode()
230 bta_dm_pm_stop_timer_by_index(&bta_dm_cb.pm_timer[i], timer_idx); in bta_dm_pm_stop_timer_by_mode()
237 bta_dm_cb.pm_timer[i].pm_action[timer_idx] = power_mode; in bta_dm_pm_stop_timer_by_mode()
258 if (bta_dm_cb.pm_timer[i].in_use && !bdcmp(bta_dm_cb.pm_timer[i].peer_bdaddr, peer_addr)) in bta_dm_pm_stop_timer_by_srvc_id()
262 if (bta_dm_cb.pm_timer[i].srvc_id[j] == srvc_id) in bta_dm_pm_stop_timer_by_srvc_id()
264 bta_dm_pm_stop_timer_by_index(&bta_dm_cb.pm_timer[i], j); in bta_dm_pm_stop_timer_by_srvc_id()
265 bta_dm_cb.pm_timer[i].pm_action[j] = BTA_DM_PM_NO_ACTION; in bta_dm_pm_stop_timer_by_srvc_id()
637 … if (bta_dm_cb.pm_timer[i].in_use && bdcmp(bta_dm_cb.pm_timer[i].peer_bdaddr, peer_addr) == 0) in bta_dm_pm_set_mode()
641 remaining_ms = alarm_get_remaining_ms(bta_dm_cb.pm_timer[i].timer[timer_idx]); in bta_dm_pm_set_mode()
652 bta_dm_pm_stop_timer_by_index(&bta_dm_cb.pm_timer[i], in bta_dm_pm_set_mode()
654 bta_dm_pm_start_timer(&bta_dm_cb.pm_timer[i], in bta_dm_pm_set_mode()
662 else if (!bta_dm_cb.pm_timer[i].in_use) in bta_dm_pm_set_mode()
675 bdcpy(bta_dm_cb.pm_timer[available_timer].peer_bdaddr, peer_addr); in bta_dm_pm_set_mode()
678 bta_dm_pm_start_timer(&bta_dm_cb.pm_timer[available_timer], in bta_dm_pm_set_mode()
964 APPL_TRACE_DEBUG("dm_pm_timer[%d] in use? %d", i, bta_dm_cb.pm_timer[i].in_use); in bta_dm_pm_timer_cback()
965 if (bta_dm_cb.pm_timer[i].in_use) in bta_dm_pm_timer_cback()
969 if (bta_dm_cb.pm_timer[i].timer[j] == alarm) in bta_dm_pm_timer_cback()
971 bta_dm_cb.pm_timer[i].active --; in bta_dm_pm_timer_cback()
972 bta_dm_cb.pm_timer[i].srvc_id[j] = BTA_ID_MAX; in bta_dm_pm_timer_cback()
977 if (bta_dm_cb.pm_timer[i].active == 0) in bta_dm_pm_timer_cback()
978 bta_dm_cb.pm_timer[i].in_use = FALSE; in bta_dm_pm_timer_cback()
991 p_buf->pm_request = bta_dm_cb.pm_timer[i].pm_action[j]; in bta_dm_pm_timer_cback()
992 bdcpy(p_buf->bd_addr, bta_dm_cb.pm_timer[i].peer_bdaddr); in bta_dm_pm_timer_cback()
1114 bta_dm_pm_set_mode(p_data->pm_timer.bd_addr, p_data->pm_timer.pm_request, BTA_DM_PM_EXECUTE); in bta_dm_pm_timer()