15738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************
25738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *
35738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  Copyright (C) 2002-2012 Broadcom Corporation
45738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *
55738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  Licensed under the Apache License, Version 2.0 (the "License");
65738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  you may not use this file except in compliance with the License.
75738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  You may obtain a copy of the License at:
85738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *
95738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  http://www.apache.org/licenses/LICENSE-2.0
105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *
115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  Unless required by applicable law or agreed to in writing, software
125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  distributed under the License is distributed on an "AS IS" BASIS,
135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  See the License for the specific language governing permissions and
155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  limitations under the License.
165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *
175738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project ******************************************************************************/
185738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************
205738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *
215738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  This file contains interfaces which are internal to AVDTP.
225738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *
235738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project ******************************************************************************/
245738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifndef AVDT_INT_H
255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_INT_H
265738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
275738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#include "gki.h"
285738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#include "avdt_api.h"
295738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#include "avdtc_api.h"
305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#include "avdt_defs.h"
315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#include "l2c_api.h"
325738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#include "btm_api.h"
335738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
345738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifndef AVDT_DEBUG
355738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_DEBUG  FALSE
365738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif
375738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
385738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*****************************************************************************
395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** constants
405738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*****************************************************************************/
415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* channel types */
435738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectenum {
445738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CHAN_SIG,                  /* signaling channel */
455738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CHAN_MEDIA,                /* media channel */
465738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#if AVDT_REPORTING == TRUE
475738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CHAN_REPORT,               /* reporting channel */
485738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif
495738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CHAN_NUM_TYPES
505738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project};
515738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
525738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* protocol service capabilities of this AVDTP implementation */
535738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* for now multiplexing will be used only for fragmentation */
545738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#if ((AVDT_MULTIPLEXING == TRUE) && (AVDT_REPORTING == TRUE))
555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_PSC                (AVDT_PSC_TRANS | AVDT_PSC_MUX | AVDT_PSC_REPORT | AVDT_PSC_DELAY_RPT)
565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_LEG_PSC            (AVDT_PSC_TRANS | AVDT_PSC_MUX | AVDT_PSC_REPORT)
575738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#else /* AVDT_MULTIPLEXING && AVDT_REPORTING  */
585738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
595738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#if (AVDT_MULTIPLEXING == TRUE)
605738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_PSC                (AVDT_PSC_TRANS | AVDT_PSC_MUX | AVDT_PSC_DELAY_RPT)
615738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_LEG_PSC            (AVDT_PSC_TRANS | AVDT_PSC_MUX)
625738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#else /* AVDT_MULTIPLEXING */
635738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
645738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#if (AVDT_REPORTING == TRUE)
655738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_PSC                (AVDT_PSC_TRANS | AVDT_PSC_REPORT | AVDT_PSC_DELAY_RPT)
665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_LEG_PSC            (AVDT_PSC_TRANS | AVDT_PSC_REPORT)
675738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#else /* AVDT_REPORTING  */
685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_PSC                (AVDT_PSC_TRANS | AVDT_PSC_DELAY_RPT)
695738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_LEG_PSC            (AVDT_PSC_TRANS)
705738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif /* AVDT_REPORTING  */
715738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
725738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif /* AVDT_MULTIPLEXING */
735738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif /* AVDT_MULTIPLEXING && AVDT_REPORTING  */
755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
765738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* initiator/acceptor signaling roles */
775738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_CLOSE_ACP          0
785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_CLOSE_INT          1
795738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_OPEN_ACP           2
805738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_OPEN_INT           3
815738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
825738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* states for avdt_scb_verify */
835738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_VERIFY_OPEN        0
845738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_VERIFY_STREAMING   1
855738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_VERIFY_SUSPEND     2
865738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_VERIFY_START       3
875738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
885738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* to distinguish CCB events from SCB events */
895738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_CCB_MKR            0x80
905738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
915738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* offset where AVDTP signaling message header starts in message  */
925738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_HDR_OFFSET         (L2CAP_MIN_OFFSET + AVDT_NUM_SEPS)
935738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
945738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* offset where AVDTP signaling message content starts;
955738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** use the size of a start header since it's the largest possible
965738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** layout of signaling message in a buffer is:
975738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project**
985738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** |  BT_HDR  | SCB handles | L2CAP + HCI header | AVDTP header | data ... |
995738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project**
1005738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Note that we "hide" the scb handles at the top of the message buffer.
1015738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*/
1025738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_MSG_OFFSET         (L2CAP_MIN_OFFSET + AVDT_NUM_SEPS + AVDT_LEN_TYPE_START)
1035738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
1045738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* scb transport channel connect timeout value */
1055738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_SCB_TC_CONN_TOUT   10
1065738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
1075738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* scb transport channel disconnect timeout value */
1085738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_SCB_TC_DISC_TOUT   10
1095738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
1105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* maximum number of command retransmissions */
1115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifndef AVDT_RET_MAX
1125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_RET_MAX            1
1135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif
1145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
1155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
1165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* ccb state machine states */
1175738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectenum {
1185738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_IDLE_ST,
1195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_OPENING_ST,
1205738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_OPEN_ST,
1215738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_CLOSING_ST
1225738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project};
1235738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
1245738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* state machine action enumeration list */
1255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectenum {
1265738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_CHAN_OPEN,
1275738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_CHAN_CLOSE,
1285738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_CHK_CLOSE,
1295738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_HDL_DISCOVER_CMD,
1305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_HDL_DISCOVER_RSP,
1315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_HDL_GETCAP_CMD,
1325738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_HDL_GETCAP_RSP,
1335738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_HDL_START_CMD,
1345738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_HDL_START_RSP,
1355738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_HDL_SUSPEND_CMD,
1365738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_HDL_SUSPEND_RSP,
1375738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_SND_DISCOVER_CMD,
1385738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_SND_DISCOVER_RSP,
1395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_SND_GETCAP_CMD,
1405738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_SND_GETCAP_RSP,
1415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_SND_START_CMD,
1425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_SND_START_RSP,
1435738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_SND_SUSPEND_CMD,
1445738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_SND_SUSPEND_RSP,
1455738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_CLEAR_CMDS,
1465738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_CMD_FAIL,
1475738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_FREE_CMD,
1485738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_CONG_STATE,
1495738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_RET_CMD,
1505738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_SND_CMD,
1515738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_SND_MSG,
1525738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_SET_RECONN,
1535738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_CLR_RECONN,
1545738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_CHK_RECONN,
1555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_CHK_TIMER,
1565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_SET_CONN,
1575738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_SET_DISCONN,
1585738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_DO_DISCONN,
1595738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_LL_CLOSED,
1605738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_LL_OPENED,
1615738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_DEALLOC,
1625738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_NUM_ACTIONS
1635738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project};
1645738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
1655738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_CCB_IGNORE     AVDT_CCB_NUM_ACTIONS
1665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
1675738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* ccb state machine events */
1685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectenum {
1695738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_API_DISCOVER_REQ_EVT,
1705738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_API_GETCAP_REQ_EVT,
1715738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_API_START_REQ_EVT,
1725738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_API_SUSPEND_REQ_EVT,
1735738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_API_DISCOVER_RSP_EVT,
1745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_API_GETCAP_RSP_EVT,
1755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_API_START_RSP_EVT,
1765738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_API_SUSPEND_RSP_EVT,
1775738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_API_CONNECT_REQ_EVT,
1785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_API_DISCONNECT_REQ_EVT,
1795738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_MSG_DISCOVER_CMD_EVT,
1805738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_MSG_GETCAP_CMD_EVT,
1815738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_MSG_START_CMD_EVT,
1825738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_MSG_SUSPEND_CMD_EVT,
1835738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_MSG_DISCOVER_RSP_EVT,
1845738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_MSG_GETCAP_RSP_EVT,
1855738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_MSG_START_RSP_EVT,
1865738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_MSG_SUSPEND_RSP_EVT,
1875738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_RCVRSP_EVT,
1885738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_SENDMSG_EVT,
1895738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_RET_TOUT_EVT,
1905738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_RSP_TOUT_EVT,
1915738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_IDLE_TOUT_EVT,
1925738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_UL_OPEN_EVT,
1935738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_UL_CLOSE_EVT,
1945738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_LL_OPEN_EVT,
1955738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_LL_CLOSE_EVT,
1965738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_CCB_LL_CONG_EVT
1975738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project};
1985738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
1995738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
2005738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* scb state machine states; these state values are private to this module so
2015738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** the scb state cannot be read or set by actions functions
2025738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*/
2035738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectenum {
2045738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_IDLE_ST,
2055738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_CONF_ST,
2065738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_OPENING_ST,
2075738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_OPEN_ST,
2085738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_STREAM_ST,
2095738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_CLOSING_ST
2105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project};
2115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
2125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* state machine action enumeration list */
2135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectenum {
2145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_ABORT_CMD,
2155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_ABORT_RSP,
2165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_CLOSE_CMD,
2175738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_CLOSE_RSP,
2185738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_GETCONFIG_CMD,
2195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_GETCONFIG_RSP,
2205738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_OPEN_CMD,
2215738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_OPEN_REJ,
2225738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_OPEN_RSP,
2235738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_PKT,
2245738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_DROP_PKT,
2255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_RECONFIG_CMD,
2265738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_RECONFIG_RSP,
2275738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_SECURITY_CMD,
2285738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_SECURITY_RSP,
2295738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_SETCONFIG_CMD,
2305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_SETCONFIG_REJ,
2315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_SETCONFIG_RSP,
2325738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_START_CMD,
2335738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_START_RSP,
2345738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_SUSPEND_CMD,
2355738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_SUSPEND_RSP,
2365738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_TC_CLOSE,
2375738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#if AVDT_REPORTING == TRUE
2385738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_TC_CLOSE_STO,
2395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif
2405738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_TC_OPEN,
2415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#if AVDT_REPORTING == TRUE
2425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_TC_OPEN_STO,
2435738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif
2445738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_DELAY_RPT_REQ,
2455738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_DELAY_RPT_CMD,
2465738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_DELAY_RPT_RSP,
2475738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_HDL_WRITE_REQ,
2485738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_ABORT_REQ,
2495738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_ABORT_RSP,
2505738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_CLOSE_REQ,
2515738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_STREAM_CLOSE,
2525738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_CLOSE_RSP,
2535738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_GETCONFIG_REQ,
2545738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_GETCONFIG_RSP,
2555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_OPEN_REQ,
2565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_OPEN_RSP,
2575738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_RECONFIG_REQ,
2585738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_RECONFIG_RSP,
2595738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_SECURITY_REQ,
2605738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_SECURITY_RSP,
2615738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_SETCONFIG_REQ,
2625738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_SETCONFIG_REJ,
2635738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_SETCONFIG_RSP,
2645738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SND_TC_CLOSE,
2655738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_CB_ERR,
2665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_CONG_STATE,
2675738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_REJ_STATE,
2685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_REJ_IN_USE,
2695738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_REJ_NOT_IN_USE,
2705738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_SET_REMOVE,
2715738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_FREE_PKT,
2725738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_CLR_PKT,
2735738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_CHK_SND_PKT,
2745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_TC_TIMER,
2755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_CLR_VARS,
2765738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_DEALLOC,
2775738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_NUM_ACTIONS
2785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project};
2795738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
2805738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_SCB_IGNORE     AVDT_SCB_NUM_ACTIONS
2815738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
2825738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* scb state machine events */
2835738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectenum {
2845738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_REMOVE_EVT,
2855738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_WRITE_REQ_EVT,
2865738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_GETCONFIG_REQ_EVT,
2875738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_DELAY_RPT_REQ_EVT,
2885738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_SETCONFIG_REQ_EVT,
2895738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_OPEN_REQ_EVT,
2905738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_CLOSE_REQ_EVT,
2915738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_RECONFIG_REQ_EVT,
2925738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_SECURITY_REQ_EVT,
2935738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_ABORT_REQ_EVT,
2945738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_GETCONFIG_RSP_EVT,
2955738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_SETCONFIG_RSP_EVT,
2965738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_SETCONFIG_REJ_EVT,
2975738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_OPEN_RSP_EVT,
2985738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_CLOSE_RSP_EVT,
2995738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_RECONFIG_RSP_EVT,
3005738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_SECURITY_RSP_EVT,
3015738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_API_ABORT_RSP_EVT,
3025738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_SETCONFIG_CMD_EVT,
3035738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_GETCONFIG_CMD_EVT,
3045738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_OPEN_CMD_EVT,
3055738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_START_CMD_EVT,
3065738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_SUSPEND_CMD_EVT,
3075738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_CLOSE_CMD_EVT,
3085738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_ABORT_CMD_EVT,
3095738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_RECONFIG_CMD_EVT,
3105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_SECURITY_CMD_EVT,
3115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_DELAY_RPT_CMD_EVT,
3125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_DELAY_RPT_RSP_EVT,
3135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_SETCONFIG_RSP_EVT,
3145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_GETCONFIG_RSP_EVT,
3155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_OPEN_RSP_EVT,
3165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_START_RSP_EVT,
3175738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_SUSPEND_RSP_EVT,
3185738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_CLOSE_RSP_EVT,
3195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_ABORT_RSP_EVT,
3205738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_RECONFIG_RSP_EVT,
3215738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_SECURITY_RSP_EVT,
3225738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_SETCONFIG_REJ_EVT,
3235738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_OPEN_REJ_EVT,
3245738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_START_REJ_EVT,
3255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_MSG_SUSPEND_REJ_EVT,
3265738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_TC_TOUT_EVT,
3275738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_TC_OPEN_EVT,
3285738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_TC_CLOSE_EVT,
3295738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_TC_CONG_EVT,
3305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_TC_DATA_EVT,
3315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    AVDT_SCB_CC_CLOSE_EVT
3325738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project};
3335738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
3345738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* adaption layer number of stream routing table entries */
3355738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#if AVDT_REPORTING == TRUE
3365738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* 2 channels(1 media, 1 report) for each SEP and one for signalling */
3375738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_NUM_RT_TBL     ((AVDT_NUM_SEPS<<1) + 1)
3385738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#else
3395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_NUM_RT_TBL     (AVDT_NUM_SEPS + 1)
3405738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif
3415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
3425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* adaption layer number of transport channel table entries - moved to target.h
3435738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_NUM_TC_TBL     (AVDT_NUM_SEPS + AVDT_NUM_LINKS) */
3445738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
3455738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* "states" used in transport channel table */
3465738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_AD_ST_UNUSED   0       /* Unused - unallocated */
3475738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_AD_ST_IDLE     1       /* No connection */
3485738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_AD_ST_ACP      2       /* Waiting to accept a connection */
3495738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_AD_ST_INT      3       /* Initiating a connection */
3505738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_AD_ST_CONN     4       /* Waiting for connection confirm */
3515738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_AD_ST_CFG      5       /* Waiting for configuration complete */
3525738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_AD_ST_OPEN     6       /* Channel opened */
3535738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_AD_ST_SEC_INT  7       /* Security process as INT */
3545738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_AD_ST_SEC_ACP  8       /* Security process as ACP */
3555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
3565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* Configuration flags. tAVDT_TC_TBL.cfg_flags */
3575738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_L2C_CFG_IND_DONE   (1<<0)
3585738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_L2C_CFG_CFM_DONE   (1<<1)
3595738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_L2C_CFG_CONN_INT   (1<<2)
3605738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_L2C_CFG_CONN_ACP   (1<<3)
3615738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
3625738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
3635738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* result code for avdt_ad_write_req() (L2CA_DataWrite()) */
3645738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_AD_FAILED       L2CAP_DW_FAILED        /* FALSE */
3655738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_AD_SUCCESS      L2CAP_DW_SUCCESS       /* TRUE */
3665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_AD_CONGESTED    L2CAP_DW_CONGESTED     /* 2 */
3675738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
3685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*****************************************************************************
3695738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** data types
3705738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*****************************************************************************/
3715738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
3725738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* msg union of all message parameter types */
3735738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef union {
3745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_EVT_HDR           hdr;
3755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_EVT_HDR           single;
3765738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_SETCONFIG         config_cmd;
3775738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CONFIG            reconfig_cmd;
3785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_MULTI             multi;
3795738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_SECURITY          security_cmd;
3805738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_DISCOVER          discover_rsp;
3815738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CONFIG            svccap;
3825738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_SECURITY          security_rsp;
3835738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_DELAY_RPT         delay_rpt_cmd;
3845738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tAVDT_MSG;
3855738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
3865738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* data type for AVDT_CCB_API_DISCOVER_REQ_EVT */
3875738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct {
3885738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CTRL_CBACK    *p_cback;
3895738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_SEP_INFO      *p_sep_info;
3905738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8               num_seps;
3915738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tAVDT_CCB_API_DISCOVER;
3925738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
3935738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* data type for AVDT_CCB_API_GETCAP_REQ_EVT */
3945738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct {
3955738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_EVT_HDR       single;
3965738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CTRL_CBACK    *p_cback;
3975738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CFG           *p_cfg;
3985738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tAVDT_CCB_API_GETCAP;
3995738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
4005738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* data type for AVDT_CCB_API_CONNECT_REQ_EVT */
4015738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct {
4025738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CTRL_CBACK    *p_cback;
4035738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8               sec_mask;
4045738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tAVDT_CCB_API_CONNECT;
4055738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
4065738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* data type for AVDT_CCB_API_DISCONNECT_REQ_EVT */
4075738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct {
4085738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CTRL_CBACK    *p_cback;
4095738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tAVDT_CCB_API_DISCONNECT;
4105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
4115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* union associated with ccb state machine events */
4125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef union {
4135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CCB_API_DISCOVER      discover;
4145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CCB_API_GETCAP        getcap;
4155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CCB_API_CONNECT       connect;
4165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CCB_API_DISCONNECT    disconnect;
4175738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_MSG                   msg;
4185738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BOOLEAN                     llcong;
4195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8                       err_code;
4205738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tAVDT_CCB_EVT;
4215738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
4225738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* channel control block type */
4235738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct {
4245738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BD_ADDR             peer_addr;      /* BD address of peer */
4255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    TIMER_LIST_ENT      timer_entry;    /* CCB timer list entry */
4265738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BUFFER_Q            cmd_q;          /* Queue for outgoing command messages */
4275738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BUFFER_Q            rsp_q;          /* Queue for outgoing response and reject messages */
4285738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CTRL_CBACK    *proc_cback;    /* Procedure callback function */
4295738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CTRL_CBACK    *p_conn_cback;  /* Connection/disconnection callback function */
4305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    void                *p_proc_data;   /* Pointer to data storage for procedure */
4315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BT_HDR              *p_curr_cmd;    /* Current command being sent awaiting response */
4325738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BT_HDR              *p_curr_msg;    /* Current message being sent */
4335738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BT_HDR              *p_rx_msg;      /* Current message being received */
4345738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BOOLEAN             allocated;      /* Whether ccb is allocated */
4355738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8               state;          /* The CCB state machine state */
4365738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BOOLEAN             ll_opened;      /* TRUE if LL is opened */
4375738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BOOLEAN             proc_busy;      /* TRUE when a discover or get capabilities procedure in progress */
4385738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8               proc_param;     /* Procedure parameter; either SEID for get capabilities or number of SEPS for discover */
4395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BOOLEAN             cong;           /* Whether signaling channel is congested */
4405738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8               label;          /* Message header "label" (sequence number) */
4415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BOOLEAN             reconn;         /* If TRUE, reinitiate connection after transitioning from CLOSING to IDLE state */
4425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8               ret_count;      /* Command retransmission count */
4435738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tAVDT_CCB;
4445738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
4455738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* type for action functions */
4465738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef void (*tAVDT_CCB_ACTION)(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
4475738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
4485738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* type for AVDT_SCB_API_WRITE_REQ_EVT */
4495738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct {
4505738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BT_HDR      *p_buf;
4515738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT32      time_stamp;
4525738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#if AVDT_MULTIPLEXING == TRUE
4535738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BUFFER_Q    frag_q;          /* Queue for outgoing media fragments. p_buf should be 0 */
4545738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8       *p_data;
4555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT32      data_len;
4565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif
4575738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8       m_pt;
458ead3cde4bac0c3e32cd31f149093f004eef8ceebGanesh Ganapathi Batta    tAVDT_DATA_OPT_MASK     opt;
4595738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tAVDT_SCB_APIWRITE;
4605738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
4615738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* type for AVDT_SCB_TC_CLOSE_EVT */
4625738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct {
4635738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8           old_tc_state;       /* channel state before closed */
4645738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8           tcid;               /* TCID  */
4655738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8           type;               /* channel type */
4665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tAVDT_SCB_TC_CLOSE;
4675738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
4685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* type for scb event data */
4695738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef union {
4705738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_MSG           msg;
4715738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_SCB_APIWRITE  apiwrite;
4725738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_DELAY_RPT     apidelay;
4735738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_OPEN          open;
4745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_SCB_TC_CLOSE  close;
4755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BOOLEAN             llcong;
4765738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BT_HDR              *p_pkt;
4775738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tAVDT_SCB_EVT;
4785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
4795738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* stream control block type */
4805738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct {
4815738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CS        cs;             /* stream creation struct */
4825738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CFG       curr_cfg;       /* current configuration */
4835738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CFG       req_cfg;        /* requested configuration */
4845738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    TIMER_LIST_ENT  timer_entry;    /* timer entry */
4855738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BT_HDR          *p_pkt;         /* packet waiting to be sent */
4865738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CCB       *p_ccb;         /* ccb associated with this scb */
4875738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT16          media_seq;      /* media packet sequence number */
4885738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BOOLEAN         allocated;      /* whether scb is allocated or unused */
4895738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BOOLEAN         in_use;         /* whether stream being used by peer */
490f7dd9f5779680da37dc89e5df2b26d436487818cHemant Gupta    BOOLEAN         sink_activated; /* A2DP Sink activated/de-activated from Application */
4915738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8           role;           /* initiator/acceptor role in current procedure */
4925738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BOOLEAN         remove;         /* whether CB is marked for removal */
4935738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8           state;          /* state machine state */
4945738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8           peer_seid;      /* SEID of peer stream */
4955738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8           curr_evt;       /* current event; set only by state machine */
4965738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BOOLEAN         cong;           /* Whether media transport channel is congested */
4975738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8           close_code;     /* Error code received in close response */
4985738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#if AVDT_MULTIPLEXING == TRUE
4995738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    BUFFER_Q        frag_q;         /* Queue for outgoing media fragments */
5005738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT32          frag_off;       /* length of already received media fragments */
5015738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT32          frag_org_len;   /* original length before fragmentation of receiving media packet */
5025738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8           *p_next_frag;   /* next fragment to send */
5035738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8           *p_media_buf;   /* buffer for media packet assigned by AVDT_SetMediaBuf */
5045738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT32          media_buf_len;  /* length of buffer for media packet assigned by AVDT_SetMediaBuf */
5055738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif
5065738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tAVDT_SCB;
5075738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
5085738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* type for action functions */
5095738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef void (*tAVDT_SCB_ACTION)(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
5105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
5115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* adaption layer type for transport channel table */
5125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct {
5135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT16  peer_mtu;       /* L2CAP mtu of the peer device */
5145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT16  my_mtu;         /* Our MTU for this channel */
5155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT16  my_flush_to;    /* Our flush timeout for this channel */
5165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT16  lcid;
5175738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8   tcid;           /* transport channel id */
5185738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8   ccb_idx;        /* channel control block associated with this tc */
5195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8   state;          /* transport channel state */
5205738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8   cfg_flags;      /* L2CAP configuration flags */
5215738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8   id;
5225738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tAVDT_TC_TBL;
5235738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
5245738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* adaption layer type for stream routing table */
5255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct {
5265738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT16  lcid;           /* L2CAP LCID of the associated transport channel */
5275738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8   scb_hdl;        /* stream control block associated with this tc */
5285738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tAVDT_RT_TBL;
5295738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
5305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
5315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* adaption layer control block */
5325738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct {
5335738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_RT_TBL    rt_tbl[AVDT_NUM_LINKS][AVDT_NUM_RT_TBL];
5345738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_TC_TBL    tc_tbl[AVDT_NUM_TC_TBL];
5355738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8           lcid_tbl[MAX_L2CAP_CHANNELS];   /* map LCID to tc_tbl index */
5365738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tAVDT_AD;
5375738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
5385738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* Control block for AVDT */
5395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projecttypedef struct {
5405738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_REG           rcb;                    /* registration control block */
5415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CCB           ccb[AVDT_NUM_LINKS];    /* channel control blocks */
5425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_SCB           scb[AVDT_NUM_SEPS];     /* stream control blocks */
5435738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_AD            ad;                     /* adaption layer control block */
5445738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDTC_CTRL_CBACK   *p_conf_cback;          /* conformance callback function */
5455738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CCB_ACTION    *p_ccb_act;             /* pointer to CCB action functions */
5465738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_SCB_ACTION    *p_scb_act;             /* pointer to SCB action functions */
5475738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    tAVDT_CTRL_CBACK    *p_conn_cback;          /* connection callback function */
5485738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project    UINT8               trace_level;            /* trace level */
5495738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tAVDT_CB;
5505738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
5515738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
5525738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*****************************************************************************
5535738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** function declarations
5545738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*****************************************************************************/
5555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
5565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* CCB function declarations */
5575738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_init(void);
5585738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_event(tAVDT_CCB *p_ccb, UINT8 event, tAVDT_CCB_EVT *p_data);
5595738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern tAVDT_CCB *avdt_ccb_by_bd(BD_ADDR bd_addr);
5605738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern tAVDT_CCB *avdt_ccb_alloc(BD_ADDR bd_addr);
5615738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_dealloc(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5625738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern UINT8 avdt_ccb_to_idx(tAVDT_CCB *p_ccb);
5635738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern tAVDT_CCB *avdt_ccb_by_idx(UINT8 idx);
5645738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
5655738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* CCB action functions */
5665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_chan_open(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5675738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_chan_close(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_chk_close(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5695738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_hdl_discover_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5705738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_hdl_discover_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5715738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_hdl_getcap_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5725738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_hdl_getcap_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5735738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_hdl_start_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_hdl_start_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_hdl_suspend_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5765738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_hdl_suspend_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5775738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_snd_discover_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_snd_discover_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5795738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_snd_getcap_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5805738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_snd_getcap_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5815738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_snd_start_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5825738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_snd_start_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5835738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_snd_suspend_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5845738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_snd_suspend_rsp(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5855738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_clear_cmds(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5865738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_cmd_fail(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5875738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_free_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5885738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_cong_state(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5895738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_ret_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5905738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_snd_cmd(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5915738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_snd_msg(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5925738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_set_reconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5935738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_clr_reconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5945738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_chk_reconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5955738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_chk_timer(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5965738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_set_conn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5975738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_set_disconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5985738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_do_disconn(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
5995738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_ll_closed(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
6005738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ccb_ll_opened(tAVDT_CCB *p_ccb, tAVDT_CCB_EVT *p_data);
6015738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
6025738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* SCB function prototypes */
6035738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_event(tAVDT_SCB *p_scb, UINT8 event, tAVDT_SCB_EVT *p_data);
6045738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_init(void);
6055738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern tAVDT_SCB *avdt_scb_alloc(tAVDT_CS *p_cs);
6065738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_dealloc(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6075738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern UINT8 avdt_scb_to_hdl(tAVDT_SCB *p_scb);
6085738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern tAVDT_SCB *avdt_scb_by_hdl(UINT8 hdl);
6095738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern UINT8 avdt_scb_verify(tAVDT_CCB *p_ccb, UINT8 state, UINT8 *p_seid, UINT16 num_seid, UINT8 *p_err_code);
6105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_peer_seid_list(tAVDT_MULTI *p_multi);
6115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern UINT32 avdt_scb_gen_ssrc(tAVDT_SCB *p_scb);
6125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
6135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* SCB action functions */
6145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_abort_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_abort_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_close_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6175738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_close_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6185738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_getconfig_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_getconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6205738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_open_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6215738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_open_rej(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6225738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_open_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6235738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_pkt(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6245738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_drop_pkt(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_reconfig_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6265738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_reconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6275738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_security_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6285738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_security_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6295738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_setconfig_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_setconfig_rej(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_setconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6325738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_start_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6335738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_start_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6345738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_suspend_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6355738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_suspend_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6365738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_delay_rpt_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6375738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_delay_rpt_cmd(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6385738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_delay_rpt_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_tc_close(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6405738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_tc_open(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_tc_close_sto(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_tc_open_sto(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6435738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_hdl_write_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6445738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_abort_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6455738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_abort_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6465738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_close_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6475738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_stream_close(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6485738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_close_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6495738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_getconfig_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6505738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_getconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6515738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_open_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6525738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_open_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6535738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_reconfig_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6545738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_reconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_security_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_security_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6575738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_setconfig_req(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6585738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_setconfig_rej(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6595738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_setconfig_rsp(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6605738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_snd_tc_close(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6615738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_cb_err(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6625738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_cong_state(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6635738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_rej_state(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6645738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_rej_in_use(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6655738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_rej_not_in_use(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_set_remove(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6675738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_free_pkt(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_chk_snd_pkt(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6695738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_clr_pkt(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6705738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_tc_timer(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6715738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_clr_vars(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
6725738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_scb_queue_frags(tAVDT_SCB *p_scb, UINT8 **pp_data, UINT32 *p_data_len, BUFFER_Q *pq);
6735738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
6745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* msg function declarations */
6755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern BOOLEAN avdt_msg_send(tAVDT_CCB *p_ccb, BT_HDR *p_msg);
6765738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_msg_send_cmd(tAVDT_CCB *p_ccb, void *p_scb, UINT8 sig_id, tAVDT_MSG *p_params);
6775738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_msg_send_rsp(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params);
6785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_msg_send_rej(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params);
6795738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_msg_send_grej(tAVDT_CCB *p_ccb, UINT8 sig_id, tAVDT_MSG *p_params);
6805738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_msg_ind(tAVDT_CCB *p_ccb, BT_HDR *p_buf);
6815738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
6825738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* adaption layer function declarations */
6835738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ad_init(void);
6845738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern UINT8 avdt_ad_type_to_tcid(UINT8 type, tAVDT_SCB *p_scb);
6855738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern tAVDT_TC_TBL *avdt_ad_tc_tbl_by_st(UINT8 type, tAVDT_CCB *p_ccb, UINT8 state);
6865738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern tAVDT_TC_TBL *avdt_ad_tc_tbl_by_lcid(UINT16 lcid);
6875738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern tAVDT_TC_TBL *avdt_ad_tc_tbl_alloc(tAVDT_CCB *p_ccb);
6885738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern UINT8 avdt_ad_tc_tbl_to_idx(tAVDT_TC_TBL *p_tbl);
6895738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ad_tc_close_ind(tAVDT_TC_TBL *p_tbl, UINT16 reason);
6905738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ad_tc_open_ind(tAVDT_TC_TBL *p_tbl);
6915738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ad_tc_cong_ind(tAVDT_TC_TBL *p_tbl, BOOLEAN is_congested);
6925738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ad_tc_data_ind(tAVDT_TC_TBL *p_tbl, BT_HDR *p_buf);
6935738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern tAVDT_TC_TBL *avdt_ad_tc_tbl_by_type(UINT8 type, tAVDT_CCB *p_ccb, tAVDT_SCB *p_scb);
6945738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern UINT8 avdt_ad_write_req(UINT8 type, tAVDT_CCB *p_ccb, tAVDT_SCB *p_scb, BT_HDR *p_buf);
6955738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ad_open_req(UINT8 type, tAVDT_CCB *p_ccb, tAVDT_SCB *p_scb, UINT8 role);
6965738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_ad_close_req(UINT8 type, tAVDT_CCB *p_ccb, tAVDT_SCB *p_scb);
6975738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
6985738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern void avdt_process_timeout(TIMER_LIST_ENT *p_tle);
6995738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
7005738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*****************************************************************************
7015738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** macros
7025738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*****************************************************************************/
7035738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
7045738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* we store the scb and the label in the layer_specific field of the
7055738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** current cmd
7065738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*/
7075738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_BLD_LAYERSPEC(ls, msg, label) \
7085738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project            ls = (((label) << 4) | (msg))
7095738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
7105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_LAYERSPEC_LABEL(ls)    ((UINT8)((ls) >> 4))
7115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
7125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define AVDT_LAYERSPEC_MSG(ls)      ((UINT8)((ls) & 0x000F))
7135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
7145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*****************************************************************************
7155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** global data
7165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*****************************************************************************/
7175738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifdef __cplusplus
7185738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern "C"
7195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project{
7205738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif
7215738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
7225738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************
7235738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project** Main Control Block
7245738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project*******************************************************************************/
7255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#if AVDT_DYNAMIC_MEMORY == FALSE
72624933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern tAVDT_CB  avdt_cb;
7275738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#else
72824933b5b1a06274c47133debac5251a97128a267June R. Tate-Gansextern tAVDT_CB *avdt_cb_ptr;
7295738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define avdt_cb (*avdt_cb_ptr)
7305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif
7315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
7325738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
7335738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* L2CAP callback registration structure */
7345738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern const tL2CAP_APPL_INFO avdt_l2c_appl;
7355738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
7365738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* reject message event lookup table */
7375738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Projectextern const UINT8 avdt_msg_rej_2_evt[];
7385738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifdef __cplusplus
7395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project}
7405738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif
7415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
7425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif /* AVDT_INT_H */
743