Lines Matching refs:pm_action
120 bta_dm_cb.pm_timer[i].pm_action[j] = BTA_DM_PM_NO_ACTION; in bta_dm_disable_pm()
188 static uint8_t bta_pm_action_to_timer_idx(uint8_t pm_action) { in bta_pm_action_to_timer_idx() argument
189 if (pm_action == BTA_DM_PM_SUSPEND) in bta_pm_action_to_timer_idx()
191 else if (pm_action == BTA_DM_PM_PARK) in bta_pm_action_to_timer_idx()
193 else if ((pm_action & BTA_DM_PM_SNIFF) == BTA_DM_PM_SNIFF) in bta_pm_action_to_timer_idx()
226 bta_dm_cb.pm_timer[i].pm_action[timer_idx] = power_mode; in bta_dm_pm_stop_timer_by_mode()
251 bta_dm_cb.pm_timer[i].pm_action[j] = BTA_DM_PM_NO_ACTION; in bta_dm_pm_stop_timer_by_srvc_id()
271 uint8_t pm_action) { in bta_dm_pm_start_timer() argument
278 if (p_timer->pm_action[timer_idx] < pm_action) in bta_dm_pm_start_timer()
279 p_timer->pm_action[timer_idx] = pm_action; in bta_dm_pm_start_timer()
507 tBTA_DM_PM_ACTION pm_action = BTA_DM_PM_NO_ACTION; in bta_dm_pm_set_mode() local
568 if (p_act0->power_mode >= pm_action) { in bta_dm_pm_set_mode()
569 pm_action = p_act0->power_mode; in bta_dm_pm_set_mode()
581 if (p_act1->power_mode > pm_action) { in bta_dm_pm_set_mode()
582 pm_action = p_act1->power_mode; in bta_dm_pm_set_mode()
589 if (pm_action & (BTA_DM_PM_PARK | BTA_DM_PM_SNIFF)) { in bta_dm_pm_set_mode()
591 if (!(allowed_modes & pm_action)) { in bta_dm_pm_set_mode()
594 pm_action = in bta_dm_pm_set_mode()
598 if (pm_action == BTA_DM_PM_NO_ACTION) { in bta_dm_pm_set_mode()
608 timer_idx = bta_pm_action_to_timer_idx(pm_action); in bta_dm_pm_set_mode()
623 p_srvcs->id, pm_action); in bta_dm_pm_set_mode()
636 timer_idx = bta_pm_action_to_timer_idx(pm_action); in bta_dm_pm_set_mode()
639 timeout_ms, p_srvcs->id, pm_action); in bta_dm_pm_set_mode()
650 if (pm_req == BTA_DM_PM_EXECUTE && pm_request < pm_action) { in bta_dm_pm_set_mode()
654 if (pm_action == BTA_DM_PM_PARK) { in bta_dm_pm_set_mode()
659 } else if (pm_action & BTA_DM_PM_SNIFF) { in bta_dm_pm_set_mode()
667 bta_dm_pm_sniff(p_peer_device, (uint8_t)(pm_action & 0x0F)); in bta_dm_pm_set_mode()
672 } else if (pm_action == BTA_DM_PM_ACTIVE) { in bta_dm_pm_set_mode()
940 bta_dm_cb.pm_timer[i].pm_action[j])); in bta_dm_pm_timer_cback()