Lines Matching refs:p_rcb
74 tBTA_AV_RCB* p_rcb = NULL; in bta_av_get_rcb_by_shdl() local
80 p_rcb = &bta_av_cb.rcb[i]; in bta_av_get_rcb_by_shdl()
84 return p_rcb; in bta_av_get_rcb_by_shdl()
97 void bta_av_del_rc(tBTA_AV_RCB* p_rcb) { in bta_av_del_rc() argument
102 if (p_rcb->handle != BTA_AV_RC_HANDLE_NONE) { in bta_av_del_rc()
103 if (p_rcb->shdl) { in bta_av_del_rc()
105 if ((p_rcb->shdl - 1) < BTA_AV_NUM_STRS) { in bta_av_del_rc()
106 p_scb = bta_av_cb.p_scb[p_rcb->shdl - 1]; in bta_av_del_rc()
110 p_rcb->shdl, p_scb->rc_handle, p_rcb->handle); in bta_av_del_rc()
111 if (p_scb->rc_handle == p_rcb->handle) in bta_av_del_rc()
121 __func__, p_rcb->handle, p_rcb->status, in bta_av_del_rc()
123 rc_handle = p_rcb->handle; in bta_av_del_rc()
124 if (!(p_rcb->status & BTA_AV_RC_CONN_MASK) || in bta_av_del_rc()
125 ((p_rcb->status & BTA_AV_RC_ROLE_MASK) == BTA_AV_RC_ROLE_INT)) { in bta_av_del_rc()
126 p_rcb->status = 0; in bta_av_del_rc()
127 p_rcb->handle = BTA_AV_RC_HANDLE_NONE; in bta_av_del_rc()
128 p_rcb->shdl = 0; in bta_av_del_rc()
129 p_rcb->lidx = 0; in bta_av_del_rc()
137 __func__, p_rcb->handle, p_rcb->status, bta_av_cb.rc_acp_handle, in bta_av_del_rc()
138 p_rcb->lidx); in bta_av_del_rc()
313 tBTA_AV_RCB* p_rcb; in bta_av_rc_create() local
327 p_rcb = bta_av_get_rcb_by_shdl(shdl); in bta_av_rc_create()
328 if (p_rcb != NULL) { in bta_av_rc_create()
330 p_rcb->lidx = lidx; in bta_av_rc_create()
331 return p_rcb->handle; in bta_av_rc_create()
348 p_rcb = &p_cb->rcb[i]; in bta_av_rc_create()
350 if (p_rcb->handle != BTA_AV_RC_HANDLE_NONE) { in bta_av_rc_create()
354 p_rcb->handle = rc_handle; in bta_av_rc_create()
355 p_rcb->status = status; in bta_av_rc_create()
356 p_rcb->shdl = shdl; in bta_av_rc_create()
357 p_rcb->lidx = lidx; in bta_av_rc_create()
358 p_rcb->peer_features = 0; in bta_av_rc_create()
359 p_rcb->cover_art_psm = 0; in bta_av_rc_create()
362 p_cb->rc_acp_handle = p_rcb->handle; in bta_av_rc_create()
369 __func__, i, role, shdl, p_rcb->handle, lidx, p_rcb->status); in bta_av_rc_create()
486 tBTA_AV_RCB* p_rcb; in bta_av_rc_opened() local
523 p_rcb = bta_av_get_rcb_by_shdl(shdl); in bta_av_rc_opened()
524 if (p_rcb) { in bta_av_rc_opened()
525 p_rcb->shdl = p_cb->rcb[i].shdl; in bta_av_rc_opened()
526 tmp = p_rcb->lidx; in bta_av_rc_opened()
527 p_rcb->lidx = p_cb->rcb[i].lidx; in bta_av_rc_opened()
529 p_cb->rc_acp_handle = p_rcb->handle; in bta_av_rc_opened()
530 p_cb->rc_acp_idx = (p_rcb - p_cb->rcb) + 1; in bta_av_rc_opened()
599 tBTA_AV_RCB* p_rcb; in bta_av_rc_remote_cmd() local
602 p_rcb = &p_cb->rcb[p_data->hdr.layer_specific]; in bta_av_rc_remote_cmd()
603 if (p_rcb->status & BTA_AV_RC_CONN_MASK) { in bta_av_rc_remote_cmd()
604 AVRC_PassCmd(p_rcb->handle, p_data->api_remote_cmd.label, in bta_av_rc_remote_cmd()
621 tBTA_AV_RCB* p_rcb; in bta_av_rc_vendor_cmd() local
625 p_rcb = &p_cb->rcb[p_data->hdr.layer_specific]; in bta_av_rc_vendor_cmd()
626 AVRC_VendorCmd(p_rcb->handle, p_data->api_vendor.label, in bta_av_rc_vendor_cmd()
642 tBTA_AV_RCB* p_rcb; in bta_av_rc_vendor_rsp() local
646 p_rcb = &p_cb->rcb[p_data->hdr.layer_specific]; in bta_av_rc_vendor_rsp()
647 AVRC_VendorRsp(p_rcb->handle, p_data->api_vendor.label, in bta_av_rc_vendor_rsp()
663 tBTA_AV_RCB* p_rcb; in bta_av_rc_meta_rsp() local
670 p_rcb = &p_cb->rcb[p_data->hdr.layer_specific]; in bta_av_rc_meta_rsp()
671 if (p_rcb->handle != BTA_AV_RC_HANDLE_NONE) { in bta_av_rc_meta_rsp()
672 AVRC_MsgReq(p_rcb->handle, p_data->api_meta_rsp.label, in bta_av_rc_meta_rsp()
1021 tBTA_AV_RCB* p_rcb; in bta_av_rc_close() local
1024 p_rcb = &p_cb->rcb[handle]; in bta_av_rc_close()
1026 APPL_TRACE_DEBUG("%s: handle: %d, status=0x%x", __func__, p_rcb->handle, in bta_av_rc_close()
1027 p_rcb->status); in bta_av_rc_close()
1028 if (p_rcb->handle != BTA_AV_RC_HANDLE_NONE) { in bta_av_rc_close()
1029 if (p_rcb->shdl) { in bta_av_rc_close()
1030 p_scb = bta_av_cb.p_scb[p_rcb->shdl - 1]; in bta_av_rc_close()
1039 AVRC_Close(p_rcb->handle); in bta_av_rc_close()
1123 tBTA_AV_RCB *p_rcb, *p_rcb2; in bta_av_conn_chg() local
1179 p_rcb = &p_cb->rcb[p_cb->rc_acp_idx - 1]; in bta_av_conn_chg()
1180 p_rcb->shdl = bta_av_get_shdl(p_scb); in bta_av_conn_chg()
1182 index + 1, p_rcb->shdl, p_scb->rc_handle); in bta_av_conn_chg()
1184 p_rcb2 = bta_av_get_rcb_by_shdl(p_rcb->shdl); in bta_av_conn_chg()
1196 p_rcb->lidx = p_lcb->lidx; in bta_av_conn_chg()
1198 p_rcb->handle, p_rcb->lidx, in bta_av_conn_chg()
1199 p_cb->lcb[p_rcb->lidx - 1].lidx); in bta_av_conn_chg()
2049 tBTA_AV_RCB* p_rcb; in bta_av_rc_closed() local
2059 p_rcb = &p_cb->rcb[i]; in bta_av_rc_closed()
2061 p_rcb->handle, p_rcb->status); in bta_av_rc_closed()
2062 if (p_rcb->handle == p_msg->handle) { in bta_av_rc_closed()
2064 p_rcb->status &= ~BTA_AV_RC_CONN_MASK; in bta_av_rc_closed()
2065 p_rcb->peer_features = 0; in bta_av_rc_closed()
2066 p_rcb->cover_art_psm = 0; in bta_av_rc_closed()
2067 APPL_TRACE_DEBUG("%s: shdl:%d, lidx:%d", __func__, p_rcb->shdl, in bta_av_rc_closed()
2068 p_rcb->lidx); in bta_av_rc_closed()
2069 if (p_rcb->shdl) { in bta_av_rc_closed()
2070 if ((p_rcb->shdl - 1) < BTA_AV_NUM_STRS) { in bta_av_rc_closed()
2071 p_scb = bta_av_cb.p_scb[p_rcb->shdl - 1]; in bta_av_rc_closed()
2075 if (p_scb->rc_handle == p_rcb->handle) in bta_av_rc_closed()
2077 APPL_TRACE_DEBUG("%s: shdl:%d, srch:%d", __func__, p_rcb->shdl, in bta_av_rc_closed()
2080 p_rcb->shdl = 0; in bta_av_rc_closed()
2081 } else if (p_rcb->lidx == (BTA_AV_NUM_LINKS + 1)) { in bta_av_rc_closed()
2090 p_rcb->lidx = 0; in bta_av_rc_closed()
2092 if ((p_rcb->status & BTA_AV_RC_ROLE_MASK) == BTA_AV_RC_ROLE_INT) { in bta_av_rc_closed()
2094 p_rcb->handle = BTA_AV_RC_HANDLE_NONE; in bta_av_rc_closed()
2095 p_rcb->status = 0; in bta_av_rc_closed()
2098 bta_av_del_rc(p_rcb); in bta_av_rc_closed()
2100 } else if ((p_rcb->handle != BTA_AV_RC_HANDLE_NONE) && in bta_av_rc_closed()
2101 (p_rcb->status & BTA_AV_RC_CONN_MASK)) { in bta_av_rc_closed()