Lines Matching refs:control_block
232 static void send_indicator_update(const btif_hf_cb_t& control_block, in send_indicator_update() argument
237 BTA_AgResult(control_block.handle, BTA_AG_IND_RES, ag_res); in send_indicator_update()
675 static void UpdateCallStates(btif_hf_cb_t* control_block, int num_active, in UpdateCallStates() argument
677 control_block->num_active = num_active; in UpdateCallStates()
678 control_block->num_held = num_held; in UpdateCallStates()
679 control_block->call_setup_state = call_setup_state; in UpdateCallStates()
949 const btif_hf_cb_t& control_block = btif_hf_cb[idx]; in DeviceStatusNotification() local
954 send_indicator_update(control_block, BTA_AG_IND_SERVICE, in DeviceStatusNotification()
956 send_indicator_update(control_block, BTA_AG_IND_ROAM, in DeviceStatusNotification()
958 send_indicator_update(control_block, BTA_AG_IND_SIGNAL, signal); in DeviceStatusNotification()
959 send_indicator_update(control_block, BTA_AG_IND_BATTCHG, batt_chg); in DeviceStatusNotification()
1125 const btif_hf_cb_t& control_block = btif_hf_cb[idx]; in PhoneStateChange() local
1143 control_block.num_active, num_held, control_block.num_held, in PhoneStateChange()
1145 dump_hf_call_state(control_block.call_setup_state)); in PhoneStateChange()
1153 if (control_block.num_active > 0) { in PhoneStateChange()
1156 BTA_AgResult(control_block.handle, BTA_AG_END_CALL_RES, in PhoneStateChange()
1159 if (control_block.num_held) { in PhoneStateChange()
1160 send_indicator_update(control_block, BTA_AG_IND_CALLHELD, 0); in PhoneStateChange()
1177 if (((num_active + num_held) > 0) && (control_block.num_active == 0) && in PhoneStateChange()
1178 (control_block.num_held == 0) && in PhoneStateChange()
1179 (control_block.call_setup_state == BTHF_CALL_STATE_IDLE)) { in PhoneStateChange()
1195 BTA_AgResult(control_block.handle, res, ag_res); in PhoneStateChange()
1200 if (call_setup_state != control_block.call_setup_state) { in PhoneStateChange()
1204 dump_hf_call_state(control_block.call_setup_state), in PhoneStateChange()
1208 switch (control_block.call_setup_state) { in PhoneStateChange()
1210 if (num_active > control_block.num_active) { in PhoneStateChange()
1213 ag_res.audio_handle = control_block.handle; in PhoneStateChange()
1215 } else if (num_held > control_block.num_held) in PhoneStateChange()
1222 if (num_active > control_block.num_active) { in PhoneStateChange()
1229 __func__, control_block.call_setup_state, in PhoneStateChange()
1242 ag_res.audio_handle = control_block.handle; in PhoneStateChange()
1304 ag_res.audio_handle = control_block.handle; in PhoneStateChange()
1311 if ((control_block.call_setup_state == BTHF_CALL_STATE_IDLE) && in PhoneStateChange()
1313 ag_res.audio_handle = control_block.handle; in PhoneStateChange()
1319 control_block.call_setup_state, call_setup_state); in PhoneStateChange()
1327 BTA_AgResult(control_block.handle, res, ag_res); in PhoneStateChange()
1335 send_indicator_update(control_block, BTA_AG_IND_CALLHELD, 1); in PhoneStateChange()
1353 (control_block.num_active + control_block.num_held))) { in PhoneStateChange()
1355 << control_block.num_active << "->" << num_active << "], held=[" in PhoneStateChange()
1356 << control_block.num_held << "->" << num_held; in PhoneStateChange()
1357 send_indicator_update(control_block, BTA_AG_IND_CALL, in PhoneStateChange()
1363 if (num_held != control_block.num_held || in PhoneStateChange()
1364 ((num_active == 0) && ((num_held + control_block.num_held) > 1))) { in PhoneStateChange()
1366 control_block.num_held, num_held); in PhoneStateChange()
1367 send_indicator_update(control_block, BTA_AG_IND_CALLHELD, in PhoneStateChange()
1372 if ((call_setup_state == control_block.call_setup_state) && in PhoneStateChange()
1373 (num_active && num_held) && (num_active == control_block.num_active) && in PhoneStateChange()
1374 (num_held == control_block.num_held)) { in PhoneStateChange()
1376 send_indicator_update(control_block, BTA_AG_IND_CALLHELD, 1); in PhoneStateChange()
1385 if ((control_block.num_active == num_active && num_active != 0) && in PhoneStateChange()
1386 (control_block.num_held != num_held && num_held == 0)) { in PhoneStateChange()
1390 BTA_AgResult(control_block.handle, BTA_AG_IND_RES_ON_DEMAND, ag_res); in PhoneStateChange()