Home | History | Annotate | Download | only in avdt

Lines Matching refs:p_ccb

1196 BOOLEAN avdt_msg_send(tAVDT_CCB *p_ccb, BT_HDR *p_msg)
1210 p_tbl = avdt_ad_tc_tbl_by_type(AVDT_CHAN_SIG, p_ccb, NULL);
1215 p_ccb->p_curr_msg = p_msg;
1219 curr_msg_len = p_ccb->p_curr_msg->len;
1222 while ((!p_ccb->cong) && (p_ccb->p_curr_msg != NULL))
1229 if ((p_ccb->p_curr_msg->offset == AVDT_MSG_OFFSET) &&
1230 (p_ccb->p_curr_msg->len <= p_tbl->peer_mtu - AVDT_LEN_TYPE_SINGLE))
1234 p_buf = p_ccb->p_curr_msg;
1237 else if ((p_ccb->p_curr_msg->offset == AVDT_MSG_OFFSET) &&
1238 (p_ccb->p_curr_msg->len > p_tbl->peer_mtu - AVDT_LEN_TYPE_SINGLE))
1242 nosp = (p_ccb->p_curr_msg->len + AVDT_LEN_TYPE_START - p_tbl->peer_mtu) /
1257 (UINT8 *)(p_ccb->p_curr_msg + 1) + p_ccb->p_curr_msg->offset, p_buf->len);
1260 else if ((p_ccb->p_curr_msg->offset > AVDT_MSG_OFFSET) &&
1261 (p_ccb->p_curr_msg->len > (p_tbl->peer_mtu - AVDT_LEN_TYPE_CONT)))
1278 (UINT8 *)(p_ccb->p_curr_msg + 1) + p_ccb->p_curr_msg->offset, p_buf->len);
1285 p_buf = p_ccb->p_curr_msg;
1289 label = AVDT_LAYERSPEC_LABEL(p_ccb->p_curr_msg->layer_specific);
1290 msg = AVDT_LAYERSPEC_MSG(p_ccb->p_curr_msg->layer_specific);
1291 sig = (UINT8) p_ccb->p_curr_msg->event;
1299 p_ccb->p_curr_msg = NULL;
1308 btu_start_timer(&p_ccb->timer_entry, BTU_TTYPE_AVDT_CCB_RSP, avdt_cb.rcb.sig_tout);
1312 btu_start_timer(&p_ccb->timer_entry, BTU_TTYPE_AVDT_CCB_RET, avdt_cb.rcb.ret_tout);
1319 p_ccb->p_curr_msg->len -= p_buf->len;
1320 p_ccb->p_curr_msg->offset += p_buf->len;
1340 avdt_ad_write_req(AVDT_CHAN_SIG, p_ccb, NULL, p_buf);
1342 return (p_ccb->cong);
1356 BT_HDR *avdt_msg_asmbl(tAVDT_CCB *p_ccb, BT_HDR *p_buf)
1378 if (p_ccb->p_rx_msg != NULL)
1380 GKI_freebuf(p_ccb->p_rx_msg);
1381 p_ccb->p_rx_msg = NULL;
1390 if (p_ccb->p_rx_msg != NULL)
1392 GKI_freebuf(p_ccb->p_rx_msg);
1395 p_ccb->p_rx_msg = p_buf;
1401 p_ccb->p_rx_msg->offset += p_ccb->p_rx_msg->len;
1404 p_ccb->p_rx_msg->len -= 1;
1412 if (p_ccb->p_rx_msg == NULL)
1421 buf_len = GKI_get_buf_size(p_ccb->p_rx_msg) - sizeof(BT_HDR);
1428 if ((p_ccb->p_rx_msg->offset + p_buf->len) > buf_len)
1431 GKI_freebuf(p_ccb->p_rx_msg);
1432 p_ccb->p_rx_msg = NULL;
1439 memcpy((UINT8 *)(p_ccb->p_rx_msg + 1) + p_ccb->p_rx_msg->offset,
1444 p_ccb->p_rx_msg->offset -= p_ccb->p_rx_msg->len;
1445 p_ccb->p_rx_msg->len += p_buf->len;
1446 p_ret = p_ccb->p_rx_msg;
1447 p_ccb->p_rx_msg = NULL;
1451 p_ccb->p_rx_msg->offset += p_buf->len;
1452 p_ccb->p_rx_msg->len += p_buf->len;
1477 void avdt_msg_send_cmd(tAVDT_CCB *p_ccb, void *p_scb, UINT8 sig_id, tAVDT_MSG *p_params)
1520 AVDT_BLD_LAYERSPEC(p_buf->layer_specific, AVDT_MSG_TYPE_CMD, p_ccb->label);
1523 p_ccb->label = (p_ccb->label + 1) % 16;
1526 GKI_enqueue(&p_ccb->cmd_q, p_buf);
1527 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL);
1546 void avdt_msg_send_rsp(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params)
1571 GKI_enqueue(&p_ccb->rsp_q, p_buf);
1572 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL);
1591 void avdt_msg_send_rej(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params)
1633 GKI_enqueue(&p_ccb->rsp_q, p_buf);
1634 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL);
1652 void avdt_msg_send_grej(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params)
1677 GKI_enqueue(&p_ccb->rsp_q, p_buf);
1678 avdt_ccb_event(p_ccb, AVDT_CCB_SENDMSG_EVT, NULL);
1694 void avdt_msg_ind(tAVDT_CCB *p_ccb, BT_HDR *p_buf)
1712 if ((p_buf = avdt_msg_asmbl(p_ccb, p_buf)) == NULL)
1725 msg.hdr.ccb_idx = avdt_ccb_to_idx(p_ccb);
1737 if (p_ccb->p_curr_cmd != NULL)
1739 msg.hdr.sig_id = sig = (UINT8) p_ccb->p_curr_cmd->event;
1758 avdt_msg_send_grej(p_ccb, sig, &msg);
1772 msg.discover_rsp.p_sep_info = (tAVDT_SEP_INFO *) p_ccb->p_proc_data;
1773 msg.discover_rsp.num_seps = p_ccb->proc_param;
1779 msg.svccap.p_cfg = (tAVDT_CFG *) p_ccb->p_proc_data;
1825 avdt_msg_send_rej(p_ccb, sig, &msg);
1838 if ((p_ccb->p_curr_cmd != NULL) &&
1839 (p_ccb->p_curr_cmd->event == sig) &&
1840 (AVDT_LAYERSPEC_LABEL(p_ccb->p_curr_cmd->layer_specific) == label))
1843 btu_stop_timer(&p_ccb->timer_entry);
1846 p_ccb->ret_count = 0;
1864 avdt_ccb_event(p_ccb, (UINT8)(evt & ~AVDT_CCB_MKR), (tAVDT_CCB_EVT *) &msg);
1878 scb_hdl = *((UINT8 *)(p_ccb->p_curr_cmd + 1));
1899 avdt_ccb_event(p_ccb, AVDT_CCB_RCVRSP_EVT, NULL);