| 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_input.h $ |
|---|
| 39 | * $brcm_Revision: 1 $ |
|---|
| 40 | * $brcm_Date: 8/18/11 5:51p $ |
|---|
| 41 | * |
|---|
| 42 | * API Description: |
|---|
| 43 | * API name: SpdifInput |
|---|
| 44 | * Specific APIs related to SPDIF audio inputs. |
|---|
| 45 | * |
|---|
| 46 | * Revision History: |
|---|
| 47 | * |
|---|
| 48 | * $brcm_Log: /nexus/modules/audio/7422/include/nexus_spdif_input.h $ |
|---|
| 49 | * |
|---|
| 50 | * 1 8/18/11 5:51p jgarrett |
|---|
| 51 | * SWDTV-6306: Merge DTV APE changes to main branch |
|---|
| 52 | * |
|---|
| 53 | * Nexus_APE_Integration/1 7/1/11 5:51p jgarrett |
|---|
| 54 | * SWDTV-6306: Integrated to latest 7422 baseline and nexus audio |
|---|
| 55 | * directory structure |
|---|
| 56 | * |
|---|
| 57 | * 5 5/30/11 5:52p jhaberf |
|---|
| 58 | * SWDTV-7253: removed shutdown attr as this is no longer used |
|---|
| 59 | * |
|---|
| 60 | * 4 2/7/08 11:44p vsilyaev |
|---|
| 61 | * PR 38682: Added attributes for the linux kernel/user proxy mode |
|---|
| 62 | * |
|---|
| 63 | * 3 1/23/08 9:22p vobadm |
|---|
| 64 | * PR35457: update docs |
|---|
| 65 | * |
|---|
| 66 | * 2 1/23/08 2:39p erickson |
|---|
| 67 | * PR35457: update docs |
|---|
| 68 | * |
|---|
| 69 | * 1 1/18/08 2:18p jgarrett |
|---|
| 70 | * PR 38808: Merging to main branch |
|---|
| 71 | * |
|---|
| 72 | * Nexus_Devel/2 11/29/07 10:33a jgarrett |
|---|
| 73 | * PR 34741: Changing settings |
|---|
| 74 | * |
|---|
| 75 | * Nexus_Devel/1 11/27/07 5:26p jgarrett |
|---|
| 76 | * PR 37471: Adding I2sInput and SpdifInput |
|---|
| 77 | * |
|---|
| 78 | * Nexus_Devel/1 9/17/07 1:33p jgarrett |
|---|
| 79 | * PR 34954: Splitting I2S, SPDIF, and PCM inputs and outputs |
|---|
| 80 | * |
|---|
| 81 | ***************************************************************************/ |
|---|
| 82 | |
|---|
| 83 | #ifndef NEXUS_SPDIF_INPUT_H__ |
|---|
| 84 | #define NEXUS_SPDIF_INPUT_H__ |
|---|
| 85 | |
|---|
| 86 | #include "nexus_types.h" |
|---|
| 87 | #include "nexus_audio_types.h" |
|---|
| 88 | #include "nexus_timebase.h" |
|---|
| 89 | |
|---|
| 90 | #ifdef __cplusplus |
|---|
| 91 | extern "C" { |
|---|
| 92 | #endif |
|---|
| 93 | |
|---|
| 94 | /*=************************************ |
|---|
| 95 | Interface: SpdifInput |
|---|
| 96 | |
|---|
| 97 | Header file: nexus_spdif_input.h |
|---|
| 98 | |
|---|
| 99 | Module: Audio |
|---|
| 100 | |
|---|
| 101 | Description: |
|---|
| 102 | |
|---|
| 103 | **************************************/ |
|---|
| 104 | |
|---|
| 105 | /** |
|---|
| 106 | Summary: |
|---|
| 107 | Handle for SPDIF input |
|---|
| 108 | **/ |
|---|
| 109 | typedef struct NEXUS_SpdifInput *NEXUS_SpdifInputHandle; |
|---|
| 110 | |
|---|
| 111 | /*************************************************************************** |
|---|
| 112 | Summary: |
|---|
| 113 | SPDIF Input Settings |
|---|
| 114 | ***************************************************************************/ |
|---|
| 115 | typedef struct NEXUS_SpdifInputSettings |
|---|
| 116 | { |
|---|
| 117 | bool muted; |
|---|
| 118 | } NEXUS_SpdifInputSettings; |
|---|
| 119 | |
|---|
| 120 | /*************************************************************************** |
|---|
| 121 | Summary: |
|---|
| 122 | Get default settings for a SPDIF Input |
|---|
| 123 | ***************************************************************************/ |
|---|
| 124 | void NEXUS_SpdifInput_GetDefaultSettings( |
|---|
| 125 | NEXUS_SpdifInputSettings *pSettings /* [out] default settings */ |
|---|
| 126 | ); |
|---|
| 127 | |
|---|
| 128 | /*************************************************************************** |
|---|
| 129 | Summary: |
|---|
| 130 | Open a SPDIF input device |
|---|
| 131 | ***************************************************************************/ |
|---|
| 132 | NEXUS_SpdifInputHandle NEXUS_SpdifInput_Open( /* attr{destructor=NEXUS_SpdifInput_Close} */ |
|---|
| 133 | unsigned index, |
|---|
| 134 | const NEXUS_SpdifInputSettings *pSettings |
|---|
| 135 | ); |
|---|
| 136 | |
|---|
| 137 | /*************************************************************************** |
|---|
| 138 | Summary: |
|---|
| 139 | Close a SPDIF input device |
|---|
| 140 | ***************************************************************************/ |
|---|
| 141 | void NEXUS_SpdifInput_Close( |
|---|
| 142 | NEXUS_SpdifInputHandle handle |
|---|
| 143 | ); |
|---|
| 144 | |
|---|
| 145 | /*************************************************************************** |
|---|
| 146 | Summary: |
|---|
| 147 | Get Settings for a SPDIF Input |
|---|
| 148 | ***************************************************************************/ |
|---|
| 149 | void NEXUS_SpdifInput_GetSettings( |
|---|
| 150 | NEXUS_SpdifInputHandle handle, |
|---|
| 151 | NEXUS_SpdifInputSettings *pSettings /* [out] Settings */ |
|---|
| 152 | ); |
|---|
| 153 | |
|---|
| 154 | /*************************************************************************** |
|---|
| 155 | Summary: |
|---|
| 156 | Set Settings for a SPDIF Input |
|---|
| 157 | ***************************************************************************/ |
|---|
| 158 | NEXUS_Error NEXUS_SpdifInput_SetSettings( |
|---|
| 159 | NEXUS_SpdifInputHandle handle, |
|---|
| 160 | const NEXUS_SpdifInputSettings *pSettings |
|---|
| 161 | ); |
|---|
| 162 | |
|---|
| 163 | /*************************************************************************** |
|---|
| 164 | Summary: |
|---|
| 165 | Get an audio connector for use with downstream components |
|---|
| 166 | |
|---|
| 167 | Description: |
|---|
| 168 | Currently, SPDIF Input devices must always connect to a NEXUS_AudioDecoder downstream. |
|---|
| 169 | ***************************************************************************/ |
|---|
| 170 | NEXUS_AudioInput NEXUS_SpdifInput_GetConnector( |
|---|
| 171 | NEXUS_SpdifInputHandle handle |
|---|
| 172 | ); |
|---|
| 173 | |
|---|
| 174 | #ifdef __cplusplus |
|---|
| 175 | } |
|---|
| 176 | #endif |
|---|
| 177 | |
|---|
| 178 | #endif /* #ifndef NEXUS_SPDIF_INPUT_H__ */ |
|---|
| 179 | |
|---|