| 1 | /*************************************************************************** |
|---|
| 2 | * (c)2004-2010 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_tru_surround.h $ |
|---|
| 39 | * $brcm_Revision: Hydra_Software_Devel/2 $ |
|---|
| 40 | * $brcm_Date: 2/22/11 5:43p $ |
|---|
| 41 | * |
|---|
| 42 | * API Description: |
|---|
| 43 | * API name: TruSurround |
|---|
| 44 | * Specific APIs related to SRS TruSurround Audio Processing |
|---|
| 45 | * |
|---|
| 46 | * Revision History: |
|---|
| 47 | * |
|---|
| 48 | * $brcm_Log: /magnum/portinginterface/ape/7422/bape_tru_surround.h $ |
|---|
| 49 | * |
|---|
| 50 | * Hydra_Software_Devel/2 2/22/11 5:43p jgarrett |
|---|
| 51 | * SW7422-146: Implemented type renaming based on filter graph review |
|---|
| 52 | * comments |
|---|
| 53 | * |
|---|
| 54 | * Hydra_Software_Devel/1 1/12/11 4:24p jgarrett |
|---|
| 55 | * SW7422-146: Adding additional APIs |
|---|
| 56 | * |
|---|
| 57 | ***************************************************************************/ |
|---|
| 58 | |
|---|
| 59 | #ifndef BAPE_TRU_SURROUND_H__ |
|---|
| 60 | #define BAPE_TRU_SURROUND_H__ |
|---|
| 61 | |
|---|
| 62 | #include "bape.h" |
|---|
| 63 | |
|---|
| 64 | /*************************************************************************** |
|---|
| 65 | Summary: |
|---|
| 66 | TruSurroundHd Handle |
|---|
| 67 | ***************************************************************************/ |
|---|
| 68 | typedef struct BAPE_TruSurroundHd *BAPE_TruSurroundHdHandle; |
|---|
| 69 | |
|---|
| 70 | /*************************************************************************** |
|---|
| 71 | Summary: |
|---|
| 72 | This enumeration specifies the size of the speakers that the TruBass sound will be |
|---|
| 73 | played back on. TruBass adjusts its filter parameters to optimize playback for that size. |
|---|
| 74 | Size should be selected based on the lowest reproducible frequency that is just above |
|---|
| 75 | the specified value |
|---|
| 76 | ***************************************************************************/ |
|---|
| 77 | typedef enum BAPE_TruBassSpeakerSize |
|---|
| 78 | { |
|---|
| 79 | BAPE_TruBassSpeakerSize_e40Hz, |
|---|
| 80 | BAPE_TruBassSpeakerSize_e60Hz, |
|---|
| 81 | BAPE_TruBassSpeakerSize_e100Hz, |
|---|
| 82 | BAPE_TruBassSpeakerSize_e150Hz, |
|---|
| 83 | BAPE_TruBassSpeakerSize_e200Hz, |
|---|
| 84 | BAPE_TruBassSpeakerSize_e250Hz, |
|---|
| 85 | BAPE_TruBassSpeakerSize_e300Hz, |
|---|
| 86 | BAPE_TruBassSpeakerSize_e400Hz, |
|---|
| 87 | BAPE_TruBassSpeakerSize_eMax |
|---|
| 88 | } BAPE_TruBassSpeakerSize; |
|---|
| 89 | |
|---|
| 90 | /*************************************************************************** |
|---|
| 91 | Summary: |
|---|
| 92 | TruBass Processing Mode |
|---|
| 93 | ***************************************************************************/ |
|---|
| 94 | typedef enum BAPE_TruBassMode |
|---|
| 95 | { |
|---|
| 96 | BAPE_TruBassMode_eMono, |
|---|
| 97 | BAPE_TruBassMode_eStereo, |
|---|
| 98 | BAPE_TruBassMode_eMax |
|---|
| 99 | } BAPE_TruBassMode; |
|---|
| 100 | |
|---|
| 101 | /*************************************************************************** |
|---|
| 102 | Summary: |
|---|
| 103 | TruSurround HD Crossover Frequency |
|---|
| 104 | ***************************************************************************/ |
|---|
| 105 | typedef enum BAPE_TruSurroundHdCrossover |
|---|
| 106 | { |
|---|
| 107 | BAPE_TruSurroundHdCrossover_e80Hz, |
|---|
| 108 | BAPE_TruSurroundHdCrossover_e120Hz, |
|---|
| 109 | BAPE_TruSurroundHdCrossover_e160Hz, |
|---|
| 110 | BAPE_TruSurroundHdCrossover_e200Hz, |
|---|
| 111 | BAPE_TruSurroundHdCrossover_eMax |
|---|
| 112 | } BAPE_TruSurroundHdCrossover; |
|---|
| 113 | |
|---|
| 114 | /*************************************************************************** |
|---|
| 115 | Summary: |
|---|
| 116 | SRS WOW HD 3D Mode |
|---|
| 117 | ***************************************************************************/ |
|---|
| 118 | typedef enum BAPE_WowHdMode |
|---|
| 119 | { |
|---|
| 120 | BAPE_WowHdMode_eMono, |
|---|
| 121 | BAPE_WowHdMode_eSingleSpeaker, |
|---|
| 122 | BAPE_WowHdMode_eStereo, |
|---|
| 123 | BAPE_WowHdMode_eExtreme, |
|---|
| 124 | BAPE_WowHdMode_eMax |
|---|
| 125 | } BAPE_WowHdMode; |
|---|
| 126 | |
|---|
| 127 | /*************************************************************************** |
|---|
| 128 | Summary: |
|---|
| 129 | SRS ACMOD values |
|---|
| 130 | ***************************************************************************/ |
|---|
| 131 | typedef enum BAPE_TruSurroundHdAcmod |
|---|
| 132 | { |
|---|
| 133 | BAPE_TruSurroundHdAcmod_e1_0_C, /* C */ |
|---|
| 134 | BAPE_TruSurroundHdAcmod_e2_0_LR, /* L,R */ |
|---|
| 135 | BAPE_TruSurroundHdAcmod_e3_0_LCR, /* L,C,R */ |
|---|
| 136 | BAPE_TruSurroundHdAcmod_e2_1_LRS, /* L,R,S */ |
|---|
| 137 | BAPE_TruSurroundHdAcmod_e3_1_LCRS, /* L,C,R,S */ |
|---|
| 138 | BAPE_TruSurroundHdAcmod_e2_2_LRLsRs, /* L,R,LS,RS */ |
|---|
| 139 | BAPE_TruSurroundHdAcmod_e3_2_LCRLsRs, /* L,C,R,LS,RS */ |
|---|
| 140 | BAPE_TruSurroundHdAcmod_e3_3_LCRLsRsCs, /* L,C,R,LS,RS,CS */ |
|---|
| 141 | BAPE_TruSurroundHdAcmod_e3_2_BSDigital, /* L,C,R,LS,RS */ |
|---|
| 142 | BAPE_TruSurroundHdAcmod_eLtRt, /* L,R */ |
|---|
| 143 | BAPE_TruSurroundHdAcmod_ePLII_Movie, /* L,C,R,LS,RS */ |
|---|
| 144 | BAPE_TruSurroundHdAcmod_ePLII_Music, /* L,C,R,LS,RS */ |
|---|
| 145 | BAPE_TruSurroundHdAcmod_ePassiveMatrix, /* L,R */ |
|---|
| 146 | BAPE_TruSurroundHdAcmod_eCSII, /* L,C,R,Ls,Rs,Cs */ |
|---|
| 147 | BAPE_TruSurroundHdAcmod_eMax |
|---|
| 148 | } BAPE_TruSurroundHdAcmod; |
|---|
| 149 | |
|---|
| 150 | /*************************************************************************** |
|---|
| 151 | Summary: |
|---|
| 152 | TruSurround HD Settings |
|---|
| 153 | ***************************************************************************/ |
|---|
| 154 | typedef struct BAPE_TruSurroundHdSettings |
|---|
| 155 | { |
|---|
| 156 | bool enabled; /* If true, processing is enabled. Otherwise this stage is bypassed */ |
|---|
| 157 | |
|---|
| 158 | bool headphoneEnabled; /* Turns the headphone processing of the TruSurround process on and off. */ |
|---|
| 159 | bool monoToStereoEnabled; /* Enables Mono to Stereo Conversion */ |
|---|
| 160 | |
|---|
| 161 | bool dialogClarityEnabled; /* Enables the Dialog Clarity portion of the TruSurroundHD processing. */ |
|---|
| 162 | unsigned dialogClarityLevel; /* Dialog clarity level (in %). Range is 0 to 100%. */ |
|---|
| 163 | |
|---|
| 164 | bool truBassEnabled; /* Enables the TruBass portion of the processing. */ |
|---|
| 165 | unsigned truBassLevel; /* TruBass Level - Specifies the amount of TruBass that is mixed into the final signal (in %). */ |
|---|
| 166 | BAPE_TruBassSpeakerSize speakerSize; /* Specifies the size of the speakers that the sound will be played back on. */ |
|---|
| 167 | BAPE_TruBassMode truBassMode; /* TruBass Mode. Currently Mono or Stereo. */ |
|---|
| 168 | |
|---|
| 169 | unsigned inputGain; /* Input gain. The valid range is 0 to 100% */ |
|---|
| 170 | unsigned outputGain; /* Output gain. The valid range is 0 to 100% */ |
|---|
| 171 | unsigned bypassGain; /* Bypass gain. The valid range is 0 to 100% */ |
|---|
| 172 | |
|---|
| 173 | bool definitionEnabled; /* Enables the definition portion of TruSurround HD */ |
|---|
| 174 | unsigned definitionLevel; /* The definition level (in %). The valid range is 0 to 100% */ |
|---|
| 175 | |
|---|
| 176 | unsigned surroundLevel; /* Surround level (in %). The valid range is 0 to 100% */ |
|---|
| 177 | |
|---|
| 178 | bool wowHdEnabled; /* Enables SRS WOW HD 3D processing. */ |
|---|
| 179 | bool wowHdHighBitRateEnabled; /* Enables High Bit Rate for SRS WOW HD. */ |
|---|
| 180 | bool wowHdFocusEnabled; /* Enables the WOW HD Focus Processing */ |
|---|
| 181 | BAPE_WowHdMode wowHdMode; /* Processing Mode for SRS WOW HD */ |
|---|
| 182 | unsigned wowHdSpaceLevel; /* SRS WOW HD 3D Space Level (in %). The valid range is 0 to 100% */ |
|---|
| 183 | unsigned wowHdCenterLevel; /* SRS WOW HD 3D Center Level (in %). The valid range is 0 to 100% */ |
|---|
| 184 | unsigned wowHdFocusLevel; /* SRS WOW HD 3D Focus Level (in %). The valid range is 0 to 100% */ |
|---|
| 185 | |
|---|
| 186 | bool certificationApp; /* True if Certification app. Default: false */ |
|---|
| 187 | bool inputLfeEnabled; /* True if input LFE is present. Default: false */ |
|---|
| 188 | BAPE_TruSurroundHdAcmod inputAcmod; /* Default: BAPE_TruSurroundHdAcmod_e2_0_LR, i.e. Stereo */ |
|---|
| 189 | } BAPE_TruSurroundHdSettings; |
|---|
| 190 | |
|---|
| 191 | /*************************************************************************** |
|---|
| 192 | Summary: |
|---|
| 193 | Get default settings for an SRS TruSurround HD stage |
|---|
| 194 | ***************************************************************************/ |
|---|
| 195 | void BAPE_TruSurroundHd_GetDefaultSettings( |
|---|
| 196 | BAPE_TruSurroundHdSettings *pSettings /* [out] default settings */ |
|---|
| 197 | ); |
|---|
| 198 | |
|---|
| 199 | /*************************************************************************** |
|---|
| 200 | Summary: |
|---|
| 201 | Open an SRS TruSurround HD stage |
|---|
| 202 | ***************************************************************************/ |
|---|
| 203 | BERR_Code BAPE_TruSurroundHd_Create( |
|---|
| 204 | BAPE_Handle deviceHandle, |
|---|
| 205 | const BAPE_TruSurroundHdSettings *pSettings, |
|---|
| 206 | BAPE_TruSurroundHdHandle *pHandle /* [out] */ |
|---|
| 207 | ); |
|---|
| 208 | |
|---|
| 209 | /*************************************************************************** |
|---|
| 210 | Summary: |
|---|
| 211 | Close an SRS TruSurround HD stage |
|---|
| 212 | |
|---|
| 213 | Description: |
|---|
| 214 | Input to the stage must be removed prior to closing. |
|---|
| 215 | ***************************************************************************/ |
|---|
| 216 | void BAPE_TruSurroundHd_Destroy( |
|---|
| 217 | BAPE_TruSurroundHdHandle handle |
|---|
| 218 | ); |
|---|
| 219 | |
|---|
| 220 | /*************************************************************************** |
|---|
| 221 | Summary: |
|---|
| 222 | Get Settings for an SRS TruSurround HD stage |
|---|
| 223 | ***************************************************************************/ |
|---|
| 224 | void BAPE_TruSurroundHd_GetSettings( |
|---|
| 225 | BAPE_TruSurroundHdHandle handle, |
|---|
| 226 | BAPE_TruSurroundHdSettings *pSettings /* [out] Settings */ |
|---|
| 227 | ); |
|---|
| 228 | |
|---|
| 229 | /*************************************************************************** |
|---|
| 230 | Summary: |
|---|
| 231 | Set Settings for an SRS TruSurround HD stage |
|---|
| 232 | ***************************************************************************/ |
|---|
| 233 | BERR_Code BAPE_TruSurroundHd_SetSettings( |
|---|
| 234 | BAPE_TruSurroundHdHandle handle, |
|---|
| 235 | const BAPE_TruSurroundHdSettings *pSettings |
|---|
| 236 | ); |
|---|
| 237 | |
|---|
| 238 | /*************************************************************************** |
|---|
| 239 | Summary: |
|---|
| 240 | Get the audio connector for an SRS TruSurround HD stage |
|---|
| 241 | ***************************************************************************/ |
|---|
| 242 | void BAPE_TruSurroundHd_GetConnector( |
|---|
| 243 | BAPE_TruSurroundHdHandle handle, |
|---|
| 244 | BAPE_Connector *pConnector |
|---|
| 245 | ); |
|---|
| 246 | |
|---|
| 247 | /*************************************************************************** |
|---|
| 248 | Summary: |
|---|
| 249 | Add an input to this processing stage |
|---|
| 250 | ***************************************************************************/ |
|---|
| 251 | BERR_Code BAPE_TruSurroundHd_AddInput( |
|---|
| 252 | BAPE_TruSurroundHdHandle handle, |
|---|
| 253 | BAPE_Connector input |
|---|
| 254 | ); |
|---|
| 255 | |
|---|
| 256 | /*************************************************************************** |
|---|
| 257 | Summary: |
|---|
| 258 | Remove an input from this processing stage |
|---|
| 259 | ***************************************************************************/ |
|---|
| 260 | BERR_Code BAPE_TruSurroundHd_RemoveInput( |
|---|
| 261 | BAPE_TruSurroundHdHandle handle, |
|---|
| 262 | BAPE_Connector input |
|---|
| 263 | ); |
|---|
| 264 | |
|---|
| 265 | /*************************************************************************** |
|---|
| 266 | Summary: |
|---|
| 267 | Remove all inputs from this processing stage |
|---|
| 268 | ***************************************************************************/ |
|---|
| 269 | BERR_Code BAPE_TruSurroundHd_RemoveAllInputs( |
|---|
| 270 | BAPE_TruSurroundHdHandle handle |
|---|
| 271 | ); |
|---|
| 272 | |
|---|
| 273 | #endif /* #ifndef BAPE_TRU_SURROUND_H__ */ |
|---|
| 274 | |
|---|