Lines Matching refs:sco

161     if (bta_ag_cb.sco.p_curr_scb != NULL && bta_ag_cb.sco.p_curr_scb->in_use)  in bta_ag_sco_conn_cback()
163 handle = bta_ag_scb_to_idx(bta_ag_cb.sco.p_curr_scb); in bta_ag_sco_conn_cback()
182 bta_ag_cb.sco.p_curr_scb = NULL; in bta_ag_sco_conn_cback()
183 bta_ag_cb.sco.state = BTA_AG_SCO_SHUTDOWN_ST; in bta_ag_sco_conn_cback()
202 …: 0x%x p_cur_scb: 0x%08x sco.state: %d", sco_idx, bta_ag_cb.sco.p_curr_scb, bta_ag_cb.sco.state); in bta_ag_sco_disc_cback()
210 if (bta_ag_cb.sco.p_curr_scb != NULL && bta_ag_cb.sco.p_curr_scb->in_use) in bta_ag_sco_disc_cback()
213 if (bta_ag_cb.sco.p_curr_scb->sco_idx != sco_idx) in bta_ag_sco_disc_cback()
215 if (bta_ag_cb.sco.p_curr_scb->sco_idx != 0xFFFF) in bta_ag_sco_disc_cback()
218 handle = bta_ag_scb_to_idx(bta_ag_cb.sco.p_curr_scb); in bta_ag_sco_disc_cback()
232 if(bta_ag_cb.sco.p_curr_scb->inuse_codec == BTA_AG_CODEC_MSBC) in bta_ag_sco_disc_cback()
239 if (bta_ag_sco_is_opening (bta_ag_cb.sco.p_curr_scb)) in bta_ag_sco_disc_cback()
241 if (bta_ag_cb.sco.p_curr_scb->codec_msbc_settings == BTA_AG_SCO_MSBC_SETTINGS_T2) in bta_ag_sco_disc_cback()
244 bta_ag_cb.sco.p_curr_scb->codec_msbc_settings = BTA_AG_SCO_MSBC_SETTINGS_T1; in bta_ag_sco_disc_cback()
249 bta_ag_cb.sco.p_curr_scb->codec_fallback = TRUE; in bta_ag_sco_disc_cback()
254 bta_ag_cb.sco.p_curr_scb->inuse_codec = BTA_AG_CODEC_NONE; in bta_ag_sco_disc_cback()
266 if (bta_ag_cb.sco.p_curr_scb != NULL) in bta_ag_sco_disc_cback()
268 bta_ag_cb.sco.p_curr_scb->sco_idx = BTM_INVALID_SCO_INDEX; in bta_ag_sco_disc_cback()
269 bta_ag_cb.sco.p_curr_scb = NULL; in bta_ag_sco_disc_cback()
270 bta_ag_cb.sco.state = BTA_AG_SCO_SHUTDOWN_ST; in bta_ag_sco_disc_cback()
313 if (!only_active || p_scb->sco_idx == bta_ag_cb.sco.cur_idx) in bta_ag_remove_sco()
322 bta_ag_cb.sco.p_curr_scb = p_scb; in bta_ag_remove_sco()
362 if (!bta_ag_cb.sco.p_curr_scb) in bta_ag_esco_connreq_cback()
367 bta_ag_cb.sco.state = BTA_AG_SCO_OPENING_ST; in bta_ag_esco_connreq_cback()
368 bta_ag_cb.sco.p_curr_scb = p_scb; in bta_ag_esco_connreq_cback()
369 bta_ag_cb.sco.cur_idx = p_scb->sco_idx; in bta_ag_esco_connreq_cback()
374 bta_ag_cb.sco.p_xfer_scb = p_scb; in bta_ag_esco_connreq_cback()
375 bta_ag_cb.sco.conn_data = p_data->conn_evt; in bta_ag_esco_connreq_cback()
376 bta_ag_cb.sco.state = BTA_AG_SCO_OPEN_XFER_ST; in bta_ag_esco_connreq_cback()
378 if (!bta_ag_remove_sco(bta_ag_cb.sco.p_curr_scb, TRUE)) in bta_ag_esco_connreq_cback()
381 bta_ag_cb.sco.p_xfer_scb = NULL; in bta_ag_esco_connreq_cback()
382 bta_ag_cb.sco.state = BTA_AG_SCO_LISTEN_ST; in bta_ag_esco_connreq_cback()
417 tBTA_AG_HDR sco; in bta_ag_cback_sco() local
419 sco.handle = bta_ag_scb_to_idx(p_scb); in bta_ag_cback_sco()
420 sco.app_id = p_scb->app_id; in bta_ag_cback_sco()
423 (*bta_ag_cb.p_cback)(event, (tBTA_AG *) &sco); in bta_ag_cback_sco()
493 if(bta_ag_cb.sco.param_updated) /* If we do not use the default parameters */ in bta_ag_create_sco()
494 params = bta_ag_cb.sco.params; in bta_ag_create_sco()
496 if(!bta_ag_cb.sco.param_updated) in bta_ag_create_sco()
548 bta_ag_cb.sco.p_curr_scb = p_scb; in bta_ag_create_sco()
587 bta_ag_cb.sco.cur_idx = p_scb->sco_idx; in bta_ag_create_sco()
605 bta_ag_cb.sco.cur_idx = p_scb->sco_idx; in bta_ag_create_sco()
666 bta_ag_cb.sco.p_curr_scb = p_scb; in bta_ag_codec_negotiate()
706 tBTA_AG_SCO_CB *p_sco = &bta_ag_cb.sco; in bta_ag_sco_event()
1294 return ((bta_ag_cb.sco.state == BTA_AG_SCO_OPEN_ST) && in bta_ag_sco_is_open()
1295 (bta_ag_cb.sco.p_curr_scb == p_scb)); in bta_ag_sco_is_open()
1311 return (((bta_ag_cb.sco.state == BTA_AG_SCO_OPENING_ST) || in bta_ag_sco_is_opening()
1312 (bta_ag_cb.sco.state == BTA_AG_SCO_OPENING_ST)) && in bta_ag_sco_is_opening()
1313 (bta_ag_cb.sco.p_curr_scb == p_scb)); in bta_ag_sco_is_opening()
1315 return ((bta_ag_cb.sco.state == BTA_AG_SCO_OPENING_ST) && in bta_ag_sco_is_opening()
1316 (bta_ag_cb.sco.p_curr_scb == p_scb)); in bta_ag_sco_is_opening()
1352 if (bta_ag_cb.sco.p_curr_scb != NULL && bta_ag_cb.sco.p_curr_scb != p_scb) in bta_ag_sco_open()
1382 if ((p_scb->sco_idx != BTM_INVALID_SCO_INDEX) || (bta_ag_cb.sco.state == BTA_AG_SCO_CODEC_ST)) in bta_ag_sco_close()
1491 bta_ag_cb.sco.p_curr_scb = NULL; in bta_ag_sco_conn_close()
1517 sco_state_t sco_state = bta_ag_cb.sco.p_xfer_scb ? SCO_STATE_OFF_TRANSFER : SCO_STATE_OFF; in bta_ag_sco_conn_close()
1565 if (bta_ag_cb.sco.state == BTA_AG_SCO_LISTEN_ST || in bta_ag_sco_conn_rsp()
1566 bta_ag_cb.sco.state == BTA_AG_SCO_CLOSE_XFER_ST || in bta_ag_sco_conn_rsp()
1567 bta_ag_cb.sco.state == BTA_AG_SCO_OPEN_XFER_ST) in bta_ag_sco_conn_rsp()
1570 if (bta_ag_cb.sco.param_updated) in bta_ag_sco_conn_rsp()
1572 resp = bta_ag_cb.sco.params; in bta_ag_sco_conn_rsp()
1664 bta_ag_cb.sco.param_updated = FALSE; in bta_ag_set_esco_param()
1669 bta_ag_cb.sco.param_updated = TRUE; in bta_ag_set_esco_param()
1670 bta_ag_cb.sco.params = *param; in bta_ag_set_esco_param()