source: svn/newcon3bcm2_21bu/nexus/modules/audio/7552/include/nexus_studio_sound.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: 20.3 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: nexus_studio_sound.h $
39* $brcm_Revision: 2 $
40* $brcm_Date: 8/24/11 5:31p $
41*
42* API Description:
43*   API name: StudioSound
44*    Specific APIs related to SRS StudioSound Audio Processing
45*
46* Revision History:
47*
48* $brcm_Log: /nexus/modules/audio/7422/include/nexus_studio_sound.h $
49*
50* 2   8/24/11 5:31p jgarrett
51* SW7344-176: Adding null_allowed attribute for kernelmode
52*
53* 1   8/18/11 5:51p jgarrett
54* SWDTV-6306: Merge DTV APE changes to main branch
55*
56* Nexus_APE_Integration/1   7/1/11 5:50p jgarrett
57* SWDTV-6306: Integrated to latest 7422 baseline and nexus audio
58*  directory structure
59*
60* 6   5/30/11 5:45p jhaberf
61* SWDTV-7253: removed shutdown attr as this is no longer used
62*
63* 5   3/21/11 12:15p jhaberf
64* SWDTV-5784: Updated SRS StudioSound interface parameters required for
65*  certification
66*
67* 4   3/16/11 3:04p jhaberf
68* SWDTV-5784: Updated SRS StudioSound interface with new HPF/PEQ
69*  parameters
70*
71* 3   3/4/11 1:55p jhaberf
72* SWDTV-5047: Added PEQ filter mode to StudioSound settings
73*
74* 2   2/7/11 3:33p jhaberf
75* SW35230-2941: Provided SRS Studio Sound mode setting
76*
77* 1   11/10/10 7:06p jhaberf
78* SW3548-2923: Added Support for SRS Studio.
79*
80*
81***************************************************************************/
82
83#ifndef NEXUS_STUDIO_SOUND_H__
84#define NEXUS_STUDIO_SOUND_H__
85
86#include "nexus_types.h"
87#include "nexus_audio_types.h"
88#include "nexus_tru_surround_hd.h"
89#include "nexus_tru_volume.h"
90
91#ifdef __cplusplus
92extern "C" {
93#endif
94
95/*=************************************
96Interface: TruSurrroundHd
97
98Header file: nexus_studio_sound.h
99
100Module: Audio
101
102Description: SRS StudioSound Post Processing
103
104**************************************/
105
106/**
107Summary:
108Handle for SRS StudioSound stage
109**/
110typedef struct NEXUS_StudioSound *NEXUS_StudioSoundHandle;
111
112#define NEXUS_SRS_SS_MAX_PEQ_BANDS    8
113#define NEXUS_SRS_SS_MAX_GEQ_BANDS    10
114
115/***************************************************************************
116Summary:
117StudioSound Mode - Select the opearating mode of StudioSound. Default is Mode1.
118                   Based on mode, a few of the modules will be disabled by the driver internally.
119    Mode1: TruVol(on), HPF(on), CircleSurround(on), TruSurroundHD(on), GEQ(off), HardLimiter(on), TruEQ(on)
120    Mode2: TruVol(off), HPF(on), CircleSurround(off), TruSurroundHD(off), GEQ(on), HardLimiter(on), TruEq(on)
121
122Note: When TruVol/CircleSurround/TruSurroundHD is off, a bypass gain of 1.0 will be used.
123***************************************************************************/
124typedef enum NEXUS_StudioSoundMode
125{
126    NEXUS_StudioSoundMode_eMode1,
127    NEXUS_StudioSoundMode_eMode2,
128    NEXUS_StudioSoundMode_eMax
129} NEXUS_StudioSoundMode;
130
131/***************************************************************************
132Summary:
133SRS StudioSound Input Mode
134***************************************************************************/
135typedef enum NEXUS_StudioSoundInputMode
136{
137    NEXUS_StudioSoundInputMode_eMono,
138    NEXUS_StudioSoundInputMode_eStereo,
139    NEXUS_StudioSoundInputMode_eMultiChannel,
140    NEXUS_StudioSoundInputMode_eLtRt,
141    NEXUS_StudioSoundInputMode_eMax
142} NEXUS_StudioSoundInputMode;
143
144/***************************************************************************
145Summary:
146SRS CircleSurround Processing Mode
147***************************************************************************/
148typedef enum NEXUS_CircleSurroundMode
149{
150    NEXUS_CircleSurroundMode_eCinema,
151    NEXUS_CircleSurroundMode_eMusic,
152    NEXUS_CircleSurroundMode_eMax
153}NEXUS_CircleSurroundMode;
154
155/***************************************************************************
156Summary:
157SRS CircleSurround Settings
158***************************************************************************/
159typedef struct NEXUS_CircleSurroundSettings
160{
161    bool enabled;                       /* If true, CircleSurround processing is enabled. Default: true */
162
163    unsigned inputGain;                 /* Adjusts the signal level immediately prior to CircleSurround processing.  Range: 125 to 1000. Default: 1000 */
164    NEXUS_CircleSurroundMode mode;      /* The CircleSurround processing mode. Default:  NEXUS_CircleSurroundMode_eCinema */
165    unsigned outputMode;                /* 0: stereo ; 1: multichannel. Default: 0 (only 0 is supported) */
166    unsigned outputGainFront;           /* Output gain for the front (L/R). Range: 89 to 4000. Default: 1000 */
167    unsigned outputGainRear;            /* Output gain for the rear (Ls/Rs). Range: 89 to 4000. Default: 1000 */
168    unsigned outputGainCenter;          /* Output gain for the center. Range: 89 to 4000. Default: 1000 */
169    unsigned outputGainSubwoofer;       /* Output gain for the subwoofer. Range: 89 to 4000. Default: 1000 */
170} NEXUS_CircleSurroundSettings;
171
172/***************************************************************************
173Summary:
174SRS TruDialog Settings
175***************************************************************************/
176typedef struct NEXUS_TruDialogSettings
177{
178    bool enabled;               /* If true, TruDialog processing is enabled. Default: true */
179
180    unsigned inputGain;         /* Adjusts the signal level prior immediately prior to TruDialog processing.  Range: 0 to 100. Default: 100 */
181    unsigned outputGain;        /* Adjusts the signal level prior after TruDialog processing.  Range: 0 to 100. Default: 100 */
182    unsigned processGain;       /* Controls how much of the calculated final output gain is applied to the output signal, effectively
183                                                            controlling how much the process will raise the dialog signal.  Range: 50 to 300. Default: 150 */
184    unsigned bypassGain;        /* Adjusts the signal level when TruDialog processing is disabled.  Range: 0 to 100. Default: 100 */
185    unsigned enhancementGain;  /*  The amount of vocal enhancement that is applied to the audio signal.  Range: 0 to 100. Default: 100 */
186} NEXUS_TruDialogSettings;
187
188/***************************************************************************
189Summary:
190SRS Graphic EQ Band Modes
191***************************************************************************/
192typedef enum NEXUS_SrsGraphicEqBandMode
193{
194    NEXUS_SrsGraphicEqBandMode_eFiveBand,
195    NEXUS_SrsGraphicEqBandMode_eTenBand,
196    NEXUS_SrsGraphicEqBandMode_eSpeakerCompensation,
197    NEXUS_SrsGraphicEqBandMode_eMax
198} NEXUS_SrsGraphicEqBandMode;
199
200/***************************************************************************
201Summary:
202SRS Graphic Equalizer Settings
203***************************************************************************/
204typedef struct NEXUS_SrsGraphicEqSettings
205{
206    bool leftEnabled;           /* If true, left channel processing is enabled. Default: true */
207    bool rightEnabled;          /* If true, right channel processing is enabled. Default: true */
208    NEXUS_SrsGraphicEqBandMode bandMode;  /* Graphic EQ band mode: 5-band or 10-band. Default NEXUS_SrsGraphicEqBandMode_eFiveBand */
209    unsigned leftBandGain[NEXUS_SRS_SS_MAX_GEQ_BANDS];   /* Left channel band gain.  Range for 5-band: 316 to 3160. Range for 10-band: 251 to 4000. Default: 1000 */
210    unsigned rightBandGain[NEXUS_SRS_SS_MAX_GEQ_BANDS];  /* Right channel band gain.  Range for 5-band: 316 to 3160. Range for 10-band: 251 to 4000. Default: 1000 */
211    unsigned inputGain;         /* Adjusts the signal level prior immediately prior to Graphic Equalizer processing.  Range: 316 to 3160 Default: 316 */
212    unsigned outputGain;        /* Adjusts the signal level prior after Graphic Equalizer processing.  Range: 0 to 100. Default: 100 */
213    unsigned bypassGain;        /* Adjusts the signal level when Graphic Equalizer processing is disabled.  Range: 0 to 100. Default: 100 */
214} NEXUS_SrsGraphicEqSettings;
215
216/***************************************************************************
217Summary:
218SRS TruEQ Filter parameters for coefficients specified by user
219***************************************************************************/
220typedef struct NEXUS_TruEqFilterCoefUserParam
221{
222    NEXUS_SrsFilterOrder filterOrder;    /* EQ filter order.  Default: NEXUS_SrsFilterOrder_eOrder2 */
223    unsigned scale;    /* Specified q-format of the coefficients. (1+scale).(31-scale) format
224                                           Default: 1. scale=1 implies a q-format of 2.30 */
225    int coefficientB0;
226    int coefficientA1;
227    int coefficientB1;
228    int coefficientA2;
229    int coefficientB2;
230}NEXUS_TruEqFilterCoefUserParam;
231
232/***************************************************************************
233Summary:
234SRS TruEQ Filter parameters for coefficients generated by specification
235***************************************************************************/
236typedef struct NEXUS_TruEqFilterCoefSpecParam
237{
238    int bandGain;    /*  Range: (-120 to 120). Default:0 Format: q24
239                                          Range in dB: -12 to 12 db. Default: 0dB
240                                          Range in Fixed point: 0x00404DE6 to 0x03FB2783 */
241
242    unsigned bandFrequency;    /*  Range: (20 - 20000)Hz. Default: 1000 Hz */
243    int qFactor;    /*  Range: (25 - 1600).  Default:200 Format: q24
244                                         Range in floating point: 0.25 to 16.0
245                                         Range in fixed point: 0x00400000 to 0x10000000 */
246}NEXUS_TruEqFilterCoefSpecParam;
247
248/***************************************************************************
249Summary:
250SRS TruEQ Settings
251***************************************************************************/
252typedef struct NEXUS_TruEqSettings
253{
254    bool leftEnabled;           /* If true, left channel processing is enabled. Default: true */
255    bool rightEnabled;          /* If true, right channel processing is enabled. Default: true */
256
257    bool leftBandEnabled[NEXUS_SRS_SS_MAX_PEQ_BANDS];   /* If true, left channel processing is enabled for this band. Default: true */
258    bool rightBandEnabled[NEXUS_SRS_SS_MAX_PEQ_BANDS];  /* If true, right channel processing is enabled for this band. Default: true */
259
260    unsigned inputGain;         /* Adjusts the signal level prior immediately prior to TruEQ processing.  Range: 0 to 100. Default: 100 */
261    unsigned outputGain;        /* Adjusts the signal level prior after TruEQ processing.  Range: 0 to 100. Default: 100 */
262    unsigned bypassGain;        /* Adjusts the signal level when TruEQ processing is disabled.  Range: 0 to 100. Default: 100 */
263
264    NEXUS_SrsFilterCoefGenMode coefGenMode;         /* Coefficients generation mode. Default: NEXUS_SrsFilterCoefGenMode_eFilterUser */
265    union
266    {
267        NEXUS_TruEqFilterCoefUserParam truEqFilterCoefUser[3][NEXUS_SRS_SS_MAX_PEQ_BANDS];
268                                                                  /* The first array dimension indicates 3 sampling frequencies 32, 44.1 and 48kHz respectively
269                                                                                                                        will be used if coefGenMode is NEXUS_SrsFilterCoefGenMode_eFilterUser */
270        NEXUS_TruEqFilterCoefSpecParam truEqFilterCoefSpec[NEXUS_SRS_SS_MAX_PEQ_BANDS];
271                                                                  /* Filter specification for generating filter coeffcients,
272                                                                                                                        will be used if eCoefGenMode is NEXUS_SrsFilterCoefGenMode_eFilterSpec */
273    } coefParam;
274} NEXUS_TruEqSettings;
275
276/***************************************************************************
277Summary:
278SRS Hard Limiter Block Size
279***************************************************************************/
280typedef enum NEXUS_SrsHardLimiterBlockSize
281{
282    NEXUS_SrsHardLimiterBlockSize_e256,
283    NEXUS_SrsHardLimiterBlockSize_e512,
284    NEXUS_SrsHardLimiterBlockSize_e768,
285    NEXUS_SrsHardLimiterBlockSize_e1024,
286    NEXUS_SrsHardLimiterBlockSize_eMax
287} NEXUS_SrsHardLimiterBlockSize;
288
289/***************************************************************************
290Summary:
291SRS Hard Limiter Settings
292***************************************************************************/
293typedef struct NEXUS_SrsHardLimiterSettings
294{
295    bool enabled;                               /* If true, Hard limiter processing is enabled. Default: true */
296    NEXUS_SrsHardLimiterBlockSize blockSize;    /* Processing block size. Default:  NEXUS_SrsHardLimiterBlockSize_e256 */
297    unsigned inputGain;                         /* Adjusts the signal level prior immediately prior to hard limiter processing.  Range: 0 to 400. Default: 100 */
298    unsigned outputGain;                        /* Adjusts the signal level prior after hard limiter processing.  Range: 0 to 400. Default: 100 */
299    unsigned bypassGain;                        /* Adjusts the signal level when hard limiter processing is disabled.  Range: 0 to 100. Default: 100 */   
300    unsigned boost;                             /* Modifies the signal level within the context of the hard limiter, so that the signal
301                                                                                        will not exceed the hard limit level parameter.  Range: 1 to 256000. Default: 2820 */
302    unsigned level;                             /* Specifies the level over which no signal shall bel allowed to exceed.  Range: 3 to 100000. Default: 100000 */
303    unsigned delay;                             /* Specifies the length of the look-ahead delay line utilized in the hard limiter.  Range: 6 to 22.  Default: 22 */
304} NEXUS_SrsHardLimiterSettings;
305
306/***************************************************************************
307Summary:
308SRS StudioSound Settings
309***************************************************************************/
310typedef struct NEXUS_StudioSoundSettings
311{
312    bool enabled;               /* If true, processing is enabled.  Otherwise this stage is bypassed. Default: true */
313    NEXUS_StudioSoundMode mode; /* Pre-defined operation mode of StudioSound */
314    unsigned inputGain;         /* Adjusts the signal level prior to StudioSound processing.  Ranges from 0 to 100 in %. */
315    unsigned outputGain;        /* Adjusts the signal level after StudioSound processing.  Ranges from 0 to 100 in %. */
316    unsigned bypassGain;        /* Adjusts the signal level when StudioStound is disabled.  Ranges from 0 to 100 in %. */
317    unsigned headroomGain;      /* Provides headroom for intermediate calculations to avoid clipping.  Ranges from 0 to 100 in %. */
318    NEXUS_StudioSoundInputMode inputMode; /* Channel configuration present in input. Default:  NEXUS_StudioSoundInputMode_eLtRt */
319
320    NEXUS_CircleSurroundSettings circleSurround;    /* CircleSurround settings */
321    NEXUS_TruDialogSettings truDialog;              /* TruDialog settings */
322    NEXUS_TruSurroundHdSettings truSurroundHd;      /* TruSurroundHd settings */
323    NEXUS_TruVolumeSettings truVolume;              /* TruVolume settings */
324    NEXUS_SrsGraphicEqSettings graphicEq;           /* Graphic Equalizer Settings */
325    NEXUS_TruEqSettings truEq;                      /* TruEq Settings */
326    NEXUS_SrsHighPassFilterSettings highPassFilter; /* High Pass Filter Settings */
327    NEXUS_SrsHardLimiterSettings hardLimiter;       /* Hard Limiter Settings */
328} NEXUS_StudioSoundSettings;
329
330/***************************************************************************
331Summary:
332    Get default settings for an SRS StudioSound stage
333***************************************************************************/
334void NEXUS_StudioSound_GetDefaultSettings(
335    NEXUS_StudioSoundSettings *pSettings   /* [out] default settings */
336    );
337
338/***************************************************************************
339Summary:
340    Open an SRS StudioSound stage
341***************************************************************************/
342NEXUS_StudioSoundHandle NEXUS_StudioSound_Open( /* attr{destructor=NEXUS_StudioSound_Close}  */
343    const NEXUS_StudioSoundSettings *pSettings     /* attr{null_allowed=y} */
344    );
345
346/***************************************************************************
347Summary:
348    Close an SRS StudioSound stage
349   
350Description:
351    Input to the stage must be removed prior to closing.
352***************************************************************************/
353void NEXUS_StudioSound_Close(
354    NEXUS_StudioSoundHandle handle
355    );
356
357/***************************************************************************
358Summary:
359    Get Settings for an SRS StudioSound stage
360***************************************************************************/
361void NEXUS_StudioSound_GetSettings(
362    NEXUS_StudioSoundHandle handle,
363    NEXUS_StudioSoundSettings *pSettings    /* [out] Settings */
364    );
365
366/***************************************************************************
367Summary:
368    Set Settings for an SRS StudioSound stage
369***************************************************************************/
370NEXUS_Error NEXUS_StudioSound_SetSettings(
371    NEXUS_StudioSoundHandle handle,
372    const NEXUS_StudioSoundSettings *pSettings
373    );
374
375/***************************************************************************
376Summary:
377    Get the audio connector for an SRS StudioSound stage
378***************************************************************************/
379NEXUS_AudioInput NEXUS_StudioSound_GetConnector( 
380    NEXUS_StudioSoundHandle handle
381    );
382
383/***************************************************************************
384Summary:
385Add an input to this processing stage
386***************************************************************************/
387NEXUS_Error NEXUS_StudioSound_AddInput(
388    NEXUS_StudioSoundHandle handle,
389    NEXUS_AudioInput input
390    );
391
392/***************************************************************************
393Summary:
394Remove an input from this processing stage
395***************************************************************************/
396NEXUS_Error NEXUS_StudioSound_RemoveInput(
397    NEXUS_StudioSoundHandle handle,
398    NEXUS_AudioInput input
399    );
400
401/***************************************************************************
402Summary:
403Remove all inputs from this processing stage
404***************************************************************************/
405NEXUS_Error NEXUS_StudioSound_RemoveAllInputs(
406    NEXUS_StudioSoundHandle handle
407    );
408
409#ifdef __cplusplus
410}
411#endif
412
413#endif /* #ifndef NEXUS_TRU_SURROUND_HD_H__ */
414
415
416
Note: See TracBrowser for help on using the repository browser.