| 1 | /*************************************************************************** |
|---|
| 2 | * (c)2004-2010 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: bape_custom_processing.h $ |
|---|
| 39 | * $brcm_Revision: Hydra_Software_Devel/1 $ |
|---|
| 40 | * $brcm_Date: 5/11/11 7:04p $ |
|---|
| 41 | * |
|---|
| 42 | * API Description: |
|---|
| 43 | * API name: CustomProcessing |
|---|
| 44 | * Specific APIs related to custom audio post-processing |
|---|
| 45 | * |
|---|
| 46 | * Revision History: |
|---|
| 47 | * |
|---|
| 48 | * $brcm_Log: /magnum/portinginterface/ape/7422/bape_custom_processing.h $ |
|---|
| 49 | * |
|---|
| 50 | * Hydra_Software_Devel/1 5/11/11 7:04p jgarrett |
|---|
| 51 | * SW7422-410: Adding CustomProcessing |
|---|
| 52 | * |
|---|
| 53 | ***************************************************************************/ |
|---|
| 54 | |
|---|
| 55 | #ifndef BAPE_CUSTOM_PROCESSING_H__ |
|---|
| 56 | #define BAPE_CUSTOM_PROCESSING_H__ |
|---|
| 57 | |
|---|
| 58 | #include "bape.h" |
|---|
| 59 | |
|---|
| 60 | /*************************************************************************** |
|---|
| 61 | Summary: |
|---|
| 62 | CustomProcessing Handle |
|---|
| 63 | ***************************************************************************/ |
|---|
| 64 | typedef struct BAPE_CustomProcessing *BAPE_CustomProcessingHandle; |
|---|
| 65 | |
|---|
| 66 | /*************************************************************************** |
|---|
| 67 | Summary: |
|---|
| 68 | CustomProcessing Settings |
|---|
| 69 | ***************************************************************************/ |
|---|
| 70 | typedef struct BAPE_CustomProcessingSettings |
|---|
| 71 | { |
|---|
| 72 | BDSP_AudioProcessing algorithm; /* Processing algorithm to be used. Refer to BDSP for a list of algorithms. */ |
|---|
| 73 | size_t algorithmSettingsSize; /* Size of the settings structure in bytes */ |
|---|
| 74 | BAPE_MultichannelFormat outputFormat; /* Output PCM format of this processor */ |
|---|
| 75 | } BAPE_CustomProcessingSettings; |
|---|
| 76 | |
|---|
| 77 | /*************************************************************************** |
|---|
| 78 | Summary: |
|---|
| 79 | Get default settings for a CustomProcessing stage |
|---|
| 80 | ***************************************************************************/ |
|---|
| 81 | void BAPE_CustomProcessing_GetDefaultSettings( |
|---|
| 82 | BAPE_CustomProcessingSettings *pSettings /* [out] default settings */ |
|---|
| 83 | ); |
|---|
| 84 | |
|---|
| 85 | /*************************************************************************** |
|---|
| 86 | Summary: |
|---|
| 87 | Open a CustomProcessing stage |
|---|
| 88 | ***************************************************************************/ |
|---|
| 89 | BERR_Code BAPE_CustomProcessing_Create( |
|---|
| 90 | BAPE_Handle deviceHandle, |
|---|
| 91 | const BAPE_CustomProcessingSettings *pSettings, |
|---|
| 92 | BAPE_CustomProcessingHandle *pHandle /* [out] */ |
|---|
| 93 | ); |
|---|
| 94 | |
|---|
| 95 | /*************************************************************************** |
|---|
| 96 | Summary: |
|---|
| 97 | Close a CustomProcessing stage |
|---|
| 98 | |
|---|
| 99 | Description: |
|---|
| 100 | Input to the stage must be removed prior to closing. |
|---|
| 101 | ***************************************************************************/ |
|---|
| 102 | void BAPE_CustomProcessing_Destroy( |
|---|
| 103 | BAPE_CustomProcessingHandle handle |
|---|
| 104 | ); |
|---|
| 105 | |
|---|
| 106 | /*************************************************************************** |
|---|
| 107 | Summary: |
|---|
| 108 | Get Settings for a CustomProcessing stage |
|---|
| 109 | |
|---|
| 110 | Description: |
|---|
| 111 | This routine will retrieve the algorithm-independent settings. |
|---|
| 112 | |
|---|
| 113 | See Also: |
|---|
| 114 | BAPE_CustomProcessing_GetSettings |
|---|
| 115 | BAPE_CustomProcessing_GetAlgorithmSettings |
|---|
| 116 | BAPE_CustomProcessing_SetAlgorithmSettings |
|---|
| 117 | ***************************************************************************/ |
|---|
| 118 | void BAPE_CustomProcessing_GetSettings( |
|---|
| 119 | BAPE_CustomProcessingHandle handle, |
|---|
| 120 | BAPE_CustomProcessingSettings *pSettings /* [out] Settings */ |
|---|
| 121 | ); |
|---|
| 122 | |
|---|
| 123 | /*************************************************************************** |
|---|
| 124 | Summary: |
|---|
| 125 | Set Settings for a CustomProcessing stage |
|---|
| 126 | |
|---|
| 127 | Description: |
|---|
| 128 | This routine will update the algorithm-independent settings. |
|---|
| 129 | |
|---|
| 130 | See Also: |
|---|
| 131 | BAPE_CustomProcessing_GetSettings |
|---|
| 132 | BAPE_CustomProcessing_GetAlgorithmSettings |
|---|
| 133 | BAPE_CustomProcessing_SetAlgorithmSettings |
|---|
| 134 | ***************************************************************************/ |
|---|
| 135 | BERR_Code BAPE_CustomProcessing_SetSettings( |
|---|
| 136 | BAPE_CustomProcessingHandle handle, |
|---|
| 137 | const BAPE_CustomProcessingSettings *pSettings |
|---|
| 138 | ); |
|---|
| 139 | |
|---|
| 140 | /*************************************************************************** |
|---|
| 141 | Summary: |
|---|
| 142 | Get Algorithm Settings for a CustomProcessing stage |
|---|
| 143 | |
|---|
| 144 | Description: |
|---|
| 145 | This routine will update the algorithm-specific settings. |
|---|
| 146 | The size of the passed structure must not exceed |
|---|
| 147 | BAPE_CustomProcessingSettings.algorithmSettingsSize |
|---|
| 148 | |
|---|
| 149 | See Also: |
|---|
| 150 | BAPE_CustomProcessing_GetSettings |
|---|
| 151 | BAPE_CustomProcessing_SetSettings |
|---|
| 152 | BAPE_CustomProcessing_SetAlgorithmSettings |
|---|
| 153 | ***************************************************************************/ |
|---|
| 154 | void BAPE_CustomProcessing_GetAlgorithmSettings( |
|---|
| 155 | BAPE_CustomProcessingHandle handle, |
|---|
| 156 | void *pSettings, /* [out] Should be defined as the correct data type for this custom algorithm */ |
|---|
| 157 | size_t settingsSize /* Size of the settings structure in bytes */ |
|---|
| 158 | ); |
|---|
| 159 | |
|---|
| 160 | /*************************************************************************** |
|---|
| 161 | Summary: |
|---|
| 162 | Set Settings for a CustomProcessing stage |
|---|
| 163 | |
|---|
| 164 | Description: |
|---|
| 165 | This routine will update the algorithm-specific settings. |
|---|
| 166 | The size of the passed structure must not exceed |
|---|
| 167 | BAPE_CustomProcessingSettings.algorithmSettingsSize |
|---|
| 168 | |
|---|
| 169 | See Also: |
|---|
| 170 | BAPE_CustomProcessing_GetSettings |
|---|
| 171 | BAPE_CustomProcessing_SetSettings |
|---|
| 172 | BAPE_CustomProcessing_GetAlgorithmSettings |
|---|
| 173 | ***************************************************************************/ |
|---|
| 174 | BERR_Code BAPE_CustomProcessing_SetAlgorithmSettings( |
|---|
| 175 | BAPE_CustomProcessingHandle handle, |
|---|
| 176 | const void *pSettings, /* Should be defined as the correct data type for this custom algorithm */ |
|---|
| 177 | size_t settingsSize /* Size of the settings structure in bytes */ |
|---|
| 178 | ); |
|---|
| 179 | |
|---|
| 180 | /*************************************************************************** |
|---|
| 181 | Summary: |
|---|
| 182 | Get the audio connector for a CustomProcessing stage |
|---|
| 183 | ***************************************************************************/ |
|---|
| 184 | void BAPE_CustomProcessing_GetConnector( |
|---|
| 185 | BAPE_CustomProcessingHandle handle, |
|---|
| 186 | BAPE_Connector *pConnector |
|---|
| 187 | ); |
|---|
| 188 | |
|---|
| 189 | /*************************************************************************** |
|---|
| 190 | Summary: |
|---|
| 191 | Add an input to this processing stage |
|---|
| 192 | ***************************************************************************/ |
|---|
| 193 | BERR_Code BAPE_CustomProcessing_AddInput( |
|---|
| 194 | BAPE_CustomProcessingHandle handle, |
|---|
| 195 | BAPE_Connector input |
|---|
| 196 | ); |
|---|
| 197 | |
|---|
| 198 | /*************************************************************************** |
|---|
| 199 | Summary: |
|---|
| 200 | Remove an input from this processing stage |
|---|
| 201 | ***************************************************************************/ |
|---|
| 202 | BERR_Code BAPE_CustomProcessing_RemoveInput( |
|---|
| 203 | BAPE_CustomProcessingHandle handle, |
|---|
| 204 | BAPE_Connector input |
|---|
| 205 | ); |
|---|
| 206 | |
|---|
| 207 | /*************************************************************************** |
|---|
| 208 | Summary: |
|---|
| 209 | Remove all inputs from this processing stage |
|---|
| 210 | ***************************************************************************/ |
|---|
| 211 | BERR_Code BAPE_CustomProcessing_RemoveAllInputs( |
|---|
| 212 | BAPE_CustomProcessingHandle handle |
|---|
| 213 | ); |
|---|
| 214 | |
|---|
| 215 | /*************************************************************************** |
|---|
| 216 | Summary: |
|---|
| 217 | Get Status for a custom processing algorithm |
|---|
| 218 | ***************************************************************************/ |
|---|
| 219 | BERR_Code BAPE_CustomProcessing_GetAlgorithmStatus( |
|---|
| 220 | BAPE_CustomProcessingHandle handle, |
|---|
| 221 | void *pStatus, /* [out] Should be defined as the correct data type for this custom algorithm */ |
|---|
| 222 | size_t statusSize /* Size of the status structure in bytes */ |
|---|
| 223 | ); |
|---|
| 224 | |
|---|
| 225 | #endif /* #ifndef BAPE_CUSTOM_PROCESSING_H__ */ |
|---|
| 226 | |
|---|