Home | History | Annotate | Download | only in avdt

Lines Matching refs:p_ccb

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