Lines Matching refs:p_ccb
1186 BOOLEAN avdt_msg_send(tAVDT_CCB *p_ccb, BT_HDR *p_msg) in avdt_msg_send() argument
1200 p_tbl = avdt_ad_tc_tbl_by_type(AVDT_CHAN_SIG, p_ccb, NULL); in avdt_msg_send()
1205 p_ccb->p_curr_msg = p_msg; in avdt_msg_send()
1209 curr_msg_len = p_ccb->p_curr_msg->len; in avdt_msg_send()
1212 while ((!p_ccb->cong) && (p_ccb->p_curr_msg != NULL)) in avdt_msg_send()
1219 if ((p_ccb->p_curr_msg->offset == AVDT_MSG_OFFSET) && in avdt_msg_send()
1220 (p_ccb->p_curr_msg->len <= p_tbl->peer_mtu - AVDT_LEN_TYPE_SINGLE)) in avdt_msg_send()
1224 p_buf = p_ccb->p_curr_msg; in avdt_msg_send()
1227 else if ((p_ccb->p_curr_msg->offset == AVDT_MSG_OFFSET) && in avdt_msg_send()
1228 (p_ccb->p_curr_msg->len > p_tbl->peer_mtu - AVDT_LEN_TYPE_SINGLE)) in avdt_msg_send()
1232 nosp = (p_ccb->p_curr_msg->len + AVDT_LEN_TYPE_START - p_tbl->peer_mtu) / in avdt_msg_send()
1247 (UINT8 *)(p_ccb->p_curr_msg + 1) + p_ccb->p_curr_msg->offset, p_buf->len); in avdt_msg_send()
1250 else if ((p_ccb->p_curr_msg->offset > AVDT_MSG_OFFSET) && in avdt_msg_send()
1251 (p_ccb->p_curr_msg->len > (p_tbl->peer_mtu - AVDT_LEN_TYPE_CONT))) in avdt_msg_send()
1268 (UINT8 *)(p_ccb->p_curr_msg + 1) + p_ccb->p_curr_msg->offset, p_buf->len); in avdt_msg_send()
1275 p_buf = p_ccb->p_curr_msg; in avdt_msg_send()
1279 label = AVDT_LAYERSPEC_LABEL(p_ccb->p_curr_msg->layer_specific); in avdt_msg_send()
1280 msg = AVDT_LAYERSPEC_MSG(p_ccb->p_curr_msg->layer_specific); in avdt_msg_send()
1281 sig = (UINT8) p_ccb->p_curr_msg->event; in avdt_msg_send()
1289 p_ccb->p_curr_msg = NULL; in avdt_msg_send()
1298 … btu_start_timer(&p_ccb->timer_entry, BTU_TTYPE_AVDT_CCB_RSP, avdt_cb.rcb.sig_tout); in avdt_msg_send()
1302 … btu_start_timer(&p_ccb->timer_entry, BTU_TTYPE_AVDT_CCB_RET, avdt_cb.rcb.ret_tout); in avdt_msg_send()
1309 p_ccb->p_curr_msg->len -= p_buf->len; in avdt_msg_send()
1310 p_ccb->p_curr_msg->offset += p_buf->len; in avdt_msg_send()
1330 avdt_ad_write_req(AVDT_CHAN_SIG, p_ccb, NULL, p_buf); in avdt_msg_send()
1332 return (p_ccb->cong); in avdt_msg_send()
1346 BT_HDR *avdt_msg_asmbl(tAVDT_CCB *p_ccb, BT_HDR *p_buf) in avdt_msg_asmbl() argument
1368 if (p_ccb->p_rx_msg != NULL) in avdt_msg_asmbl()
1370 GKI_freebuf(p_ccb->p_rx_msg); in avdt_msg_asmbl()
1371 p_ccb->p_rx_msg = NULL; in avdt_msg_asmbl()
1380 if (p_ccb->p_rx_msg != NULL) in avdt_msg_asmbl()
1382 GKI_freebuf(p_ccb->p_rx_msg); in avdt_msg_asmbl()
1385 p_ccb->p_rx_msg = p_buf; in avdt_msg_asmbl()
1391 p_ccb->p_rx_msg->offset += p_ccb->p_rx_msg->len; in avdt_msg_asmbl()
1394 p_ccb->p_rx_msg->len -= 1; in avdt_msg_asmbl()
1402 if (p_ccb->p_rx_msg == NULL) in avdt_msg_asmbl()
1411 buf_len = GKI_get_buf_size(p_ccb->p_rx_msg) - sizeof(BT_HDR); in avdt_msg_asmbl()
1418 if ((p_ccb->p_rx_msg->offset + p_buf->len) > buf_len) in avdt_msg_asmbl()
1421 GKI_freebuf(p_ccb->p_rx_msg); in avdt_msg_asmbl()
1422 p_ccb->p_rx_msg = NULL; in avdt_msg_asmbl()
1429 memcpy((UINT8 *)(p_ccb->p_rx_msg + 1) + p_ccb->p_rx_msg->offset, in avdt_msg_asmbl()
1434 p_ccb->p_rx_msg->offset -= p_ccb->p_rx_msg->len; in avdt_msg_asmbl()
1435 p_ccb->p_rx_msg->len += p_buf->len; in avdt_msg_asmbl()
1436 p_ret = p_ccb->p_rx_msg; in avdt_msg_asmbl()
1437 p_ccb->p_rx_msg = NULL; in avdt_msg_asmbl()
1441 p_ccb->p_rx_msg->offset += p_buf->len; in avdt_msg_asmbl()
1442 p_ccb->p_rx_msg->len += p_buf->len; in avdt_msg_asmbl()
1467 void avdt_msg_send_cmd(tAVDT_CCB *p_ccb, void *p_scb, UINT8 sig_id, tAVDT_MSG *p_params) in avdt_msg_send_cmd() argument
1510 AVDT_BLD_LAYERSPEC(p_buf->layer_specific, AVDT_MSG_TYPE_CMD, p_ccb->label); in avdt_msg_send_cmd()
1513 p_ccb->label = (p_ccb->label + 1) % 16; in avdt_msg_send_cmd()
1516 GKI_enqueue(&p_ccb->cmd_q, p_buf); in avdt_msg_send_cmd()
1517 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL); in avdt_msg_send_cmd()
1536 void avdt_msg_send_rsp(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params) in avdt_msg_send_rsp() argument
1561 GKI_enqueue(&p_ccb->rsp_q, p_buf); in avdt_msg_send_rsp()
1562 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL); in avdt_msg_send_rsp()
1581 void avdt_msg_send_rej(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params) in avdt_msg_send_rej() argument
1623 GKI_enqueue(&p_ccb->rsp_q, p_buf); in avdt_msg_send_rej()
1624 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL); in avdt_msg_send_rej()
1642 void avdt_msg_send_grej(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params) in avdt_msg_send_grej() argument
1667 GKI_enqueue(&p_ccb->rsp_q, p_buf); in avdt_msg_send_grej()
1668 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL); in avdt_msg_send_grej()
1684 void avdt_msg_ind(tAVDT_CCB *p_ccb, BT_HDR *p_buf) in avdt_msg_ind() argument
1702 if ((p_buf = avdt_msg_asmbl(p_ccb, p_buf)) == NULL) in avdt_msg_ind()
1715 msg.hdr.ccb_idx = avdt_ccb_to_idx(p_ccb); in avdt_msg_ind()
1727 if (p_ccb->p_curr_cmd != NULL) in avdt_msg_ind()
1729 msg.hdr.sig_id = sig = (UINT8) p_ccb->p_curr_cmd->event; in avdt_msg_ind()
1748 avdt_msg_send_grej(p_ccb, sig, &msg); in avdt_msg_ind()
1762 msg.discover_rsp.p_sep_info = (tAVDT_SEP_INFO *) p_ccb->p_proc_data; in avdt_msg_ind()
1763 msg.discover_rsp.num_seps = p_ccb->proc_param; in avdt_msg_ind()
1769 msg.svccap.p_cfg = (tAVDT_CFG *) p_ccb->p_proc_data; in avdt_msg_ind()
1815 avdt_msg_send_rej(p_ccb, sig, &msg); in avdt_msg_ind()
1828 if ((p_ccb->p_curr_cmd != NULL) && in avdt_msg_ind()
1829 (p_ccb->p_curr_cmd->event == sig) && in avdt_msg_ind()
1830 (AVDT_LAYERSPEC_LABEL(p_ccb->p_curr_cmd->layer_specific) == label)) in avdt_msg_ind()
1833 btu_stop_timer(&p_ccb->timer_entry); in avdt_msg_ind()
1836 p_ccb->ret_count = 0; in avdt_msg_ind()
1854 avdt_ccb_event(p_ccb, (UINT8)(evt & ~AVDT_CCB_MKR), (tAVDT_CCB_EVT *) &msg); in avdt_msg_ind()
1868 scb_hdl = *((UINT8 *)(p_ccb->p_curr_cmd + 1)); in avdt_msg_ind()
1889 avdt_ccb_event(p_ccb, AVDT_CCB_RCVRSP_EVT, NULL); in avdt_msg_ind()