1 /****************************************************************************** 2 * 3 * Copyright 2000-2012 Broadcom Corporation 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at: 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 * 17 ******************************************************************************/ 18 19 // 20 // A2DP constants defined by the Profile Specification 21 // 22 23 #ifndef A2DP_CONSTANTS_H 24 #define A2DP_CONSTANTS_H 25 26 #include <inttypes.h> 27 28 #include <cstdint> 29 30 /* Profile supported features */ 31 #define A2DP_SUPF_PLAYER 0x0001 32 #define A2DP_SUPF_MIC 0x0002 33 #define A2DP_SUPF_TUNER 0x0004 34 #define A2DP_SUPF_MIXER 0x0008 35 36 #define A2DP_SUPF_HEADPHONE 0x0001 37 #define A2DP_SUPF_SPEAKER 0x0002 38 #define A2DP_SUPF_RECORDER 0x0004 39 #define A2DP_SUPF_AMP 0x0008 40 41 /* AV Media Codec Types (Audio Codec ID) */ 42 #define A2DP_MEDIA_CT_SBC 0x00 /* SBC media codec type */ 43 #define A2DP_MEDIA_CT_AAC 0x02 /* AAC media codec type */ 44 /* Non-A2DP media codec type (vendor-specific codec) */ 45 #define A2DP_MEDIA_CT_NON_A2DP 0xFF 46 47 typedef uint8_t tA2DP_CODEC_TYPE; /* A2DP Codec type: A2DP_MEDIA_CT_* */ 48 49 // Standardized codec identifiers. 50 // The codec identifier is 40 bits, 51 // - Bits 0-7: Audio Codec ID, as defined by [ID 6.5.1] 52 // 0x00: SBC 53 // 0x02: AAC 54 // 0xFF: Vendor 55 // - Bits 8-23: Company ID, 56 // set to 0, if octet 0 is not 0xFF. 57 // - Bits 24-39: Vendor-defined codec ID, 58 // set to 0, if octet 0 is not 0xFF. 59 enum : uint64_t { 60 A2DP_CODEC_ID_SBC = 0x0000000000, 61 A2DP_CODEC_ID_AAC = 0x0000000002, 62 A2DP_CODEC_ID_APTX = 0x0001004fff, 63 A2DP_CODEC_ID_APTX_HD = 0x002400d7ff, 64 A2DP_CODEC_ID_LDAC = 0x00aa012dff, 65 A2DP_CODEC_ID_OPUS = 0x000100e0ff, 66 }; 67 68 #endif // A2DP_CONSTANTS_H 69