source: svn/newcon3bcm2_21bu/magnum/portinginterface/ape/7552/bape_tru_volume.h

Last change on this file was 76, checked in by megakiss, 10 years ago

1W 대기전력을 만족시키기 위하여 POWEROFF시 튜너를 Standby 상태로 함

  • Property svn:executable set to *
File size: 13.2 KB
Line 
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_tru_volume.h $
39* $brcm_Revision: Hydra_Software_Devel/4 $
40* $brcm_Date: 7/15/11 5:51p $
41*
42* API Description:
43*   API name: TruVolume
44*    Specific APIs related to SRS TruVolume (formerly Volume IQ) Audio Processing
45*
46* Revision History:
47*
48* $brcm_Log: /magnum/portinginterface/ape/7422/bape_tru_volume.h $
49*
50* Hydra_Software_Devel/4   7/15/11 5:51p jgarrett
51* SWDTV-6761: Adding StudioSound API
52*
53* Hydra_Software_Devel/3   4/16/11 12:32p jgarrett
54* SW7425-371: Removing tabs
55*
56* Hydra_Software_Devel/2   2/22/11 5:44p jgarrett
57* SW7422-146: Implemented type renaming based on filter graph review
58* comments
59*
60* Hydra_Software_Devel/1   1/12/11 4:24p jgarrett
61* SW7422-146: Adding additional APIs
62*
63***************************************************************************/
64
65#ifndef BAPE_TRU_VOLUME_H__
66#define BAPE_TRU_VOLUME_H__
67
68#include "bape.h"
69
70/***************************************************************************
71Summary:
72TruVolume Handle
73***************************************************************************/
74typedef struct BAPE_TruVolume *BAPE_TruVolumeHandle;
75
76/***************************************************************************
77Summary:
78TruVolume Block Size
79***************************************************************************/
80typedef enum BAPE_TruVolumeBlockSize
81{
82    BAPE_TruVolumeBlockSize_e256,
83    BAPE_TruVolumeBlockSize_e512,
84    BAPE_TruVolumeBlockSize_e768,
85    BAPE_TruVolumeBlockSize_e1024,
86    BAPE_TruVolumeBlockSize_eMax
87} BAPE_TruVolumeBlockSize;
88
89/***************************************************************************
90Summary:
91TruVolume Mode
92***************************************************************************/
93typedef enum BAPE_TruVolumeMode
94{
95    BAPE_TruVolumeMode_eLight,
96    BAPE_TruVolumeMode_eNormal,
97    BAPE_TruVolumeMode_eHeavy,
98    BAPE_TruVolumeMode_eMax
99} BAPE_TruVolumeMode;
100
101/***************************************************************************
102Summary:
103TruVolume Speaker Resolution
104***************************************************************************/
105typedef enum BAPE_TruVolumeSpeakerResolution
106{
107    BAPE_TruVolumeSpeakerResolution_e20Hz,
108    BAPE_TruVolumeSpeakerResolution_e40Hz,
109    BAPE_TruVolumeSpeakerResolution_e110Hz,
110    BAPE_TruVolumeSpeakerResolution_e200Hz,
111    BAPE_TruVolumeSpeakerResolution_e315Hz,
112    BAPE_TruVolumeSpeakerResolution_e410Hz,
113    BAPE_TruVolumeSpeakerResolution_eMax
114} BAPE_TruVolumeSpeakerResolution;
115
116/***************************************************************************
117Summary:
118SRS Filter Coefficient Generation Modes.
119Also required by StudioSound.
120***************************************************************************/
121typedef enum BAPE_SrsFilterCoefficientMode
122{
123    BAPE_SrsFilterCoefficientMode_eUser,            /* Use user specified coefficients */
124    BAPE_SrsFilterCoefficientMode_eSpecification,   /* Use Filter Specification to generate filter coeffcients */
125    BAPE_SrsFilterCoefficientMode_eMax
126} BAPE_SrsFilterCoefficientMode;
127
128/***************************************************************************
129Summary:
130SRS High Pass Filter Order.
131Also required by StudioSound.
132***************************************************************************/
133typedef enum BAPE_SrsFilterOrder
134{
135    BAPE_SrsFilterOrder_e0 = 0,
136    BAPE_SrsFilterOrder_e2 = 2,
137    BAPE_SrsFilterOrder_e4 = 4, 
138    BAPE_SrsFilterOrder_e6 = 6,
139    BAPE_SrsFilterOrder_eMax
140} BAPE_SrsFilterOrder;
141
142/***************************************************************************
143Summary:
144SRS High Pass Filter Coefficients.
145Also required by StudioSound.
146***************************************************************************/
147typedef struct BAPE_SrsHighPassFilterCoefficientSet
148{
149    unsigned scale;    /* Specified q-format of the coefficients. (1+scale).(31-scale) format
150                          Default: 1.  scale=1 implies a q-format of 2.30 */
151    int coefficientB0;
152    int coefficientB1;
153    int coefficientB2;
154    int coefficientA1;
155    int coefficientA2;
156} BAPE_SrsHighPassFilterCoefficientSet;
157
158/***************************************************************************
159Summary:
160SRS High Pass Filter parameter for coefficients specified by user.
161Also required by StudioSound.
162***************************************************************************/
163typedef struct BAPE_SrsHighPassFilterCoefficients
164{
165    BAPE_SrsFilterOrder filterOrder;                        /* HighPass Filter order. Default BAPE_SrsFilterOrder_eOrder4 */
166    BAPE_SrsHighPassFilterCoefficientSet coefficients[3];   /* Number of active biquads filter decided by filterOrder,  N = filterOrder/2 */
167} BAPE_SrsHighPassFilterCoefficients;
168
169/***************************************************************************
170Summary:
171SRS High Pass Filter parameter for coefficients generated by specification.
172Also required by StudioSound.
173***************************************************************************/
174typedef struct BAPE_SrsHighPassFilterCoefficientSpecification
175{
176    unsigned cutoffFrequency;           /* Range: 20 to 1000 hz, Default: 180 Hz */
177    BAPE_SrsFilterOrder filterOrder;    /* HighPass Filter order. Default BAPE_SrsFilterOrder_e4 */
178} BAPE_SrsHighPassFilterCoefficientSpecification;
179
180/***************************************************************************
181Summary:
182SRS High Pass Filter Settings.
183Also required by StudioSound.
184***************************************************************************/
185typedef struct BAPE_SrsHighPassFilterSettings
186{
187    bool enabled;                                   /* If true, High Pass Filter processing is enabled. Default: true */
188    BAPE_SrsFilterCoefficientMode coefficientMode;  /* Coefficient generation mode. Default: BAPE_SrsFilterCoefficientMode_eUserSpecified */
189
190    struct
191    {
192        BAPE_SrsHighPassFilterCoefficients user[3];                     /* Array size 3, representing supported sampling rates 32, 44.1 and 48kHz,
193                                                                           will be used if coefficientMode is BAPE_SrsFilterCoefficientMode_eUser */
194        BAPE_SrsHighPassFilterCoefficientSpecification specification;   /* Filter specification for generating filter coeffcients,
195                                                                           will be used if coefMode is BAPE_SrsFilterCoefficientMode_eSpecification */ 
196    } coefficientSettings;
197} BAPE_SrsHighPassFilterSettings;
198
199/***************************************************************************
200Summary:
201TruVolume Settings
202***************************************************************************/
203typedef struct BAPE_TruVolumeSettings
204{
205    bool enabled;               /* If true, processing is enabled.  Otherwise this stage is bypassed */
206
207    BAPE_TruVolumeBlockSize blockSize;    /* Block Size for processing */
208
209    bool enableNormalGain;      /* If true, normal processing will be performed.  If false, only bypassGain is applied. */
210
211    unsigned inputGain;         /* Input gain ranges from 0 to 3200. Default: 100 */
212    unsigned outputGain;        /* Output gain ranges from 0 to 3200. Default: 50 */
213    unsigned bypassGain;        /* Bypass gain (In %).  Ranges from 0 to 100 */
214
215    uint32_t referenceLevel;    /* Reference level.  Ranges from 0x00000109 to 0x007fffff */
216
217    BAPE_TruVolumeMode mode;    /* Processing Mode. */
218
219    BAPE_TruVolumeSpeakerResolution speakerResolution;
220
221    unsigned maxGain;           /* Max gain control (In %).  Ranges from 0 to 100 */
222
223    bool enableDcNotchFilter;   /* If true, the DC notch filter will be enabled */
224
225    bool enableNoiseManager;
226    int noiseManagerThreshold;  /* Noise manager threshold.  Ranges from 0 to 200 (Default=20). */
227
228    bool enableNormalizer;      /* If true, the normalizer is enabled.  */
229
230    unsigned calibrate;         /* Ranges from 0..25600.  Default=100. */
231
232    BAPE_SrsHighPassFilterSettings highPassFilter;  /* High Pass Filter Settings applied prior to TruVolume */
233} BAPE_TruVolumeSettings;
234
235/***************************************************************************
236Summary:
237    Get default settings for an SRS TruVolume stage
238***************************************************************************/
239void BAPE_TruVolume_GetDefaultSettings(
240    BAPE_TruVolumeSettings *pSettings   /* [out] default settings */
241    );
242
243/***************************************************************************
244Summary:
245    Open an SRS TruVolume stage
246***************************************************************************/
247BERR_Code BAPE_TruVolume_Create(
248    BAPE_Handle deviceHandle,
249    const BAPE_TruVolumeSettings *pSettings,
250    BAPE_TruVolumeHandle *pHandle
251    );
252
253/***************************************************************************
254Summary:
255    Close an SRS TruVolume stage
256   
257Description:
258    Input to the stage must be removed prior to closing.
259***************************************************************************/
260void BAPE_TruVolume_Destroy(
261    BAPE_TruVolumeHandle handle
262    );
263
264/***************************************************************************
265Summary:
266    Get Settings for an SRS TruVolume stage
267***************************************************************************/
268void BAPE_TruVolume_GetSettings(
269    BAPE_TruVolumeHandle handle,
270    BAPE_TruVolumeSettings *pSettings    /* [out] Settings */
271    );
272
273/***************************************************************************
274Summary:
275    Set Settings for an SRS TruVolume stage
276***************************************************************************/
277BERR_Code BAPE_TruVolume_SetSettings(
278    BAPE_TruVolumeHandle handle,
279    const BAPE_TruVolumeSettings *pSettings
280    );
281
282/***************************************************************************
283Summary:
284    Get the audio connector for an SRS TruVolume stage
285***************************************************************************/
286void BAPE_TruVolume_GetConnector(
287    BAPE_TruVolumeHandle handle,
288    BAPE_Connector *pConnector
289    );
290
291/***************************************************************************
292Summary:
293Add an input to this processing stage
294***************************************************************************/
295BERR_Code BAPE_TruVolume_AddInput(
296    BAPE_TruVolumeHandle handle,
297    BAPE_Connector input
298    );
299
300/***************************************************************************
301Summary:
302Remove an input from this processing stage
303***************************************************************************/
304BERR_Code BAPE_TruVolume_RemoveInput(
305    BAPE_TruVolumeHandle handle,
306    BAPE_Connector input
307    );
308
309/***************************************************************************
310Summary:
311Remove all inputs from this processing stage
312***************************************************************************/
313BERR_Code BAPE_TruVolume_RemoveAllInputs(
314    BAPE_TruVolumeHandle handle
315    );
316
317#endif /* #ifndef BAPE_TRU_VOLUME_H__ */
318
Note: See TracBrowser for help on using the repository browser.