• Home
  • Raw
  • Download

Lines Matching refs:idx

261 static void send_at_result(UINT8 ok_flag, UINT16 errcode, int idx)  in send_at_result()  argument
272 BTA_AgResult (btif_hf_cb[idx].handle, BTA_AG_UNAT_RES, &ag_res); in send_at_result()
295 void clear_phone_state_multihf(int idx) in clear_phone_state_multihf() argument
297 btif_hf_cb[idx].call_setup_state = BTHF_CALL_STATE_IDLE; in clear_phone_state_multihf()
298 btif_hf_cb[idx].num_active = btif_hf_cb[idx].num_held = 0; in clear_phone_state_multihf()
392 int idx = p_data->hdr.handle - 1; in btif_hf_upstreams_evt() local
403 btif_hf_cb[idx].handle = p_data->reg.hdr.handle; in btif_hf_upstreams_evt()
405 "btif_hf_cb.handle = %d", __FUNCTION__, btif_hf_cb[idx].handle); in btif_hf_upstreams_evt()
411 bdcpy(btif_hf_cb[idx].connected_bda.address, in btif_hf_upstreams_evt()
413 btif_hf_cb[idx].state = BTHF_CONNECTION_STATE_CONNECTED; in btif_hf_upstreams_evt()
414 btif_hf_cb[idx].peer_feat = 0; in btif_hf_upstreams_evt()
415 clear_phone_state_multihf(idx); in btif_hf_upstreams_evt()
417 else if (btif_hf_cb[idx].state == BTHF_CONNECTION_STATE_CONNECTING) in btif_hf_upstreams_evt()
419 btif_hf_cb[idx].state = BTHF_CONNECTION_STATE_DISCONNECTED; in btif_hf_upstreams_evt()
424 __FUNCTION__, p_data->open.status, btif_hf_cb[idx].state, in btif_hf_upstreams_evt()
425 bd2str(&btif_hf_cb[idx].connected_bda, &bdstr)); in btif_hf_upstreams_evt()
429 HAL_CBACK(bt_hf_callbacks, connection_state_cb, btif_hf_cb[idx].state, in btif_hf_upstreams_evt()
430 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
432 if (btif_hf_cb[idx].state == BTHF_CONNECTION_STATE_DISCONNECTED) in btif_hf_upstreams_evt()
433 bdsetany(btif_hf_cb[idx].connected_bda.address); in btif_hf_upstreams_evt()
440 btif_hf_cb[idx].connected_timestamp.tv_sec = 0; in btif_hf_upstreams_evt()
441 btif_hf_cb[idx].state = BTHF_CONNECTION_STATE_DISCONNECTED; in btif_hf_upstreams_evt()
443 "idx = %d, btif_hf_cb.handle = %d", __FUNCTION__, idx, in btif_hf_upstreams_evt()
444 btif_hf_cb[idx].handle); in btif_hf_upstreams_evt()
445 HAL_CBACK(bt_hf_callbacks, connection_state_cb, btif_hf_cb[idx].state, in btif_hf_upstreams_evt()
446 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
447 bdsetany(btif_hf_cb[idx].connected_bda.address); in btif_hf_upstreams_evt()
448 btif_hf_cb[idx].peer_feat = 0; in btif_hf_upstreams_evt()
449 clear_phone_state_multihf(idx); in btif_hf_upstreams_evt()
459 &btif_hf_cb[idx].connected_timestamp); in btif_hf_upstreams_evt()
461 __FUNCTION__, idx); in btif_hf_upstreams_evt()
462 btif_hf_cb[idx].peer_feat = p_data->conn.peer_feat; in btif_hf_upstreams_evt()
463 btif_hf_cb[idx].state = BTHF_CONNECTION_STATE_SLC_CONNECTED; in btif_hf_upstreams_evt()
466 HAL_CBACK(bt_hf_callbacks, connection_state_cb, btif_hf_cb[idx].state, in btif_hf_upstreams_evt()
467 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
472 hf_idx = idx; in btif_hf_upstreams_evt()
474 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
479 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
488 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
493 hf_idx = idx; in btif_hf_upstreams_evt()
498 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
505 hf_idx = idx; in btif_hf_upstreams_evt()
511 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
516 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
521 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
526 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
532 BTHF_VR_STATE_STOPPED, &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
538 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
547 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
555 { HAL_CBACK(bt_hf_callbacks, wbs_cb, BTHF_WBS_NO, &btif_hf_cb[idx].connected_bda);} in btif_hf_upstreams_evt()
557 {HAL_CBACK(bt_hf_callbacks, wbs_cb, BTHF_WBS_YES, &btif_hf_cb[idx].connected_bda);} in btif_hf_upstreams_evt()
559 {HAL_CBACK(bt_hf_callbacks, wbs_cb, BTHF_WBS_NONE, &btif_hf_cb[idx].connected_bda);} in btif_hf_upstreams_evt()
565 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
570 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
575 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
580 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
585 &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
591 send_at_result(BTA_AG_OK_ERROR, BTA_AG_ERR_OP_NOT_SUPPORTED, idx); in btif_hf_upstreams_evt()
602 BTA_AgSetCodec(btif_hf_cb[idx].handle,BTA_AG_CODEC_MSBC); in btif_hf_upstreams_evt()
607 BTA_AgSetCodec(btif_hf_cb[idx].handle,BTA_AG_CODEC_CVSD); in btif_hf_upstreams_evt()
615 BTHF_WBS_YES : BTHF_WBS_NO, &btif_hf_cb[idx].connected_bda); in btif_hf_upstreams_evt()
671 int idx = btif_hf_idx_by_bdaddr((bt_bdaddr_t *)p_param); in btif_in_hf_generic_evt() local
678 &btif_hf_cb[idx].connected_bda); in btif_in_hf_generic_evt()
783 int idx = btif_hf_idx_by_bdaddr(bd_addr); in disconnect() local
785 if (is_connected(bd_addr) && (idx != BTIF_HF_INVALID_IDX)) in disconnect()
787 BTA_AgClose(btif_hf_cb[idx].handle); in disconnect()
807 int idx = btif_hf_idx_by_bdaddr(bd_addr); in connect_audio() local
809 if (is_connected(bd_addr) && (idx != BTIF_HF_INVALID_IDX)) in connect_audio()
811 BTA_AgAudioOpen(btif_hf_cb[idx].handle); in connect_audio()
835 int idx = btif_hf_idx_by_bdaddr(bd_addr); in disconnect_audio() local
837 if (is_connected(bd_addr) && (idx != BTIF_HF_INVALID_IDX)) in disconnect_audio()
839 BTA_AgAudioClose(btif_hf_cb[idx].handle); in disconnect_audio()
859 int idx = btif_hf_idx_by_bdaddr(bd_addr); in start_voice_recognition() local
861 if (is_connected(bd_addr) && (idx != BTIF_HF_INVALID_IDX)) in start_voice_recognition()
863 if (btif_hf_cb[idx].peer_feat & BTA_AG_PEER_FEAT_VREC) in start_voice_recognition()
868 BTA_AgResult (btif_hf_cb[idx].handle, BTA_AG_BVRA_RES, &ag_res); in start_voice_recognition()
894 int idx = btif_hf_idx_by_bdaddr(bd_addr); in stop_voice_recognition() local
896 if (is_connected(bd_addr) && (idx != BTIF_HF_INVALID_IDX)) in stop_voice_recognition()
898 if (btif_hf_cb[idx].peer_feat & BTA_AG_PEER_FEAT_VREC) in stop_voice_recognition()
903 BTA_AgResult (btif_hf_cb[idx].handle, BTA_AG_BVRA_RES, &ag_res); in stop_voice_recognition()
930 int idx = btif_hf_idx_by_bdaddr(bd_addr); in volume_control() local
934 if (is_connected(bd_addr) && (idx != BTIF_HF_INVALID_IDX)) in volume_control()
937 BTA_AgResult(btif_hf_cb[idx].handle, in volume_control()
990 int idx = btif_hf_idx_by_bdaddr(bd_addr); in cops_response() local
992 if (is_connected(bd_addr) && (idx != BTIF_HF_INVALID_IDX)) in cops_response()
1000 BTA_AgResult (btif_hf_cb[idx].handle, BTA_AG_COPS_RES, &ag_res); in cops_response()
1022 int idx = btif_hf_idx_by_bdaddr(bd_addr); in cind_response() local
1024 if (is_connected(bd_addr) && (idx != BTIF_HF_INVALID_IDX)) in cind_response()
1041 BTA_AgResult (btif_hf_cb[idx].handle, BTA_AG_CIND_RES, &ag_res); in cind_response()
1062 int idx = btif_hf_idx_by_bdaddr(bd_addr); in formatted_at_response() local
1064 if (is_connected(bd_addr) && (idx != BTIF_HF_INVALID_IDX)) in formatted_at_response()
1069 BTA_AgResult (btif_hf_cb[idx].handle, BTA_AG_UNAT_RES, &ag_res); in formatted_at_response()
1091 int idx = btif_hf_idx_by_bdaddr(bd_addr); in at_response() local
1093 if (is_connected(bd_addr) && (idx != BTIF_HF_INVALID_IDX)) in at_response()
1096 : BTA_AG_OK_ERROR, error_code, idx); in at_response()
1122 int idx = btif_hf_idx_by_bdaddr(bd_addr); in clcc_response() local
1124 if (is_connected(bd_addr) && (idx != BTIF_HF_INVALID_IDX)) in clcc_response()
1151 BTA_AgResult (btif_hf_cb[idx].handle, BTA_AG_CLCC_RES, &ag_res); in clcc_response()
1177 int idx, i; in phone_state_change() local
1182 idx = hf_idx; in phone_state_change()
1184 idx = btif_hf_latest_connected_idx(); in phone_state_change()
1186 BTIF_TRACE_DEBUG("phone_state_change: idx = %d", idx); in phone_state_change()
1193 " call_setup=%s [prev: %s]", num_active, btif_hf_cb[idx].num_active, in phone_state_change()
1194 num_held, btif_hf_cb[idx].num_held, dump_hf_call_state(call_setup_state), in phone_state_change()
1195 dump_hf_call_state(btif_hf_cb[idx].call_setup_state)); in phone_state_change()
1204 if ((btif_hf_cb[idx].call_setup_state != BTHF_CALL_STATE_IDLE ) || in phone_state_change()
1205 (btif_hf_cb[idx].num_active) ||(btif_hf_cb[idx].num_held)) in phone_state_change()
1214 if (btif_hf_cb[idx].num_held) in phone_state_change()
1231 if ( (num_active == 1) && (btif_hf_cb[idx].num_active == 0) && (btif_hf_cb[idx].num_held == 0) in phone_state_change()
1232 && (btif_hf_cb[idx].call_setup_state == BTHF_CALL_STATE_IDLE) ) in phone_state_change()
1238 ag_res.audio_handle = btif_hf_cb[idx].handle; in phone_state_change()
1245 if (call_setup_state != btif_hf_cb[idx].call_setup_state) in phone_state_change()
1248 __FUNCTION__, dump_hf_call_state(btif_hf_cb[idx].call_setup_state), in phone_state_change()
1256 switch (btif_hf_cb[idx].call_setup_state) in phone_state_change()
1259 if (num_active > btif_hf_cb[idx].num_active) in phone_state_change()
1262 ag_res.audio_handle = btif_hf_cb[idx].handle; in phone_state_change()
1264 else if (num_held > btif_hf_cb[idx].num_held) in phone_state_change()
1271 if (num_active > btif_hf_cb[idx].num_active) in phone_state_change()
1305 ag_res.audio_handle = btif_hf_cb[idx].handle; in phone_state_change()
1310 if (btif_hf_cb[idx].call_setup_state == BTHF_CALL_STATE_IDLE) in phone_state_change()
1311 ag_res.audio_handle = btif_hf_cb[idx].handle; in phone_state_change()
1341 (btif_hf_cb[idx].num_active + btif_hf_cb[idx].num_held)) ) in phone_state_change()
1343 …%s: Active call states changed. old: %d new: %d", __FUNCTION__, btif_hf_cb[idx].num_active, num_ac… in phone_state_change()
1348 if (num_held != btif_hf_cb[idx].num_held) in phone_state_change()
1351 __FUNCTION__, btif_hf_cb[idx].num_held, num_held); in phone_state_change()
1356 if ( (call_setup_state == btif_hf_cb[idx].call_setup_state) && in phone_state_change()
1358 (num_active == btif_hf_cb[idx].num_active) && in phone_state_change()
1359 (num_held == btif_hf_cb[idx].num_held) ) in phone_state_change()
1437 int idx = btif_hf_idx_by_bdaddr(bd_addr); in configure_wbs() local
1441 BTA_AgSetCodec(btif_hf_cb[idx].handle,BTA_AG_CODEC_MSBC); in configure_wbs()
1443 BTA_AgSetCodec(btif_hf_cb[idx].handle,BTA_AG_CODEC_CVSD); in configure_wbs()
1445 BTA_AgSetCodec(btif_hf_cb[idx].handle,BTA_AG_CODEC_NONE); in configure_wbs()