summaryrefslogtreecommitdiffstats
path: root/stack/l2cap/l2c_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'stack/l2cap/l2c_api.c')
-rw-r--r--stack/l2cap/l2c_api.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/stack/l2cap/l2c_api.c b/stack/l2cap/l2c_api.c
index 437ef9e42..e8e1e3f4a 100644
--- a/stack/l2cap/l2c_api.c
+++ b/stack/l2cap/l2c_api.c
@@ -1859,6 +1859,30 @@ UINT8 L2CA_DataWrite (UINT16 cid, BT_HDR *p_data)
return l2c_data_write (cid, p_data, L2CAP_FLUSHABLE_CH_BASED);
}
+#ifdef BTA_AV_SPLIT_A2DP_ENABLED
+/*******************************************************************************
+**
+** Function L2CA_GetDestChannelID
+**
+** Description Higher layers call this function to fetch destination channel id.
+**
+** Returns Destination Channel ID
+**
+*******************************************************************************/
+UINT16 L2CA_GetDestChannelID (UINT16 cid)
+{
+ tL2C_CCB *p_ccb;
+ L2CAP_TRACE_API ("L2CA_GetDestChannelID: local cid: %d", cid);
+
+ /* Find the channel control block. We don't know the link it is on. */
+ p_ccb = l2cu_find_ccb_by_cid (NULL, cid);
+ L2CAP_TRACE_DEBUG("local cid: %d, dest cid: %d",
+ p_ccb->local_cid, p_ccb->remote_cid);
+
+ return p_ccb->remote_cid;
+}
+#endif
+
/*******************************************************************************
**
** Function L2CA_SetChnlFlushability