source: svn/newcon3bcm2_21bu/nexus/modules/audio/7552/include/nexus_spdif_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: 9.9 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_spdif_output.h $
39* $brcm_Revision: 9 $
40* $brcm_Date: 4/22/11 10:43a $
41*
42* API Description:
43*   API name: SpdifOutput
44*    Specific APIs related to SPDIF audio outputs.
45*
46* Revision History:
47*
48* $brcm_Log: /nexus/modules/audio/7400/include/nexus_spdif_output.h $
49*
50* 9   4/22/11 10:43a erickson
51* SW7420-1148: remove attr{shutdown=NEXUS_AudioInput_Shutdown}
52*
53* 8   12/14/10 3:18p erickson
54* SW7420-1285: add null_allowed attribute
55*
56* 7   12/3/10 5:50p jgarrett
57* SW35230-2472: Adding CGMS-A settings for SPDIF
58*
59* 6   2/19/09 11:13a jgarrett
60* PR 52181: Adding dither option
61*
62* 5   2/7/08 12:11p vsilyaev
63* PR 38692: Added attributes for shutdown functions
64*
65* 4   2/6/08 4:28p vsilyaev
66* PR 38682: Added attributes for the linux kernel/user proxy mode
67*
68* 3   1/23/08 9:22p vobadm
69* PR35457: update docs
70*
71* 2   1/23/08 2:39p erickson
72* PR35457: update docs
73*
74* 1   1/18/08 2:18p jgarrett
75* PR 38808: Merging to main branch
76*
77* Nexus_Devel/9   1/9/08 5:56p jgarrett
78* PR 38535: Adding option for raw channel status
79*
80* Nexus_Devel/8   11/29/07 2:24p erickson
81* PR35457: doc update for 0.5 release
82*
83* Nexus_Devel/7   11/6/07 4:25p jgarrett
84* PR 34954: Fixing include merge bug
85*
86* Nexus_Devel/6   11/6/07 4:22p jgarrett
87* PR 34954: Migrating to audio connector model
88*
89* Nexus_Devel/5   11/5/07 3:38p erickson
90* PR36725: added #include
91*
92* Nexus_Devel/5   11/5/07 2:13p erickson
93* PR36725: added required #include
94*
95* Nexus_Devel/4   10/4/07 2:25p erickson
96* PR34594: removed audio descriptors
97*
98* Nexus_Devel/3   9/27/07 9:18p jgarrett
99* PR 34954: Adding SPDIF
100*
101* Nexus_Devel/2   9/27/07 7:52p jgarrett
102* PR 34954: Changing some prototypes
103*
104* Nexus_Devel/1   9/17/07 1:33p jgarrett
105* PR 34954: Splitting I2S, SPDIF, and PCM inputs and outputs
106*
107***************************************************************************/
108
109#ifndef NEXUS_SPDIF_OUTPUT_H__
110#define NEXUS_SPDIF_OUTPUT_H__
111
112#include "nexus_types.h"
113#include "nexus_audio_types.h"
114
115#ifdef __cplusplus
116extern "C" {
117#endif
118
119/*=************************************
120Interface: SpdifOutput
121
122Header file: nexus_spdif_output.h
123
124Module: Audio
125
126Description: Route PCM or compressed audio to a SPDIF output
127
128**************************************/
129
130/**
131Summary:
132Handle for SPDIF output
133**/
134typedef struct NEXUS_SpdifOutput *NEXUS_SpdifOutputHandle;
135
136/***************************************************************************
137Summary:
138SPDIF Output Settings
139***************************************************************************/
140typedef enum NEXUS_SpdifOutputBurstType
141{
142    NEXUS_SpdifOutputBurstType_eNull,       /* Insert NULL burst during underflow */
143    NEXUS_SpdifOutputBurstType_ePause,      /* Insert PAUSE burst during underflow */
144    NEXUS_SpdifOutputBurstType_eNone,       /* Don't insert any burst during underflow */
145    NEXUS_SpdifOutputBurstType_eMax
146}NEXUS_SpdifOutputBurstType;
147
148/***************************************************************************
149Summary:
150SPDIF Output Settings
151***************************************************************************/
152typedef struct NEXUS_SpdifOutputSettings
153{
154    bool    limitTo16Bits;  /* If true, the output will be limited to 16 bits */
155
156    bool    dither;         /* If true, a dither signal will be sent out when
157                               there is no data on this output in PCM mode. */
158
159    NEXUS_SpdifOutputBurstType burstType; /* Burst type insertion for compressed data */
160
161    /* The information below can be changed while a decode is in progress */
162    /* These values can be overridden with NEXUS_SpdifOutput_SetRawChannelStatus */
163    struct
164    {
165        bool           professionalMode;    /* [0:0] The professional mode flag.
166                                                TRUE: Professional mode. Other user
167                                                options will not be considered.
168                                                FALSE: Consumer mode.*/
169        bool           swCopyRight;         /* [2:2] Software CopyRight assert.
170                                                TRUE: CopyRight is asserted
171                                                FALSE: CopyRight is not asserted */
172        uint16_t       categoryCode;        /* [8:15] Category Code */
173        uint16_t       clockAccuracy;       /* [28:29] Clock Accuracy */
174        bool           separateLRChanNum;   /* TRUE:  Left channel num = 0000
175                                                      Right Channel Num = 0000
176                                               FALSE: Left channel num = 1000
177                                                      Right Channel Num = 0100 */
178        uint8_t        cgmsA;               /* CGMS-A copy bits.  Typical values are
179                                               0=Copy Freely 1=Copy Once
180                                               2=Reserved 3=Copy Never */
181    } channelStatusInfo;
182} NEXUS_SpdifOutputSettings;
183
184/***************************************************************************
185Summary:
186Get default settings for a SPDIF Output
187***************************************************************************/
188void NEXUS_SpdifOutput_GetDefaultSettings(
189    NEXUS_SpdifOutputSettings *pSettings   /* [out] default settings */
190    );
191
192/***************************************************************************
193Summary:
194Open a SPDIF Output
195***************************************************************************/
196NEXUS_SpdifOutputHandle NEXUS_SpdifOutput_Open( /* attr{destructor=NEXUS_SpdifOutput_Close}  */
197    unsigned index,
198    const NEXUS_SpdifOutputSettings *pSettings     /* attr{null_allowed=y} */
199    );
200
201/***************************************************************************
202Summary:
203Close a SPDIF Output
204
205Description:
206Input to the SPDIF output must be removed prior to closing.
207***************************************************************************/
208void NEXUS_SpdifOutput_Close(
209    NEXUS_SpdifOutputHandle handle
210    );
211
212/***************************************************************************
213Summary:
214Get Settings for a SPDIF Output
215***************************************************************************/
216void NEXUS_SpdifOutput_GetSettings(
217    NEXUS_SpdifOutputHandle handle,
218    NEXUS_SpdifOutputSettings *pSettings    /* [out] Settings */
219    );
220
221/***************************************************************************
222Summary:
223Set Settings for a SPDIF Output
224***************************************************************************/
225NEXUS_Error NEXUS_SpdifOutput_SetSettings(
226    NEXUS_SpdifOutputHandle handle,
227    const NEXUS_SpdifOutputSettings *pSettings
228    );
229
230/***************************************************************************
231Summary:
232Get the audio connector for a SPDIF output
233***************************************************************************/
234NEXUS_AudioOutput NEXUS_SpdifOutput_GetConnector(
235    NEXUS_SpdifOutputHandle handle
236    );
237
238/***************************************************************************
239Summary:
240Program the transmitted channel status in raw format.
241
242Description:
243This API will set the SPDIF channel status bits using raw 64-bit values
244per channel.  Not available on all platforms.  Once set, the values in
245NEXUS_SpdifOutputSettings will be ignored.  To clear these settings, pass
246NULL for pChannelStatus.
247***************************************************************************/
248NEXUS_Error NEXUS_SpdifOutput_SetRawChannelStatus(
249    NEXUS_SpdifOutputHandle handle,
250    NEXUS_AudioRawChannelStatus *pChannelStatus
251    );
252
253#ifdef __cplusplus
254}
255#endif
256
257#endif /* #ifndef NEXUS_SPDIF_OUTPUT_H__ */
258
Note: See TracBrowser for help on using the repository browser.