1 /******************************************************************************
2 *
3 * Copyright (C) 2014 The Android Open Source Project
4 * Copyright 2003 - 2004 Open Interface North America, Inc. All rights reserved.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at:
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 ******************************************************************************/
19
20 /**********************************************************************************
21 $Revision: #1 $
22 ***********************************************************************************/
23
24 /** @file
25 @ingroup codec_internal
26 */
27
28 /**@addgroup codec_internal*/
29 /**@{*/
30
31 #include "common/bt_target.h"
32 #include "oi_codec_sbc_private.h"
33
34 #if (defined(SBC_DEC_INCLUDED) && SBC_DEC_INCLUDED == TRUE)
35
36 const OI_CHAR *const OI_CODEC_SBC_FreqText[] = { "SBC_FREQ_16000", "SBC_FREQ_32000", "SBC_FREQ_44100", "SBC_FREQ_48000" };
37 const OI_CHAR *const OI_CODEC_SBC_ModeText[] = { "SBC_MONO", "SBC_DUAL_CHANNEL", "SBC_STEREO", "SBC_JOINT_STEREO" };
38 const OI_CHAR *const OI_CODEC_SBC_SubbandsText[] = { "SBC_SUBBANDS_4", "SBC_SUBBANDS_8" };
39 const OI_CHAR *const OI_CODEC_SBC_BlocksText[] = { "SBC_BLOCKS_4", "SBC_BLOCKS_8", "SBC_BLOCKS_12", "SBC_BLOCKS_16" };
40 const OI_CHAR *const OI_CODEC_SBC_AllocText[] = { "SBC_LOUDNESS", "SBC_SNR" };
41
42 #ifdef OI_DEBUG
OI_CODEC_SBC_DumpConfig(OI_CODEC_SBC_FRAME_INFO * frameInfo)43 void OI_CODEC_SBC_DumpConfig(OI_CODEC_SBC_FRAME_INFO *frameInfo)
44 {
45 printf("SBC configuration\n");
46 printf(" enhanced: %s\n", frameInfo->enhanced ? "TRUE" : "FALSE");
47 printf(" frequency: %d\n", frameInfo->frequency);
48 printf(" subbands: %d\n", frameInfo->nrof_subbands);
49 printf(" blocks: %d\n", frameInfo->nrof_blocks);
50 printf(" channels: %d\n", frameInfo->nrof_channels);
51 printf(" mode: %s\n", OI_CODEC_SBC_ModeText[frameInfo->mode]);
52 printf(" alloc: %s\n", OI_CODEC_SBC_AllocText[frameInfo->alloc]);
53 printf(" bitpool: %d\n", frameInfo->bitpool);
54 }
55 #endif /* OI_DEBUG */
56
57 /**@}*/
58
59 #endif /* #if (defined(SBC_DEC_INCLUDED) && SBC_DEC_INCLUDED == TRUE) */
60