| 1 | /*************************************************************************** |
|---|
| 2 | * (c)2004-2011 Broadcom Corporation |
|---|
| 3 | * |
|---|
| 4 | * This program is the proprietary software of Broadcom Corporation and/or its licensors, |
|---|
| 5 | * and may only be used, duplicated, modified or distributed pursuant to the terms and |
|---|
| 6 | * conditions of a separate, written license agreement executed between you and Broadcom |
|---|
| 7 | * (an "Authorized License"). Except as set forth in an Authorized License, Broadcom grants |
|---|
| 8 | * no license (express or implied), right to use, or waiver of any kind with respect to the |
|---|
| 9 | * Software, and Broadcom expressly reserves all rights in and to the Software and all |
|---|
| 10 | * intellectual property rights therein. IF YOU HAVE NO AUTHORIZED LICENSE, THEN YOU |
|---|
| 11 | * HAVE NO RIGHT TO USE THIS SOFTWARE IN ANY WAY, AND SHOULD IMMEDIATELY |
|---|
| 12 | * NOTIFY BROADCOM AND DISCONTINUE ALL USE OF THE SOFTWARE. |
|---|
| 13 | * |
|---|
| 14 | * Except as expressly set forth in the Authorized License, |
|---|
| 15 | * |
|---|
| 16 | * 1. This program, including its structure, sequence and organization, constitutes the valuable trade |
|---|
| 17 | * secrets of Broadcom, and you shall use all reasonable efforts to protect the confidentiality thereof, |
|---|
| 18 | * and to use this information only in connection with your use of Broadcom integrated circuit products. |
|---|
| 19 | * |
|---|
| 20 | * 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" |
|---|
| 21 | * AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES, REPRESENTATIONS OR |
|---|
| 22 | * WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO |
|---|
| 23 | * THE SOFTWARE. BROADCOM SPECIFICALLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES |
|---|
| 24 | * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, |
|---|
| 25 | * LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION |
|---|
| 26 | * OR CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING OUT OF |
|---|
| 27 | * USE OR PERFORMANCE OF THE SOFTWARE. |
|---|
| 28 | * |
|---|
| 29 | * 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ITS |
|---|
| 30 | * LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL, INCIDENTAL, SPECIAL, INDIRECT, OR |
|---|
| 31 | * EXEMPLARY DAMAGES WHATSOEVER ARISING OUT OF OR IN ANY WAY RELATING TO YOUR |
|---|
| 32 | * USE OF OR INABILITY TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF |
|---|
| 33 | * THE POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF THE AMOUNT |
|---|
| 34 | * ACTUALLY PAID FOR THE SOFTWARE ITSELF OR U.S. $1, WHICHEVER IS GREATER. THESE |
|---|
| 35 | * LIMITATIONS SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF |
|---|
| 36 | * ANY LIMITED REMEDY. |
|---|
| 37 | * |
|---|
| 38 | * $brcm_Workfile: bape_audyssey_adv.h $ |
|---|
| 39 | * $brcm_Revision: Hydra_Software_Devel/1 $ |
|---|
| 40 | * $brcm_Date: 5/14/11 11:22a $ |
|---|
| 41 | * |
|---|
| 42 | * API Description: |
|---|
| 43 | * API name: AudysseyAdv |
|---|
| 44 | * Specific APIs related to Audyssey ADV Audio Processing |
|---|
| 45 | * |
|---|
| 46 | * Revision History: |
|---|
| 47 | * |
|---|
| 48 | * $brcm_Log: /magnum/portinginterface/ape/7422/bape_audyssey_adv.h $ |
|---|
| 49 | * |
|---|
| 50 | * Hydra_Software_Devel/1 5/14/11 11:22a jgarrett |
|---|
| 51 | * SWDTV-6762: Adding Audyssey ADV/ABX |
|---|
| 52 | * |
|---|
| 53 | ***************************************************************************/ |
|---|
| 54 | |
|---|
| 55 | #ifndef BAPE_AUDYSSEY_ADV_H__ |
|---|
| 56 | #define BAPE_AUDYSSEY_ADV_H__ |
|---|
| 57 | |
|---|
| 58 | #include "bape.h" |
|---|
| 59 | |
|---|
| 60 | /*************************************************************************** |
|---|
| 61 | Summary: |
|---|
| 62 | AudysseyAdv Handle |
|---|
| 63 | ***************************************************************************/ |
|---|
| 64 | typedef struct BAPE_AudysseyAdv *BAPE_AudysseyAdvHandle; |
|---|
| 65 | |
|---|
| 66 | /*************************************************************************** |
|---|
| 67 | Summary: |
|---|
| 68 | Audyssey ADV Dynamic EQ Mode |
|---|
| 69 | ***************************************************************************/ |
|---|
| 70 | typedef enum BAPE_AudysseyAdvDynamicEqMode |
|---|
| 71 | { |
|---|
| 72 | BAPE_AudysseyAdvDynamicEqMode_eOff, |
|---|
| 73 | BAPE_AudysseyAdvDynamicEqMode_eOn, |
|---|
| 74 | BAPE_AudysseyAdvDynamicEqMode_eRampOff, |
|---|
| 75 | BAPE_AudysseyAdvDynamicEqMode_eMax |
|---|
| 76 | } BAPE_AudysseyAdvDynamicEqMode; |
|---|
| 77 | |
|---|
| 78 | /*************************************************************************** |
|---|
| 79 | Summary: |
|---|
| 80 | Audyssey ADV Settings |
|---|
| 81 | ***************************************************************************/ |
|---|
| 82 | typedef struct BAPE_AudysseyAdvSettings |
|---|
| 83 | { |
|---|
| 84 | bool enabled; /* If true, processing is enabled. Otherwise this stage is bypassed */ |
|---|
| 85 | |
|---|
| 86 | uint8_t channelMask; /* Specifies the channels that will have gain applied. |
|---|
| 87 | Default: 0xFF All channels |
|---|
| 88 | Meaning of bits |
|---|
| 89 | 0 -> L, 1 -> R, 2 -> C, 3 -> LFE |
|---|
| 90 | 4 -> Ls, 5-> Rs, 6 -> Lb, 7 -> Rb */ |
|---|
| 91 | |
|---|
| 92 | bool reInitialize; /* If true, processing will be reset/re-initialized. */ |
|---|
| 93 | |
|---|
| 94 | bool volumeScalingEnabled; /* If true, dynamic volume scaling is enabled */ |
|---|
| 95 | |
|---|
| 96 | bool dynamicSurroundGainEnabled; /* If true (default), surround channel gain is enabled. */ |
|---|
| 97 | |
|---|
| 98 | bool hiLoCompress; /* If true, there will be boost in calc cntr gain. */ |
|---|
| 99 | |
|---|
| 100 | BAPE_AudysseyAdvDynamicEqMode dynamicEqMode; /* Dynamic Equalizer Mode */ |
|---|
| 101 | |
|---|
| 102 | int volume; /* Volume setting for Gain function and Dynamic EQ. Default : 0. Ranges from -10..10 */ |
|---|
| 103 | int gainCompression; /* Gain Compression Factor. Default: 180, Range [1, 180, 240] */ |
|---|
| 104 | int headroomOffset; /* Headroom offset. Default: 0, Ranges from -100..100 */ |
|---|
| 105 | |
|---|
| 106 | int chCalbGain[8]; /* Calibrated Channel Gain. Default: 0, Ranges from -100..100 */ |
|---|
| 107 | } BAPE_AudysseyAdvSettings; |
|---|
| 108 | |
|---|
| 109 | /*************************************************************************** |
|---|
| 110 | Summary: |
|---|
| 111 | Get default settings for an AudysseyAdv stage |
|---|
| 112 | ***************************************************************************/ |
|---|
| 113 | void BAPE_AudysseyAdv_GetDefaultSettings( |
|---|
| 114 | BAPE_AudysseyAdvSettings *pSettings /* [out] default settings */ |
|---|
| 115 | ); |
|---|
| 116 | |
|---|
| 117 | /*************************************************************************** |
|---|
| 118 | Summary: |
|---|
| 119 | Open an AudysseyAdv stage |
|---|
| 120 | ***************************************************************************/ |
|---|
| 121 | BERR_Code BAPE_AudysseyAdv_Create( |
|---|
| 122 | BAPE_Handle deviceHandle, |
|---|
| 123 | const BAPE_AudysseyAdvSettings *pSettings, |
|---|
| 124 | BAPE_AudysseyAdvHandle *pHandle |
|---|
| 125 | ); |
|---|
| 126 | |
|---|
| 127 | /*************************************************************************** |
|---|
| 128 | Summary: |
|---|
| 129 | Close an AudysseyAdv stage |
|---|
| 130 | |
|---|
| 131 | Description: |
|---|
| 132 | Input to the stage must be removed prior to closing. |
|---|
| 133 | ***************************************************************************/ |
|---|
| 134 | void BAPE_AudysseyAdv_Destroy( |
|---|
| 135 | BAPE_AudysseyAdvHandle handle |
|---|
| 136 | ); |
|---|
| 137 | |
|---|
| 138 | /*************************************************************************** |
|---|
| 139 | Summary: |
|---|
| 140 | Get Settings for an AudysseyAdv stage |
|---|
| 141 | ***************************************************************************/ |
|---|
| 142 | void BAPE_AudysseyAdv_GetSettings( |
|---|
| 143 | BAPE_AudysseyAdvHandle handle, |
|---|
| 144 | BAPE_AudysseyAdvSettings *pSettings /* [out] Settings */ |
|---|
| 145 | ); |
|---|
| 146 | |
|---|
| 147 | /*************************************************************************** |
|---|
| 148 | Summary: |
|---|
| 149 | Set Settings for an AudysseyAdv stage |
|---|
| 150 | ***************************************************************************/ |
|---|
| 151 | BERR_Code BAPE_AudysseyAdv_SetSettings( |
|---|
| 152 | BAPE_AudysseyAdvHandle handle, |
|---|
| 153 | const BAPE_AudysseyAdvSettings *pSettings |
|---|
| 154 | ); |
|---|
| 155 | |
|---|
| 156 | /*************************************************************************** |
|---|
| 157 | Summary: |
|---|
| 158 | Audyssey ADV processing status |
|---|
| 159 | ***************************************************************************/ |
|---|
| 160 | typedef struct BAPE_AudysseyAdvStatus |
|---|
| 161 | { |
|---|
| 162 | int volumeApplied; /* Dynamic EQ Volume applied in dB*/ |
|---|
| 163 | int chCalcLevel[8]; /* chCalcLevel in dB in Q10.22 floating format. */ |
|---|
| 164 | unsigned numChannels; /* Number of channels */ |
|---|
| 165 | BAPE_AudysseyAdvDynamicEqMode dynamicEqMode; /* Dynamic Equalizer Mode */ |
|---|
| 166 | } BAPE_AudysseyAdvStatus; |
|---|
| 167 | |
|---|
| 168 | /*************************************************************************** |
|---|
| 169 | Summary: |
|---|
| 170 | Get Status for an AudysseyAdv stage |
|---|
| 171 | ***************************************************************************/ |
|---|
| 172 | BERR_Code BAPE_AudysseyAdv_GetStatus( |
|---|
| 173 | BAPE_AudysseyAdvHandle handle, |
|---|
| 174 | BAPE_AudysseyAdvStatus *pStatus /* [out] Status */ |
|---|
| 175 | ); |
|---|
| 176 | |
|---|
| 177 | /*************************************************************************** |
|---|
| 178 | Summary: |
|---|
| 179 | Get the audio connector for an AudysseyAdv stage |
|---|
| 180 | ***************************************************************************/ |
|---|
| 181 | void BAPE_AudysseyAdv_GetConnector( |
|---|
| 182 | BAPE_AudysseyAdvHandle handle, |
|---|
| 183 | BAPE_Connector *pConnector |
|---|
| 184 | ); |
|---|
| 185 | |
|---|
| 186 | /*************************************************************************** |
|---|
| 187 | Summary: |
|---|
| 188 | Add an input to this processing stage |
|---|
| 189 | ***************************************************************************/ |
|---|
| 190 | BERR_Code BAPE_AudysseyAdv_AddInput( |
|---|
| 191 | BAPE_AudysseyAdvHandle handle, |
|---|
| 192 | BAPE_Connector input |
|---|
| 193 | ); |
|---|
| 194 | |
|---|
| 195 | /*************************************************************************** |
|---|
| 196 | Summary: |
|---|
| 197 | Remove an input from this processing stage |
|---|
| 198 | ***************************************************************************/ |
|---|
| 199 | BERR_Code BAPE_AudysseyAdv_RemoveInput( |
|---|
| 200 | BAPE_AudysseyAdvHandle handle, |
|---|
| 201 | BAPE_Connector input |
|---|
| 202 | ); |
|---|
| 203 | |
|---|
| 204 | /*************************************************************************** |
|---|
| 205 | Summary: |
|---|
| 206 | Remove all inputs from this processing stage |
|---|
| 207 | ***************************************************************************/ |
|---|
| 208 | BERR_Code BAPE_AudysseyAdv_RemoveAllInputs( |
|---|
| 209 | BAPE_AudysseyAdvHandle handle |
|---|
| 210 | ); |
|---|
| 211 | |
|---|
| 212 | #endif /* #ifndef BAPE_AUDYSSEY_Adv_H__ */ |
|---|
| 213 | |
|---|