| 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_ac3_encode.h $ |
|---|
| 39 | * $brcm_Revision: 5 $ |
|---|
| 40 | * $brcm_Date: 5/25/11 5:16p $ |
|---|
| 41 | * |
|---|
| 42 | * API Description: |
|---|
| 43 | * API name: Ac3Encode |
|---|
| 44 | * Specific APIs related to AC3 Audio Encoding |
|---|
| 45 | * |
|---|
| 46 | * Revision History: |
|---|
| 47 | * |
|---|
| 48 | * $brcm_Log: /nexus/modules/audio/7400/include/nexus_ac3_encode.h $ |
|---|
| 49 | * |
|---|
| 50 | * 5 5/25/11 5:16p jgarrett |
|---|
| 51 | * SW7425-408: Adding BDBG_OBJECT to input/output types and MS11 features |
|---|
| 52 | * |
|---|
| 53 | * 4 4/22/11 10:43a erickson |
|---|
| 54 | * SW7420-1148: remove attr{shutdown=NEXUS_AudioInput_Shutdown} |
|---|
| 55 | * |
|---|
| 56 | * 3 12/14/10 3:18p erickson |
|---|
| 57 | * SW7420-1285: add null_allowed attribute |
|---|
| 58 | * |
|---|
| 59 | * 2 10/4/08 6:22a jgarrett |
|---|
| 60 | * PR 45709: Adding AC3 encode |
|---|
| 61 | * |
|---|
| 62 | ***************************************************************************/ |
|---|
| 63 | |
|---|
| 64 | #ifndef NEXUS_AC3_ENCODE_H__ |
|---|
| 65 | #define NEXUS_AC3_ENCODE_H__ |
|---|
| 66 | |
|---|
| 67 | #include "nexus_types.h" |
|---|
| 68 | #include "nexus_audio_types.h" |
|---|
| 69 | |
|---|
| 70 | #ifdef __cplusplus |
|---|
| 71 | extern "C" { |
|---|
| 72 | #endif |
|---|
| 73 | |
|---|
| 74 | /*=************************************ |
|---|
| 75 | Interface: Ac3Encode |
|---|
| 76 | |
|---|
| 77 | Header file: nexus_ac3_encode.h |
|---|
| 78 | |
|---|
| 79 | Module: Audio |
|---|
| 80 | |
|---|
| 81 | Description: AC3 Audio Encoding |
|---|
| 82 | |
|---|
| 83 | **************************************/ |
|---|
| 84 | |
|---|
| 85 | /** |
|---|
| 86 | Summary: |
|---|
| 87 | Handle for AC3 Encode stage |
|---|
| 88 | **/ |
|---|
| 89 | typedef struct NEXUS_Ac3Encode *NEXUS_Ac3EncodeHandle; |
|---|
| 90 | |
|---|
| 91 | /*************************************************************************** |
|---|
| 92 | Summary: |
|---|
| 93 | AC3 Encode Settings |
|---|
| 94 | ***************************************************************************/ |
|---|
| 95 | typedef struct NEXUS_Ac3EncodeSettings |
|---|
| 96 | { |
|---|
| 97 | bool spdifHeaderEnabled; /* If true, SPDIF header generation is enabled. */ |
|---|
| 98 | bool certificationMode; /* If true, run in certification mode. Set to false for normal operation. */ |
|---|
| 99 | } NEXUS_Ac3EncodeSettings; |
|---|
| 100 | |
|---|
| 101 | /*************************************************************************** |
|---|
| 102 | Summary: |
|---|
| 103 | Get default settings for an AC3 Encode stage |
|---|
| 104 | ***************************************************************************/ |
|---|
| 105 | void NEXUS_Ac3Encode_GetDefaultSettings( |
|---|
| 106 | NEXUS_Ac3EncodeSettings *pSettings /* [out] default settings */ |
|---|
| 107 | ); |
|---|
| 108 | |
|---|
| 109 | /*************************************************************************** |
|---|
| 110 | Summary: |
|---|
| 111 | Open an AC3 Encode stage |
|---|
| 112 | ***************************************************************************/ |
|---|
| 113 | NEXUS_Ac3EncodeHandle NEXUS_Ac3Encode_Open( /* attr{destructor=NEXUS_Ac3Encode_Close} */ |
|---|
| 114 | const NEXUS_Ac3EncodeSettings *pSettings /* attr{null_allowed=y} */ |
|---|
| 115 | ); |
|---|
| 116 | |
|---|
| 117 | /*************************************************************************** |
|---|
| 118 | Summary: |
|---|
| 119 | Close an AC3 Encode stage |
|---|
| 120 | |
|---|
| 121 | Description: |
|---|
| 122 | Input to the stage must be removed prior to closing. |
|---|
| 123 | ***************************************************************************/ |
|---|
| 124 | void NEXUS_Ac3Encode_Close( |
|---|
| 125 | NEXUS_Ac3EncodeHandle handle |
|---|
| 126 | ); |
|---|
| 127 | |
|---|
| 128 | /*************************************************************************** |
|---|
| 129 | Summary: |
|---|
| 130 | Get Settings for an AC3 Encode stage |
|---|
| 131 | ***************************************************************************/ |
|---|
| 132 | void NEXUS_Ac3Encode_GetSettings( |
|---|
| 133 | NEXUS_Ac3EncodeHandle handle, |
|---|
| 134 | NEXUS_Ac3EncodeSettings *pSettings /* [out] Settings */ |
|---|
| 135 | ); |
|---|
| 136 | |
|---|
| 137 | /*************************************************************************** |
|---|
| 138 | Summary: |
|---|
| 139 | Set Settings for an AC3 Encode stage |
|---|
| 140 | ***************************************************************************/ |
|---|
| 141 | NEXUS_Error NEXUS_Ac3Encode_SetSettings( |
|---|
| 142 | NEXUS_Ac3EncodeHandle handle, |
|---|
| 143 | const NEXUS_Ac3EncodeSettings *pSettings |
|---|
| 144 | ); |
|---|
| 145 | |
|---|
| 146 | /*************************************************************************** |
|---|
| 147 | Summary: |
|---|
| 148 | Get the audio connector for an AC3 Encode stage |
|---|
| 149 | ***************************************************************************/ |
|---|
| 150 | NEXUS_AudioInput NEXUS_Ac3Encode_GetConnector( |
|---|
| 151 | NEXUS_Ac3EncodeHandle handle |
|---|
| 152 | ); |
|---|
| 153 | |
|---|
| 154 | /*************************************************************************** |
|---|
| 155 | Summary: |
|---|
| 156 | Add an input to this processing stage |
|---|
| 157 | ***************************************************************************/ |
|---|
| 158 | NEXUS_Error NEXUS_Ac3Encode_AddInput( |
|---|
| 159 | NEXUS_Ac3EncodeHandle handle, |
|---|
| 160 | NEXUS_AudioInput input |
|---|
| 161 | ); |
|---|
| 162 | |
|---|
| 163 | /*************************************************************************** |
|---|
| 164 | Summary: |
|---|
| 165 | Remove an input from this processing stage |
|---|
| 166 | ***************************************************************************/ |
|---|
| 167 | NEXUS_Error NEXUS_Ac3Encode_RemoveInput( |
|---|
| 168 | NEXUS_Ac3EncodeHandle handle, |
|---|
| 169 | NEXUS_AudioInput input |
|---|
| 170 | ); |
|---|
| 171 | |
|---|
| 172 | /*************************************************************************** |
|---|
| 173 | Summary: |
|---|
| 174 | Remove all inputs from this processing stage |
|---|
| 175 | ***************************************************************************/ |
|---|
| 176 | NEXUS_Error NEXUS_Ac3Encode_RemoveAllInputs( |
|---|
| 177 | NEXUS_Ac3EncodeHandle handle |
|---|
| 178 | ); |
|---|
| 179 | |
|---|
| 180 | #ifdef __cplusplus |
|---|
| 181 | } |
|---|
| 182 | #endif |
|---|
| 183 | |
|---|
| 184 | #endif /* #ifndef NEXUS_AC3_ENCODE_H__ */ |
|---|
| 185 | |
|---|