source: svn/newcon3bcm2_21bu/nexus/modules/audio/7552/include/nexus_i2s_output.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: 12.4 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_i2s_output.h $
39* $brcm_Revision: 10 $
40* $brcm_Date: 8/18/11 5:51p $
41*
42* API Description:
43*   API name: I2sOutput
44*    Specific APIs related to I2S audio outputs.
45*
46* Revision History:
47*
48* $brcm_Log: /nexus/modules/audio/7400/include/nexus_i2s_output.h $
49*
50* 10   8/18/11 5:51p jgarrett
51* SWDTV-6306: Merge DTV APE changes to main branch
52*
53* Nexus_APE_Integration/1   7/8/11 6:40p jgarrett
54* SWDTV-6760: Adding I2sMultiOutput
55*
56* 9   4/22/11 10:43a erickson
57* SW7420-1148: remove attr{shutdown=NEXUS_AudioInput_Shutdown}
58*
59* 8   1/18/11 4:17p jgarrett
60* SW7422-146: Adding auto mclk mode
61*
62* 7   12/14/10 3:18p erickson
63* SW7420-1285: add null_allowed attribute
64*
65* 6   2/7/08 12:11p vsilyaev
66* PR 38692: Added attributes for shutdown functions
67*
68* 5   2/6/08 4:28p vsilyaev
69* PR 38682: Added attributes for the linux kernel/user proxy mode
70*
71* 4   1/28/08 9:41a erickson
72* PR35457: comment update
73*
74* 3   1/23/08 9:22p vobadm
75* PR35457: update docs
76*
77* 2   1/23/08 2:39p erickson
78* PR35457: update docs
79*
80* 1   1/18/08 2:18p jgarrett
81* PR 38808: Merging to main branch
82*
83* Nexus_Devel/2   12/6/07 2:17p jgarrett
84* PR 37971: Refactoring to connector model
85*
86* Nexus_Devel/1   9/17/07 1:32p jgarrett
87* PR 34954: Splitting I2S, SPDIF, and PCM inputs and outputs
88*
89***************************************************************************/
90#ifndef NEXUS_I2S_OUTPUT_H__
91#define NEXUS_I2S_OUTPUT_H__
92
93#include "nexus_types.h"
94#include "nexus_audio_types.h"
95
96#ifdef __cplusplus
97extern "C" {
98#endif
99
100/*=************************************
101Interface: I2sOutput
102
103Header file: nexus_i2s_output.h
104
105Module: Audio
106
107Description: Route PCM audio data to an I2S output
108
109**************************************/
110
111/**
112Summary:
113Handle for I2S output
114**/
115typedef struct NEXUS_I2sOutput *NEXUS_I2sOutputHandle;
116
117/***************************************************************************
118Summary:
119Bit Clock (SCLK) Rate
120***************************************************************************/
121typedef enum NEXUS_I2sOutputSclkRate
122{
123    NEXUS_I2sOutputSclkRate_e64Fs,
124    NEXUS_I2sOutputSclkRate_e128Fs,
125    NEXUS_I2sOutputSclkRate_eMax
126} NEXUS_I2sOutputSclkRate;
127
128/***************************************************************************
129Summary:
130Master Clock (MCLK) Rate
131***************************************************************************/
132typedef enum NEXUS_I2sOutputMclkRate
133{
134    NEXUS_I2sOutputMclkRate_e128Fs,
135    NEXUS_I2sOutputMclkRate_e256Fs,
136    NEXUS_I2sOutputMclkRate_e384Fs,
137    NEXUS_I2sOutputMclkRate_e512Fs,
138    NEXUS_I2sOutputMclkRate_eAuto,      /* Automatically select based on
139                                           timing source.  Not applicable on
140                                           all platforms */
141    NEXUS_I2sOutputMclkRate_eMax
142} NEXUS_I2sOutputMclkRate;
143
144/***************************************************************************
145Summary:
146I2S Output Settings
147***************************************************************************/
148typedef struct NEXUS_I2sOutputSettings
149{
150    bool                     lsbAtLRClock;       /* Data Justification.
151                                                    Controls whether LSB or
152                                                    MSB is at LRCK transition
153                                                    TRUE: LSB, FALSE: MSB */
154    bool                     alignedToLRClock;   /* Controls whether data is
155                                                    aligned with LRCK or delayed
156                                                    by one SCLK period
157                                                    FALSE: Delayed.
158                                                    TRUE: Aligned */
159    bool                     lrClkPolarity;      /* Sets the polarity of the
160                                                    left/right clock
161                                                    TRUE: High for Left
162                                                    FALSE: Low for Left */
163    NEXUS_I2sOutputSclkRate  sclkRate;           /* SClk (bit Clock, multiple of Fs)
164                                                    rate. */
165    NEXUS_I2sOutputMclkRate  mclkRate;           /* MClk rate. (multiple of Fs) */
166} NEXUS_I2sOutputSettings;
167
168/***************************************************************************
169Summary:
170Get default settings for an I2S output
171***************************************************************************/
172void NEXUS_I2sOutput_GetDefaultSettings(
173    NEXUS_I2sOutputSettings *pSettings   /* [out] default settings */
174    );
175
176/***************************************************************************
177Summary:
178Open an I2S Output device
179***************************************************************************/
180NEXUS_I2sOutputHandle NEXUS_I2sOutput_Open( /* attr{destructor=NEXUS_I2sOutput_Close}  */
181    unsigned index,
182    const NEXUS_I2sOutputSettings *pSettings /* attr{null_allowed=y} */
183    );
184
185/***************************************************************************
186Summary:
187Close an I2S Output device
188***************************************************************************/
189void NEXUS_I2sOutput_Close(
190    NEXUS_I2sOutputHandle handle
191    );
192
193/***************************************************************************
194Summary:
195Get settings for an I2S output
196***************************************************************************/
197void NEXUS_I2sOutput_GetSettings(
198    NEXUS_I2sOutputHandle handle,
199    NEXUS_I2sOutputSettings *pSettings  /* [out] Settings */
200    );
201
202/***************************************************************************
203Summary:
204Set settings for an I2S output
205***************************************************************************/
206NEXUS_Error NEXUS_I2sOutput_SetSettings(
207    NEXUS_I2sOutputHandle handle,
208    const NEXUS_I2sOutputSettings *pSettings
209    );
210
211/***************************************************************************
212Summary:
213Get the audio connector for an I2S output
214***************************************************************************/
215NEXUS_AudioOutput NEXUS_I2sOutput_GetConnector(
216    NEXUS_I2sOutputHandle handle
217    );
218
219/**
220Summary:
221Handle for I2S Multichannel output
222**/
223typedef struct NEXUS_I2sMultiOutput *NEXUS_I2sMultiOutputHandle;
224
225/***************************************************************************
226Summary:
227Multichannel I2S Modes
228***************************************************************************/
229typedef enum NEXUS_I2sMultiMode
230{
231    NEXUS_I2sMultiMode_eMultichannel,    /* Default.  I2S multi will be used
232                                           as a single output capable of stereo
233                                           or multichannel. */
234    NEXUS_I2sMultiMode_eStereo,          /* I2S multi will be used as a set of
235                                           discrete stereo outputs that share
236                                           a common sample clock and word select. */
237    NEXUS_I2sMultiMode_eMax
238} NEXUS_I2sMultiMode;
239
240/***************************************************************************
241Summary:
242Multichannel I2S Output Settings
243***************************************************************************/
244typedef struct NEXUS_I2sMultiOutputSettings
245{
246    NEXUS_I2sMultiMode mode; /* Mode of operation, multichannel or stereo.
247                                Must be set prior to NEXUS_I2sMultiOutput_Open()
248                                and cannot be changed on the fly. */
249
250    NEXUS_I2sOutputSettings i2sSettings;
251} NEXUS_I2sMultiOutputSettings;
252
253/***************************************************************************
254Summary:
255Get default settings for a Multichannel I2S output
256***************************************************************************/
257void NEXUS_I2sMultiOutput_GetDefaultSettings(
258    NEXUS_I2sMultiOutputSettings *pSettings   /* [out] default settings */
259    );
260
261/***************************************************************************
262Summary:
263Open a Multichannel I2S Output device
264***************************************************************************/
265NEXUS_I2sMultiOutputHandle NEXUS_I2sMultiOutput_Open( /* attr{destructor=NEXUS_I2sMultiOutput_Close}  */
266    unsigned index,
267    const NEXUS_I2sMultiOutputSettings *pSettings   /* attr{null_allowed=y} */
268    );
269
270/***************************************************************************
271Summary:
272Close a Multichannel I2S Output device
273***************************************************************************/
274void NEXUS_I2sMultiOutput_Close(
275    NEXUS_I2sMultiOutputHandle handle
276    );
277
278/***************************************************************************
279Summary:
280Get settings for a Multichannel I2S output
281***************************************************************************/
282void NEXUS_I2sMultiOutput_GetSettings(
283    NEXUS_I2sMultiOutputHandle handle,
284    NEXUS_I2sMultiOutputSettings *pSettings  /* [out] Settings */
285    );
286
287/***************************************************************************
288Summary:
289Set settings for a Multichannel I2S output
290***************************************************************************/
291NEXUS_Error NEXUS_I2sMultiOutput_SetSettings(
292    NEXUS_I2sMultiOutputHandle handle,
293    const NEXUS_I2sMultiOutputSettings *pSettings
294    );
295
296/***************************************************************************
297Summary:
298Get the audio connector for a multichannel I2S or the first stereo pair
299if set to stereo mode.
300***************************************************************************/
301NEXUS_AudioOutput NEXUS_I2sMultiOutput_GetConnector(
302    NEXUS_I2sMultiOutputHandle handle
303    );
304
305/***************************************************************************
306Summary:
307Get the audio connector for an individual stereo pair on Multichannel I2S.
308Only supported if NEXUS_I2sMultiOutputSettings.mode is set to
309NEXUS_I2sMultiMode_eStereo.
310***************************************************************************/
311NEXUS_AudioOutput NEXUS_I2sMultiOutput_GetStereoConnector(
312    NEXUS_I2sMultiOutputHandle handle,
313    NEXUS_AudioChannelPair channelPair
314    );
315
316#ifdef __cplusplus
317}
318#endif
319
320#endif /* #ifndef NEXUS_I2S_OUTPUT_H__ */
321
Note: See TracBrowser for help on using the repository browser.