source: svn/newcon3bcm2_21bu/nexus/modules/audio/7552/include/nexus_audio_mixer.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: 8.5 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_audio_mixer.h $
39* $brcm_Revision: 1 $
40* $brcm_Date: 10/10/11 10:18a $
41*
42* API Description:
43*   API name: AudioMixer
44*    APIs for an audio mixer.  Allows one or more inputs to be
45*    connected, and provides input volume control for mixing.
46*
47* Revision History:
48*
49* $brcm_Log: /nexus/modules/audio/7422/include/nexus_audio_mixer.h $
50*
51* 1   10/10/11 10:18a jgarrett
52* SW7425-1119: Merge to main branch
53*
54* SW7425-1119/1   8/26/11 12:19p jgarrett
55* SW7425-1119: Adding mixer start/stop routines
56*
57***************************************************************************/
58#ifndef NEXUS_AUDIO_MIXER_H__
59#define NEXUS_AUDIO_MIXER_H__
60
61#include "nexus_types.h"
62#include "nexus_audio_types.h"
63
64#ifdef __cplusplus
65extern "C" {
66#endif
67
68/*=************************************
69Interface: AudioMixer
70
71Header file: nexus_audio_mixer.h
72
73Module: Audio
74
75Description: Mixer two or more PCM NEXUS_AudioInputs into a single NEXUS_AudioOutput.
76
77**************************************/
78
79/**
80Summary:
81Handle for an Audio Mixer
82**/
83typedef struct NEXUS_AudioMixer *NEXUS_AudioMixerHandle;
84
85/***************************************************************************
86Summary:
87Audio Mixer Settings
88***************************************************************************/
89typedef struct NEXUS_AudioMixerSettings
90{
91    bool mixUsingDsp;           /* If true, mix contents in the DSP as opposed to the mixer hardware. 
92                                   This requires the masterInput field to be set below prior to starting
93                                   any input.  This field should be set prior to NEXUS_AudioMixer_Open
94                                   and not changed on the fly. */
95    NEXUS_AudioInput master;    /* If mixUsingDsp is true, this field will determine what input is deemed
96                                   to be the master for mixing purposes.  The master must be started prior
97                                   to starting any secondary channels, and it will determine the output timing.
98                                   It must also be directly connected to this mixer, with no post-processing
99                                   prior to mixing. */
100} NEXUS_AudioMixerSettings;
101
102/***************************************************************************
103Summary:
104Get default settings for an audio mixer
105***************************************************************************/
106void NEXUS_AudioMixer_GetDefaultSettings(
107    NEXUS_AudioMixerSettings *pSettings    /* [out] Default Settings */
108    );
109
110/***************************************************************************
111Summary:
112Open an audio mixer
113***************************************************************************/
114NEXUS_AudioMixerHandle NEXUS_AudioMixer_Open( /* attr{destructor=NEXUS_AudioMixer_Close}  */
115    const NEXUS_AudioMixerSettings *pSettings /* attr{null_allowed=y} */
116    );
117
118/***************************************************************************
119Summary:
120Close an audio mixer
121***************************************************************************/
122void NEXUS_AudioMixer_Close(
123    NEXUS_AudioMixerHandle handle
124    );
125
126/***************************************************************************
127Summary:
128Get current settings for an audio mixer
129***************************************************************************/
130void NEXUS_AudioMixer_GetSettings(
131    NEXUS_AudioMixerHandle handle,
132    NEXUS_AudioMixerSettings *pSettings      /* [out] Mixer Settings */
133    );
134
135/***************************************************************************
136Summary:
137Start a mixer
138
139Description:
140This call is optional.  By default, mixers will automatically start when
141The first input starts, but if you want to explicitly enable the mixer
142earlier call this function prior to starting any inputs.   Currently, this
143is only supported if mixUsingDsp is set to true.
144***************************************************************************/
145NEXUS_Error NEXUS_AudioMixer_Start(
146    NEXUS_AudioMixerHandle handle
147    );
148
149/***************************************************************************
150Summary:
151Stop a mixer
152
153Description:
154This call is required only if you call NEXUS_AudioMixer_Start().  By default,
155mixers will automatically stop when the last input stops, but if you
156have explicitly started the mixer via NEXUS_AudioMixer_Start() you must call
157this routine to stop it after all inputs have stopped.
158***************************************************************************/
159void NEXUS_AudioMixer_Stop(
160    NEXUS_AudioMixerHandle handle
161    );
162
163/***************************************************************************
164Summary:
165Set settings of an audio mixer
166***************************************************************************/
167NEXUS_Error NEXUS_AudioMixer_SetSettings(
168    NEXUS_AudioMixerHandle handle,
169    const NEXUS_AudioMixerSettings *pSettings    /* Mixer Settings */
170    );
171
172/***************************************************************************
173Summary:
174Add an audio input to a mixer
175***************************************************************************/
176NEXUS_Error NEXUS_AudioMixer_AddInput(
177    NEXUS_AudioMixerHandle handle,
178    NEXUS_AudioInput input
179    );
180
181/***************************************************************************
182Summary:
183Remove an audio input from a mixer
184***************************************************************************/
185NEXUS_Error NEXUS_AudioMixer_RemoveInput(
186    NEXUS_AudioMixerHandle handle,
187    NEXUS_AudioInput input
188    );
189
190/***************************************************************************
191Summary:
192Remove all audio inputs from a mixer
193***************************************************************************/
194NEXUS_Error NEXUS_AudioMixer_RemoveAllInputs(
195    NEXUS_AudioMixerHandle handle
196    );
197
198/***************************************************************************
199Summary:
200Get the audio input connector for connection to outputs or post-processing
201***************************************************************************/
202NEXUS_AudioInput NEXUS_AudioMixer_GetConnector(
203    NEXUS_AudioMixerHandle mixer
204    );
205
206#ifdef __cplusplus
207}
208#endif
209
210#endif /* #ifndef NEXUS_AUDIO_MIXER_H__ */
211
Note: See TracBrowser for help on using the repository browser.