1 /****************************************************************************** 2 * 3 * Copyright (C) 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 for low complexity subband codec (SBC) 21 // 22 23 #ifndef A2DP_SBC_CONSTANTS_H 24 #define A2DP_SBC_CONSTANTS_H 25 26 /***************************************************************************** 27 * Constants 28 ****************************************************************************/ 29 /* the length of the SBC Media Payload header. */ 30 #define A2DP_SBC_MPL_HDR_LEN 1 31 32 /* the LOSC of SBC media codec capabilitiy */ 33 #define A2DP_SBC_INFO_LEN 6 34 35 /* for Codec Specific Information Element */ 36 #define A2DP_SBC_IE_SAMP_FREQ_MSK 0xF0 /* b7-b4 sampling frequency */ 37 #define A2DP_SBC_IE_SAMP_FREQ_16 0x80 /* b7:16 kHz */ 38 #define A2DP_SBC_IE_SAMP_FREQ_32 0x40 /* b6:32 kHz */ 39 #define A2DP_SBC_IE_SAMP_FREQ_44 0x20 /* b5:44.1kHz */ 40 #define A2DP_SBC_IE_SAMP_FREQ_48 0x10 /* b4:48 kHz */ 41 42 #define A2DP_SBC_IE_CH_MD_MSK 0x0F /* b3-b0 channel mode */ 43 #define A2DP_SBC_IE_CH_MD_MONO 0x08 /* b3: mono */ 44 #define A2DP_SBC_IE_CH_MD_DUAL 0x04 /* b2: dual */ 45 #define A2DP_SBC_IE_CH_MD_STEREO 0x02 /* b1: stereo */ 46 #define A2DP_SBC_IE_CH_MD_JOINT 0x01 /* b0: joint stereo */ 47 48 #define A2DP_SBC_IE_BLOCKS_MSK 0xF0 /* b7-b4 number of blocks */ 49 #define A2DP_SBC_IE_BLOCKS_4 0x80 /* 4 blocks */ 50 #define A2DP_SBC_IE_BLOCKS_8 0x40 /* 8 blocks */ 51 #define A2DP_SBC_IE_BLOCKS_12 0x20 /* 12blocks */ 52 #define A2DP_SBC_IE_BLOCKS_16 0x10 /* 16blocks */ 53 54 #define A2DP_SBC_IE_SUBBAND_MSK 0x0C /* b3-b2 number of subbands */ 55 #define A2DP_SBC_IE_SUBBAND_4 0x08 /* b3: 4 */ 56 #define A2DP_SBC_IE_SUBBAND_8 0x04 /* b2: 8 */ 57 58 #define A2DP_SBC_IE_ALLOC_MD_MSK 0x03 /* b1-b0 allocation mode */ 59 #define A2DP_SBC_IE_ALLOC_MD_S 0x02 /* b1: SNR */ 60 #define A2DP_SBC_IE_ALLOC_MD_L 0x01 /* b0: loundess */ 61 62 #define A2DP_SBC_IE_MIN_BITPOOL 2 63 #define A2DP_SBC_IE_MAX_BITPOOL 250 64 65 /* for media payload header */ 66 #define A2DP_SBC_HDR_F_MSK 0x80 67 #define A2DP_SBC_HDR_S_MSK 0x40 68 #define A2DP_SBC_HDR_L_MSK 0x20 69 #define A2DP_SBC_HDR_NUM_MSK 0x0F 70 71 #endif // A2DP_SBC_CONSTANTS_H 72