Lines Matching refs:tcid
40 ** Description Derives the TCID from the channel type and SCB.
43 ** Returns TCID value.
58 AVDT_TRACE_DEBUG2("type: %d, tcid: %d", type, ((scb_idx * (AVDT_CHAN_NUM_TYPES - 1)) + type));
68 ** Description Derives the channel type from the TCID.
74 static UINT8 avdt_ad_tcid_to_type(UINT8 tcid)
78 if (tcid == 0)
84 /* tcid translates to type based on number of channels, as follows:
85 ** only media channel : tcid=1,2,3,4,5,6... type=1,1,1,1,1,1...
86 ** media and report : tcid=1,2,3,4,5,6... type=1,2,1,2,1,2...
87 ** media, report, recov : tcid=1,2,3,4,5,6... type=1,2,3,1,2,3...
89 type = ((tcid + AVDT_CHAN_NUM_TYPES - 2) % (AVDT_CHAN_NUM_TYPES - 1)) + 1;
91 AVDT_TRACE_DEBUG2("tcid: %d, type: %d", tcid, type);
144 /* must be AVDT_CHAN_SIG - tcid always zero */
145 if ((p_tbl->tcid == 0) &&
160 /* if control channel, tcid always zero */
161 if ((p_tbl->tcid == 0) &&
170 /* if other channel, tcid is always > zero */
171 if ((p_tbl->tcid > 0) &&
231 UINT8 tcid;
236 /* get tcid from type, scb */
237 tcid = avdt_ad_type_to_tcid(type, p_scb);
241 if ((p_tbl->tcid == tcid) && (p_tbl->ccb_idx == ccb_idx))
332 AVDT_TRACE_DEBUG2("avdt_ad_tc_close_ind tcid: %d, old: %d",
333 p_tbl->tcid, close.old_tc_state);
335 if (p_tbl->tcid == 0)
343 /* look up scb in stream routing table by ccb, tcid */
344 p_scb = avdt_scb_by_hdl(avdt_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].scb_hdl);
347 close.tcid = p_tbl->tcid;
348 close.type = avdt_ad_tcid_to_type(p_tbl->tcid);
376 if (p_tbl->tcid == 0)
394 /* look up scb in stream routing table by ccb, tcid */
395 p_scb = avdt_scb_by_hdl(avdt_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].scb_hdl);
401 open.lcid = avdt_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].lcid;
402 open.hdr.err_code = avdt_ad_tcid_to_type(p_tbl->tcid);
429 if (p_tbl->tcid == 0)
437 /* look up scb in stream routing table by ccb, tcid */
438 p_scb = avdt_scb_by_hdl(avdt_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].scb_hdl);
465 p_buf->layer_specific = avdt_ad_tcid_to_type(p_tbl->tcid);
469 if (p_tbl->tcid == 0)
477 p_scb = avdt_scb_by_hdl(avdt_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].scb_hdl);
504 UINT8 tcid;
506 /* get tcid from type, scb */
507 tcid = avdt_ad_type_to_tcid(type, p_scb);
510 return L2CA_DataWrite(avdt_cb.ad.rt_tbl[avdt_ccb_to_idx(p_ccb)][tcid].lcid, p_buf);
537 p_tbl->tcid = avdt_ad_type_to_tcid(type, p_scb);
538 AVDT_TRACE_DEBUG3("avdt_ad_open_req: type: %d, role: %d, tcid:%d",
539 type, role, p_tbl->tcid);
554 avdt_cb.ad.rt_tbl[avdt_ccb_to_idx(p_ccb)][p_tbl->tcid].scb_hdl = avdt_scb_to_hdl(p_scb);
556 avdt_ccb_to_idx(p_ccb), p_tbl->tcid,
573 /* if connect req ok, store tcid in lcid table */
578 avdt_cb.ad.rt_tbl[avdt_ccb_to_idx(p_ccb)][p_tbl->tcid].lcid = lcid;
580 avdt_ccb_to_idx(p_ccb), p_tbl->tcid,
605 UINT8 tcid;
621 /* get tcid from type, scb */
622 tcid = avdt_ad_type_to_tcid(type, p_scb);
625 L2CA_DisconnectReq(avdt_cb.ad.rt_tbl[avdt_ccb_to_idx(p_ccb)][tcid].lcid);