Lines Matching refs:j

92     for (int j = 0; j < BTA_DM_PM_MODE_TIMER_MAX; j++)  in bta_dm_init_pm()  local
93 bta_dm_cb.pm_timer[i].srvc_id[j] = BTA_ID_MAX; in bta_dm_init_pm()
118 for (int j = 0; j < BTA_DM_PM_MODE_TIMER_MAX; j++) { in bta_dm_disable_pm() local
119 bta_dm_pm_stop_timer_by_index(&bta_dm_cb.pm_timer[i], j); in bta_dm_disable_pm()
120 bta_dm_cb.pm_timer[i].pm_action[j] = BTA_DM_PM_NO_ACTION; in bta_dm_disable_pm()
159 for (int j = 0; j < BTA_DM_PM_MODE_TIMER_MAX; j++) { in bta_dm_pm_stop_timer() local
160 bta_dm_pm_stop_timer_by_index(&bta_dm_cb.pm_timer[i], j); in bta_dm_pm_stop_timer()
248 for (int j = 0; j < BTA_DM_PM_MODE_TIMER_MAX; j++) { in bta_dm_pm_stop_timer_by_srvc_id() local
249 if (bta_dm_cb.pm_timer[i].srvc_id[j] == srvc_id) { in bta_dm_pm_stop_timer_by_srvc_id()
250 bta_dm_pm_stop_timer_by_index(&bta_dm_cb.pm_timer[i], j); in bta_dm_pm_stop_timer_by_srvc_id()
251 bta_dm_cb.pm_timer[i].pm_action[j] = BTA_DM_PM_NO_ACTION; in bta_dm_pm_stop_timer_by_srvc_id()
333 uint8_t i, j; in bta_dm_pm_cback() local
388 for (j = 0; j < bta_dm_conn_srvcs.count; j++) { in bta_dm_pm_cback()
390 if ((bta_dm_conn_srvcs.conn_srvc[j].id == id) && in bta_dm_pm_cback()
391 (bta_dm_conn_srvcs.conn_srvc[j].app_id == app_id) && in bta_dm_pm_cback()
392 bta_dm_conn_srvcs.conn_srvc[j].peer_bdaddr == peer_addr) { in bta_dm_pm_cback()
393 bta_dm_conn_srvcs.conn_srvc[j].new_request = true; in bta_dm_pm_cback()
403 if (j != bta_dm_conn_srvcs.count) { in bta_dm_pm_cback()
406 for (; j < bta_dm_conn_srvcs.count; j++) { in bta_dm_pm_cback()
407 memcpy(&bta_dm_conn_srvcs.conn_srvc[j], in bta_dm_pm_cback()
408 &bta_dm_conn_srvcs.conn_srvc[j + 1], in bta_dm_pm_cback()
409 sizeof(bta_dm_conn_srvcs.conn_srvc[j])); in bta_dm_pm_cback()
415 } else if (j == bta_dm_conn_srvcs.count) { in bta_dm_pm_cback()
423 bta_dm_conn_srvcs.conn_srvc[j].id = id; in bta_dm_pm_cback()
424 bta_dm_conn_srvcs.conn_srvc[j].app_id = app_id; in bta_dm_pm_cback()
425 bta_dm_conn_srvcs.conn_srvc[j].new_request = true; in bta_dm_pm_cback()
426 bta_dm_conn_srvcs.conn_srvc[j].peer_bdaddr = peer_addr; in bta_dm_pm_cback()
432 bta_dm_conn_srvcs.conn_srvc[j].state = status; in bta_dm_pm_cback()
435 bta_dm_conn_srvcs.conn_srvc[j].state = status; in bta_dm_pm_cback()
509 uint8_t i, j; in bta_dm_pm_set_mode() local
542 for (j = 1; j <= p_bta_dm_pm_cfg[0].app_id; j++) { in bta_dm_pm_set_mode()
543 if ((p_bta_dm_pm_cfg[j].id == p_srvcs->id) && in bta_dm_pm_set_mode()
544 ((p_bta_dm_pm_cfg[j].app_id == BTA_ALL_APP_ID) || in bta_dm_pm_set_mode()
545 (p_bta_dm_pm_cfg[j].app_id == p_srvcs->app_id))) in bta_dm_pm_set_mode()
549 p_pm_cfg = &p_bta_dm_pm_cfg[j]; in bta_dm_pm_set_mode()
560 allowed_modes, j); in bta_dm_pm_set_mode()
796 for (int j = 1; j <= p_bta_dm_pm_cfg[0].app_id; j++) { in bta_dm_pm_ssr() local
798 const tBTA_DM_PM_CFG& config = p_bta_dm_pm_cfg[j]; in bta_dm_pm_ssr()
912 uint8_t i, j; in bta_dm_pm_timer_cback() local
920 for (j = 0; j < BTA_DM_PM_MODE_TIMER_MAX; j++) { in bta_dm_pm_timer_cback()
921 if (bta_dm_cb.pm_timer[i].timer[j] == alarm) { in bta_dm_pm_timer_cback()
923 bta_dm_cb.pm_timer[i].srvc_id[j] = BTA_ID_MAX; in bta_dm_pm_timer_cback()
924 APPL_TRACE_DEBUG("dm_pm_timer[%d] expires, timer_idx=%d", i, j); in bta_dm_pm_timer_cback()
930 if (j < BTA_DM_PM_MODE_TIMER_MAX) break; in bta_dm_pm_timer_cback()
940 bta_dm_cb.pm_timer[i].pm_action[j])); in bta_dm_pm_timer_cback()
1077 int j; in bta_dm_pm_is_sco_active() local
1080 for (j = 0; j < bta_dm_conn_srvcs.count; j++) { in bta_dm_pm_is_sco_active()
1082 if ((bta_dm_conn_srvcs.conn_srvc[j].id == BTA_ID_AG) && in bta_dm_pm_is_sco_active()
1083 (bta_dm_conn_srvcs.conn_srvc[j].state == BTA_SYS_SCO_OPEN)) { in bta_dm_pm_is_sco_active()
1101 for (int j = 0; j < bta_dm_conn_srvcs.count; j++) { in bta_dm_get_sco_index() local
1103 if ((bta_dm_conn_srvcs.conn_srvc[j].id == BTA_ID_AG) && in bta_dm_get_sco_index()
1104 (bta_dm_conn_srvcs.conn_srvc[j].state == BTA_SYS_SCO_OPEN)) { in bta_dm_get_sco_index()
1105 return j; in bta_dm_get_sco_index()
1121 int j; in bta_dm_pm_hid_check() local
1124 for (j = 0; j < bta_dm_conn_srvcs.count; j++) { in bta_dm_pm_hid_check()
1126 if (bta_dm_conn_srvcs.conn_srvc[j].id == BTA_ID_HH) { in bta_dm_pm_hid_check()
1129 bScoActive, bta_dm_conn_srvcs.conn_srvc[j].state); in bta_dm_pm_hid_check()
1130 auto peer_addr = bta_dm_conn_srvcs.conn_srvc[j].peer_bdaddr; in bta_dm_pm_hid_check()