Home | History | Annotate | Download | only in avdt

Lines Matching refs:tcid

45   if (tc.tcid >= AVDT_NUM_RT_TBL) {
46 AVDT_TRACE_ERROR("%s: AvdtpScb entry not found: invalid tcid:%d", __func__,
47 tc.tcid);
50 const AvdtpRoutingEntry& re = rt_tbl[tc.ccb_idx][tc.tcid];
51 AVDT_TRACE_DEBUG("%s: ccb_idx:%d tcid:%d scb_hdl:%d", __func__, tc.ccb_idx,
52 tc.tcid, re.scb_hdl);
60 * Description Derives the TCID from the channel type and SCB.
63 * Returns TCID value.
75 // the type index (TCID) from the SEP index and the type itself.
76 uint8_t tcid = (scb_idx * (AVDT_CHAN_NUM_TYPES - 1)) + type;
77 AVDT_TRACE_DEBUG("%s: type:%d, tcid: %d", __func__, type, tcid);
78 return tcid;
85 * Description Derives the channel type from the TCID.
91 static uint8_t avdt_ad_tcid_to_type(uint8_t tcid) {
94 if (tcid == 0) {
97 /* tcid translates to type based on number of channels, as follows:
98 ** only media channel : tcid=1,2,3,4,5,6... type=1,1,1,1,1,1...
99 ** media and report : tcid=1,2,3,4,5,6... type=1,2,1,2,1,2...
100 ** media, report, recov : tcid=1,2,3,4,5,6... type=1,2,3,1,2,3...
102 type = ((tcid + AVDT_CHAN_NUM_TYPES - 2) % (AVDT_CHAN_NUM_TYPES - 1)) + 1;
104 AVDT_TRACE_DEBUG("tcid: %d, type: %d", tcid, type);
151 /* must be AVDT_CHAN_SIG - tcid always zero */
152 if ((p_tbl->tcid == 0) && (p_tbl->state == state)) {
161 /* if control channel, tcid always zero */
162 if ((p_tbl->tcid == 0) && (p_tbl->ccb_idx == ccb_idx) &&
167 /* if other channel, tcid is always > zero */
168 if ((p_tbl->tcid > 0) && (p_tbl->ccb_idx == ccb_idx) &&
219 uint8_t tcid;
224 /* get tcid from type, scb */
225 tcid = avdt_ad_type_to_tcid(type, p_scb);
228 if ((p_tbl->tcid == tcid) && (p_tbl->ccb_idx == ccb_idx)) {
312 AVDT_TRACE_DEBUG("%s: tcid: %d, old: %d", __func__, p_tbl->tcid,
315 if (p_tbl->tcid == 0) {
321 /* look up scb in stream routing table by ccb, tcid */
324 AVDT_TRACE_ERROR("%s: Cannot find AvdtScb entry: ccb_idx:%d tcid:%d",
325 __func__, p_tbl->ccb_idx, p_tbl->tcid);
328 close.tcid = p_tbl->tcid;
329 close.type = avdt_ad_tcid_to_type(p_tbl->tcid);
353 AVDT_TRACE_DEBUG("%s: p_tbl:%p state:%d ccb_idx:%d tcid:%d scb_hdl:%d",
354 __func__, p_tbl, p_tbl->state, p_tbl->ccb_idx, p_tbl->tcid,
355 avdtp_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].scb_hdl);
360 if (p_tbl->tcid == 0) {
378 /* look up scb in stream routing table by ccb, tcid */
381 AVDT_TRACE_ERROR("%s: Cannot find AvdtScb entry: ccb_idx:%d tcid:%d",
382 __func__, p_tbl->ccb_idx, p_tbl->tcid);
387 open.lcid = avdtp_cb.ad.rt_tbl[p_tbl->ccb_idx][p_tbl->tcid].lcid;
388 open.hdr.err_code = avdt_ad_tcid_to_type(p_tbl->tcid);
413 if (p_tbl->tcid == 0) {
421 /* look up scb in stream routing table by ccb, tcid */
424 AVDT_TRACE_ERROR("%s: Cannot find AvdtScb entry: ccb_idx:%d tcid:%d",
425 __func__, p_tbl->ccb_idx, p_tbl->tcid);
450 p_buf->layer_specific = avdt_ad_tcid_to_type(p_tbl->tcid);
453 if (p_tbl->tcid == 0) {
461 AVDT_TRACE_ERROR("%s: Cannot find AvdtScb entry: ccb_idx:%d tcid:%d",
462 __func__, p_tbl->ccb_idx, p_tbl->tcid);
488 uint8_t tcid;
490 /* get tcid from type, scb */
491 tcid = avdt_ad_type_to_tcid(type, p_scb);
493 return L2CA_DataWrite(avdtp_cb.ad.rt_tbl[avdt_ccb_to_idx(p_ccb)][tcid].lcid,
524 p_tbl->tcid = avdt_ad_type_to_tcid(type, p_scb);
525 AVDT_TRACE_DEBUG("avdt_ad_open_req: type: %d, role: %d, tcid:%d", type, role,
526 p_tbl->tcid);
538 avdtp_cb.ad.rt_tbl[avdt_ccb_to_idx(p_ccb)][p_tbl->tcid].scb_hdl =
541 avdt_ccb_to_idx(p_ccb), p_tbl->tcid,
556 /* if connect req ok, store tcid in lcid table */
563 avdtp_cb.ad.rt_tbl[avdt_ccb_to_idx(p_ccb)][p_tbl->tcid].lcid = lcid;
565 avdt_ccb_to_idx(p_ccb), p_tbl->tcid, lcid);
586 uint8_t tcid;
601 /* get tcid from type, scb */
602 tcid = avdt_ad_type_to_tcid(type, p_scb);
605 L2CA_DisconnectReq(avdtp_cb.ad.rt_tbl[avdt_ccb_to_idx(p_ccb)][tcid].lcid);