| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2006-2011, Broadcom Corporation |
|---|
| 3 | * All Rights Reserved |
|---|
| 4 | * Confidential Property of Broadcom Corporation |
|---|
| 5 | * |
|---|
| 6 | * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | * |
|---|
| 10 | * $brcm_Workfile: bape_fmm_priv.h $ |
|---|
| 11 | * $brcm_Revision: Hydra_Software_Devel/15 $ |
|---|
| 12 | * $brcm_Date: 12/1/11 6:43p $ |
|---|
| 13 | * |
|---|
| 14 | * Module Description: FMM Interfaces |
|---|
| 15 | * |
|---|
| 16 | * Revision History: |
|---|
| 17 | * |
|---|
| 18 | * $brcm_Log: /magnum/portinginterface/ape/7422/bape_fmm_priv.h $ |
|---|
| 19 | * |
|---|
| 20 | * Hydra_Software_Devel/15 12/1/11 6:43p gskerl |
|---|
| 21 | * SW7429-18: Provide dummy definition of BAPE_SRC_P_IIRCoeff structure |
|---|
| 22 | * when BAPE_CHIP_P_MAX_IIR_FILTERS_PER_SRC isn't defined. |
|---|
| 23 | * |
|---|
| 24 | * Hydra_Software_Devel/14 11/14/11 3:24p gskerl |
|---|
| 25 | * SW7429-18: Merging 7429 changes back to main branch. |
|---|
| 26 | * |
|---|
| 27 | * Hydra_Software_Devel/SW7429-18/2 10/26/11 12:44p jgarrett |
|---|
| 28 | * SW7429-18: Merging latest changes from main branch |
|---|
| 29 | * |
|---|
| 30 | * Hydra_Software_Devel/SW7429-18/1 10/21/11 6:29p jgarrett |
|---|
| 31 | * SW7429-18: Initial compileable version for 7429 |
|---|
| 32 | * |
|---|
| 33 | * Hydra_Software_Devel/13 10/26/11 5:25p gskerl |
|---|
| 34 | * SW7231-129: Added prototypes for BAPE_MaiInput_P_PrepareForStandby() |
|---|
| 35 | * and BAPE_SpdifInput_P_PrepareForStandby() |
|---|
| 36 | * |
|---|
| 37 | * Hydra_Software_Devel/12 10/25/11 1:27p gskerl |
|---|
| 38 | * SW7231-129: Added prototype for BAPE_Nco_P_ResumeFromStandby() |
|---|
| 39 | * |
|---|
| 40 | * Hydra_Software_Devel/11 10/24/11 2:48p gskerl |
|---|
| 41 | * SW7231-129: Added power standby/resume support for PLLs, SPDIF inputs, |
|---|
| 42 | * and MAI inputs. |
|---|
| 43 | * |
|---|
| 44 | * Hydra_Software_Devel/10 10/6/11 2:19p gskerl |
|---|
| 45 | * SW7231-129: Added prototypes for BAPE_Xxxxx_ResumeFromStandby(). |
|---|
| 46 | * |
|---|
| 47 | * Hydra_Software_Devel/9 10/2/11 2:41p gskerl |
|---|
| 48 | * SW7231-129: Added prototypes for |
|---|
| 49 | * BAPE_AudioReturnChannel_P_ResumeFromStandb(). |
|---|
| 50 | * |
|---|
| 51 | * Hydra_Software_Devel/8 9/30/11 11:51a gskerl |
|---|
| 52 | * SW7231-129: Added prototypes for BAPE_DummyOutput_ResumeFromStandby(). |
|---|
| 53 | * |
|---|
| 54 | * Hydra_Software_Devel/7 9/30/11 11:16a gskerl |
|---|
| 55 | * SW7231-129: Added prototypes for BAPE_Xxx_ResumeFromStandby(). |
|---|
| 56 | * |
|---|
| 57 | * Hydra_Software_Devel/6 9/16/11 6:47p gskerl |
|---|
| 58 | * SW7231-129: Refactored to put hardware and software initialization into |
|---|
| 59 | * separate functions. |
|---|
| 60 | * |
|---|
| 61 | * Hydra_Software_Devel/5 9/2/11 3:53p sgadara |
|---|
| 62 | * SWDTV-6627: [35233] Refine the SRC coefficient memory allocation |
|---|
| 63 | * |
|---|
| 64 | * Hydra_Software_Devel/4 8/26/11 9:50p sgadara |
|---|
| 65 | * SWDTV-6627: [35233] Add Equalizer support |
|---|
| 66 | * |
|---|
| 67 | * Hydra_Software_Devel/3 5/20/11 7:15p gskerl |
|---|
| 68 | * SW7231-128: Added DAC power control |
|---|
| 69 | * |
|---|
| 70 | * Hydra_Software_Devel/2 4/16/11 12:15p jgarrett |
|---|
| 71 | * SW7425-371: Removing tab characters |
|---|
| 72 | * |
|---|
| 73 | * Hydra_Software_Devel/1 4/6/11 1:24a jgarrett |
|---|
| 74 | * SW35330-35: Merge to main branch |
|---|
| 75 | * |
|---|
| 76 | * Hydra_Software_Devel/SW35330-35/1 4/5/11 12:50p jgarrett |
|---|
| 77 | * SW35330-35: FMM Abstraction refactoring to support DTV |
|---|
| 78 | * |
|---|
| 79 | ***************************************************************************/ |
|---|
| 80 | |
|---|
| 81 | #ifndef BAPE_FMM_PRIV_H_ |
|---|
| 82 | #define BAPE_FMM_PRIV_H_ |
|---|
| 83 | |
|---|
| 84 | #include "bstd.h" |
|---|
| 85 | #include "bkni.h" |
|---|
| 86 | #include "bape.h" |
|---|
| 87 | #include "blst_slist.h" |
|---|
| 88 | #include "bape_chip_priv.h" |
|---|
| 89 | |
|---|
| 90 | |
|---|
| 91 | /*************************************************************************** |
|---|
| 92 | Summary: |
|---|
| 93 | Prepare the MAI (HDMI) inputs to go into standby |
|---|
| 94 | ***************************************************************************/ |
|---|
| 95 | BERR_Code BAPE_MaiInput_P_PrepareForStandby( |
|---|
| 96 | BAPE_Handle bapeHandle |
|---|
| 97 | ); |
|---|
| 98 | |
|---|
| 99 | /*************************************************************************** |
|---|
| 100 | Summary: |
|---|
| 101 | Prepare the SPDIF inputs to go into standby |
|---|
| 102 | ***************************************************************************/ |
|---|
| 103 | BERR_Code BAPE_SpdifInput_P_PrepareForStandby( |
|---|
| 104 | BAPE_Handle bapeHandle |
|---|
| 105 | ); |
|---|
| 106 | |
|---|
| 107 | |
|---|
| 108 | /*************************************************************************** |
|---|
| 109 | Summary: |
|---|
| 110 | Restore the NCOs' state when resuming from standby |
|---|
| 111 | ***************************************************************************/ |
|---|
| 112 | BERR_Code BAPE_Nco_P_ResumeFromStandby( |
|---|
| 113 | BAPE_Handle bapeHandle |
|---|
| 114 | ); |
|---|
| 115 | |
|---|
| 116 | /*************************************************************************** |
|---|
| 117 | Summary: |
|---|
| 118 | Restore the PLLs' state when resuming from standby |
|---|
| 119 | ***************************************************************************/ |
|---|
| 120 | BERR_Code BAPE_Pll_P_ResumeFromStandby( |
|---|
| 121 | BAPE_Handle bapeHandle |
|---|
| 122 | ); |
|---|
| 123 | |
|---|
| 124 | /*************************************************************************** |
|---|
| 125 | Summary: |
|---|
| 126 | Restore the LoopbackGroups' state when resuming from standby |
|---|
| 127 | ***************************************************************************/ |
|---|
| 128 | BERR_Code BAPE_LoopbackGroup_P_ResumeFromStandby( |
|---|
| 129 | BAPE_Handle bapeHandle |
|---|
| 130 | ); |
|---|
| 131 | |
|---|
| 132 | /*************************************************************************** |
|---|
| 133 | Summary: |
|---|
| 134 | Restore the Dummysinks' state when resuming from standby |
|---|
| 135 | ***************************************************************************/ |
|---|
| 136 | BERR_Code BAPE_DummysinkGroup_P_ResumeFromStandby( |
|---|
| 137 | BAPE_Handle bapeHandle |
|---|
| 138 | ); |
|---|
| 139 | |
|---|
| 140 | /*************************************************************************** |
|---|
| 141 | Summary: |
|---|
| 142 | Restore the AudioReturnChannels' state when resuming from standby |
|---|
| 143 | ***************************************************************************/ |
|---|
| 144 | BERR_Code BAPE_AudioReturnChannel_P_ResumeFromStandby( |
|---|
| 145 | BAPE_Handle bapeHandle |
|---|
| 146 | ); |
|---|
| 147 | |
|---|
| 148 | /*************************************************************************** |
|---|
| 149 | Summary: |
|---|
| 150 | Restore the DACs' state when resuming from standby |
|---|
| 151 | ***************************************************************************/ |
|---|
| 152 | BERR_Code BAPE_Dac_P_ResumeFromStandby( |
|---|
| 153 | BAPE_Handle bapeHandle |
|---|
| 154 | ); |
|---|
| 155 | |
|---|
| 156 | /*************************************************************************** |
|---|
| 157 | Summary: |
|---|
| 158 | Restore the DummyOutputs' state when resuming from standby |
|---|
| 159 | ***************************************************************************/ |
|---|
| 160 | BERR_Code BAPE_DummyOutput_P_ResumeFromStandby( |
|---|
| 161 | BAPE_Handle bapeHandle |
|---|
| 162 | ); |
|---|
| 163 | |
|---|
| 164 | /*************************************************************************** |
|---|
| 165 | Summary: |
|---|
| 166 | Restore the I2sMulti outputs' state when resuming from standby |
|---|
| 167 | ***************************************************************************/ |
|---|
| 168 | BERR_Code BAPE_I2sMultiOutput_P_ResumeFromStandby( |
|---|
| 169 | BAPE_Handle bapeHandle |
|---|
| 170 | ); |
|---|
| 171 | |
|---|
| 172 | /*************************************************************************** |
|---|
| 173 | Summary: |
|---|
| 174 | Restore the I2S outputs' state when resuming from standby |
|---|
| 175 | ***************************************************************************/ |
|---|
| 176 | BERR_Code BAPE_I2sOutput_P_ResumeFromStandby( |
|---|
| 177 | BAPE_Handle bapeHandle |
|---|
| 178 | ); |
|---|
| 179 | |
|---|
| 180 | /*************************************************************************** |
|---|
| 181 | Summary: |
|---|
| 182 | Restore the MAI (HDMI) outputs' state when resuming from standby |
|---|
| 183 | ***************************************************************************/ |
|---|
| 184 | BERR_Code BAPE_MaiOutput_P_ResumeFromStandby( |
|---|
| 185 | BAPE_Handle bapeHandle |
|---|
| 186 | ); |
|---|
| 187 | |
|---|
| 188 | /*************************************************************************** |
|---|
| 189 | Summary: |
|---|
| 190 | Restore the RF modulators' state when resuming from standby |
|---|
| 191 | ***************************************************************************/ |
|---|
| 192 | BERR_Code BAPE_RfMod_P_ResumeFromStandby( |
|---|
| 193 | BAPE_Handle bapeHandle |
|---|
| 194 | ); |
|---|
| 195 | |
|---|
| 196 | /*************************************************************************** |
|---|
| 197 | Summary: |
|---|
| 198 | Restore the SPDIF outputs' state when resuming from standby |
|---|
| 199 | ***************************************************************************/ |
|---|
| 200 | BERR_Code BAPE_SpdifOutput_P_ResumeFromStandby( |
|---|
| 201 | BAPE_Handle bapeHandle |
|---|
| 202 | ); |
|---|
| 203 | |
|---|
| 204 | /*************************************************************************** |
|---|
| 205 | Summary: |
|---|
| 206 | Restore the MAI (HDMI) inputs' state when resuming from standby |
|---|
| 207 | ***************************************************************************/ |
|---|
| 208 | BERR_Code BAPE_MaiInput_P_ResumeFromStandby( |
|---|
| 209 | BAPE_Handle bapeHandle |
|---|
| 210 | ); |
|---|
| 211 | |
|---|
| 212 | /*************************************************************************** |
|---|
| 213 | Summary: |
|---|
| 214 | Restore the SPDIF inputs' state when resuming from standby |
|---|
| 215 | ***************************************************************************/ |
|---|
| 216 | BERR_Code BAPE_SpdifInput_P_ResumeFromStandby( |
|---|
| 217 | BAPE_Handle bapeHandle |
|---|
| 218 | ); |
|---|
| 219 | |
|---|
| 220 | /*************************************************************************** |
|---|
| 221 | Summary: |
|---|
| 222 | Initialize the BF block |
|---|
| 223 | ***************************************************************************/ |
|---|
| 224 | BERR_Code BAPE_P_InitDacHw( |
|---|
| 225 | BAPE_Handle handle |
|---|
| 226 | ); |
|---|
| 227 | |
|---|
| 228 | /*************************************************************************** |
|---|
| 229 | Summary: |
|---|
| 230 | Initialize the BF block data structures |
|---|
| 231 | ***************************************************************************/ |
|---|
| 232 | BERR_Code BAPE_P_InitBfSw( |
|---|
| 233 | BAPE_Handle handle |
|---|
| 234 | ); |
|---|
| 235 | |
|---|
| 236 | /*************************************************************************** |
|---|
| 237 | Summary: |
|---|
| 238 | Initialize the BF block hardware |
|---|
| 239 | ***************************************************************************/ |
|---|
| 240 | BERR_Code BAPE_P_InitBfHw( |
|---|
| 241 | BAPE_Handle handle |
|---|
| 242 | ); |
|---|
| 243 | |
|---|
| 244 | /*************************************************************************** |
|---|
| 245 | Summary: |
|---|
| 246 | Un-Initialize the BF block |
|---|
| 247 | ***************************************************************************/ |
|---|
| 248 | void BAPE_P_UninitBfSw( |
|---|
| 249 | BAPE_Handle handle |
|---|
| 250 | ); |
|---|
| 251 | |
|---|
| 252 | /*************************************************************************** |
|---|
| 253 | Summary: |
|---|
| 254 | Initialize the SRC block data structures |
|---|
| 255 | ***************************************************************************/ |
|---|
| 256 | BERR_Code BAPE_P_InitSrcSw( |
|---|
| 257 | BAPE_Handle handle |
|---|
| 258 | ); |
|---|
| 259 | |
|---|
| 260 | /*************************************************************************** |
|---|
| 261 | Summary: |
|---|
| 262 | Initialize the SRC block hardware |
|---|
| 263 | ***************************************************************************/ |
|---|
| 264 | BERR_Code BAPE_P_InitSrcHw( |
|---|
| 265 | BAPE_Handle handle |
|---|
| 266 | ); |
|---|
| 267 | |
|---|
| 268 | /*************************************************************************** |
|---|
| 269 | Summary: |
|---|
| 270 | Un-Initialize the SRC block |
|---|
| 271 | ***************************************************************************/ |
|---|
| 272 | void BAPE_P_UninitSrcSw( |
|---|
| 273 | BAPE_Handle handle |
|---|
| 274 | ); |
|---|
| 275 | |
|---|
| 276 | /*************************************************************************** |
|---|
| 277 | Summary: |
|---|
| 278 | Initialize the DP block data structures |
|---|
| 279 | ***************************************************************************/ |
|---|
| 280 | BERR_Code BAPE_P_InitDpSw( |
|---|
| 281 | BAPE_Handle handle |
|---|
| 282 | ); |
|---|
| 283 | |
|---|
| 284 | /*************************************************************************** |
|---|
| 285 | Summary: |
|---|
| 286 | Initialize the DP block hardware |
|---|
| 287 | ***************************************************************************/ |
|---|
| 288 | BERR_Code BAPE_P_InitDpHw( |
|---|
| 289 | BAPE_Handle handle |
|---|
| 290 | ); |
|---|
| 291 | |
|---|
| 292 | /*************************************************************************** |
|---|
| 293 | Summary: |
|---|
| 294 | Un-Initialize the DP block |
|---|
| 295 | ***************************************************************************/ |
|---|
| 296 | void BAPE_P_UninitDpSw( |
|---|
| 297 | BAPE_Handle handle |
|---|
| 298 | ); |
|---|
| 299 | |
|---|
| 300 | /*************************************************************************** |
|---|
| 301 | Summary: |
|---|
| 302 | Initialize the IOP block data structures |
|---|
| 303 | ***************************************************************************/ |
|---|
| 304 | BERR_Code BAPE_P_InitIopSw( |
|---|
| 305 | BAPE_Handle handle |
|---|
| 306 | ); |
|---|
| 307 | |
|---|
| 308 | /*************************************************************************** |
|---|
| 309 | Summary: |
|---|
| 310 | Initialize the IOP block hardware |
|---|
| 311 | ***************************************************************************/ |
|---|
| 312 | BERR_Code BAPE_P_InitIopHw( |
|---|
| 313 | BAPE_Handle handle |
|---|
| 314 | ); |
|---|
| 315 | |
|---|
| 316 | /*************************************************************************** |
|---|
| 317 | Summary: |
|---|
| 318 | Un-Initialize the IOP block |
|---|
| 319 | ***************************************************************************/ |
|---|
| 320 | void BAPE_P_UninitIopSw( |
|---|
| 321 | BAPE_Handle handle |
|---|
| 322 | ); |
|---|
| 323 | |
|---|
| 324 | /*************************************************************************** |
|---|
| 325 | Summary: |
|---|
| 326 | Source FIFO Group Create Settings |
|---|
| 327 | ***************************************************************************/ |
|---|
| 328 | typedef struct BAPE_SfifoGroupCreateSettings |
|---|
| 329 | { |
|---|
| 330 | unsigned numChannelPairs; /* Number of channel pairs */ |
|---|
| 331 | bool ppmCorrection; /* If true, adaptive rate control resources will be allocated */ |
|---|
| 332 | } BAPE_SfifoGroupCreateSettings; |
|---|
| 333 | |
|---|
| 334 | /*************************************************************************** |
|---|
| 335 | Summary: |
|---|
| 336 | Get default SFIFO Group Create Settings |
|---|
| 337 | ***************************************************************************/ |
|---|
| 338 | void BAPE_SfifoGroup_P_GetDefaultCreateSettings( |
|---|
| 339 | BAPE_SfifoGroupCreateSettings *pSettings /* [out] */ |
|---|
| 340 | ); |
|---|
| 341 | |
|---|
| 342 | /*************************************************************************** |
|---|
| 343 | Summary: |
|---|
| 344 | Create SFIFO Group |
|---|
| 345 | ***************************************************************************/ |
|---|
| 346 | BERR_Code BAPE_SfifoGroup_P_Create( |
|---|
| 347 | BAPE_Handle deviceHandle, |
|---|
| 348 | const BAPE_SfifoGroupCreateSettings *pSettings, |
|---|
| 349 | BAPE_SfifoGroupHandle *pHandle /* [out] */ |
|---|
| 350 | ); |
|---|
| 351 | |
|---|
| 352 | /*************************************************************************** |
|---|
| 353 | Summary: |
|---|
| 354 | Destroy SFIFO Group |
|---|
| 355 | ***************************************************************************/ |
|---|
| 356 | void BAPE_SfifoGroup_P_Destroy( |
|---|
| 357 | BAPE_SfifoGroupHandle handle |
|---|
| 358 | ); |
|---|
| 359 | |
|---|
| 360 | /*************************************************************************** |
|---|
| 361 | Summary: |
|---|
| 362 | Source FIFO Settings |
|---|
| 363 | ***************************************************************************/ |
|---|
| 364 | typedef struct BAPE_SfifoGroupSettings |
|---|
| 365 | { |
|---|
| 366 | bool bypassMemory; /* If true, data will be fed directly from a linked DFIFO */ |
|---|
| 367 | bool highPriority; /* If sample rate is >= 96000 set this to true. */ |
|---|
| 368 | bool interleaveData; /* If true, data will be interleaved into a single buffer per channel pair */ |
|---|
| 369 | bool stereoData; /* If true, the data is stereo. If false, the data is mono. */ |
|---|
| 370 | bool signedData; /* If true, data is signed. */ |
|---|
| 371 | bool loopAround; /* If true, the SFIFO will not pause when empty */ |
|---|
| 372 | bool wrpointEnabled; /* If true, the start WRPOINT register will enable data flow once the write pointer reaches that value */ |
|---|
| 373 | bool sampleRepeatEnabled; /* If true, samples will be repeated on underflow (set to false for compressed data) */ |
|---|
| 374 | bool reverseEndian; /* If true, reverse sample endian-ness */ |
|---|
| 375 | BAPE_SfifoGroupHandle master; /* If set, this SFIFO group will be setup as a slave to the master provided. */ |
|---|
| 376 | unsigned dataWidth; /* Data width in bits. */ |
|---|
| 377 | unsigned defaultSampleRate; /* Expected sample rate - can be overridden later by BAPE_SfifoGroup_P_SetSampleRate_isr */ |
|---|
| 378 | struct |
|---|
| 379 | { |
|---|
| 380 | uint32_t base; /* Base offset of the buffer */ |
|---|
| 381 | uint32_t length; /* Length of the buffer in bytes */ |
|---|
| 382 | uint32_t writeOffset; /* Initial write pointer value will be base+writeOffset */ |
|---|
| 383 | uint32_t watermark; /* Watermark interrupt threshold in bytes */ |
|---|
| 384 | uint32_t wrpoint; /* Start write point (ignored unless wrpointEnabled is true) */ |
|---|
| 385 | } bufferInfo[BAPE_Channel_eMax]; |
|---|
| 386 | } BAPE_SfifoGroupSettings; |
|---|
| 387 | |
|---|
| 388 | /*************************************************************************** |
|---|
| 389 | Summary: |
|---|
| 390 | Get Source FIFO Settings |
|---|
| 391 | ***************************************************************************/ |
|---|
| 392 | void BAPE_SfifoGroup_P_GetSettings( |
|---|
| 393 | BAPE_SfifoGroupHandle handle, |
|---|
| 394 | BAPE_SfifoGroupSettings *pSettings /* [out] */ |
|---|
| 395 | ); |
|---|
| 396 | |
|---|
| 397 | /*************************************************************************** |
|---|
| 398 | Summary: |
|---|
| 399 | Set Source FIFO Settings |
|---|
| 400 | ***************************************************************************/ |
|---|
| 401 | BERR_Code BAPE_SfifoGroup_P_SetSettings( |
|---|
| 402 | BAPE_SfifoGroupHandle handle, |
|---|
| 403 | const BAPE_SfifoGroupSettings *pSettings |
|---|
| 404 | ); |
|---|
| 405 | |
|---|
| 406 | /*************************************************************************** |
|---|
| 407 | Summary: |
|---|
| 408 | Start SFIFO group |
|---|
| 409 | ***************************************************************************/ |
|---|
| 410 | BERR_Code BAPE_SfifoGroup_P_Start( |
|---|
| 411 | BAPE_SfifoGroupHandle handle, |
|---|
| 412 | bool enableOnly /* If true, a separate call to BAPE_SfifoGroup_P_Run_isr is required to |
|---|
| 413 | start data flow. If false, data flow will start immediately. */ |
|---|
| 414 | ); |
|---|
| 415 | |
|---|
| 416 | /*************************************************************************** |
|---|
| 417 | Summary: |
|---|
| 418 | Stop SFIFO group |
|---|
| 419 | ***************************************************************************/ |
|---|
| 420 | void BAPE_SfifoGroup_P_Stop( |
|---|
| 421 | BAPE_SfifoGroupHandle handle |
|---|
| 422 | ); |
|---|
| 423 | |
|---|
| 424 | /*************************************************************************** |
|---|
| 425 | Summary: |
|---|
| 426 | Start SFIFO group data flow |
|---|
| 427 | |
|---|
| 428 | Description: |
|---|
| 429 | This call is only required if enableOnly was set to true in BAPE_SfifoGroup_P_Start |
|---|
| 430 | or if BAPE_SfifoGroup_P_Halt_isr was previously called. |
|---|
| 431 | ***************************************************************************/ |
|---|
| 432 | void BAPE_SfifoGroup_P_Run_isr( |
|---|
| 433 | BAPE_SfifoGroupHandle handle |
|---|
| 434 | ); |
|---|
| 435 | |
|---|
| 436 | /*************************************************************************** |
|---|
| 437 | Summary: |
|---|
| 438 | Stop SFIFO group data flow |
|---|
| 439 | |
|---|
| 440 | Description: |
|---|
| 441 | This call allows data flow to be stopped from an interrupt if required. |
|---|
| 442 | ***************************************************************************/ |
|---|
| 443 | void BAPE_SfifoGroup_P_Halt_isr( |
|---|
| 444 | BAPE_SfifoGroupHandle handle |
|---|
| 445 | ); |
|---|
| 446 | |
|---|
| 447 | /*************************************************************************** |
|---|
| 448 | Summary: |
|---|
| 449 | Update SFIFO Group sample rate |
|---|
| 450 | |
|---|
| 451 | Description: |
|---|
| 452 | This will reprogram the adaptive rate controllers for a new sample rate |
|---|
| 453 | if required. |
|---|
| 454 | ***************************************************************************/ |
|---|
| 455 | void BAPE_SfifoGroup_P_SetSampleRate_isr( |
|---|
| 456 | BAPE_SfifoGroupHandle handle, |
|---|
| 457 | unsigned sampleRate |
|---|
| 458 | ); |
|---|
| 459 | |
|---|
| 460 | /*************************************************************************** |
|---|
| 461 | Summary: |
|---|
| 462 | Get FCI Connection IDs for this group |
|---|
| 463 | ***************************************************************************/ |
|---|
| 464 | void BAPE_SfifoGroup_P_GetOutputFciIds( |
|---|
| 465 | BAPE_SfifoGroupHandle handle, |
|---|
| 466 | BAPE_FciIdGroup *pFciGroup /* [out] */ |
|---|
| 467 | ); |
|---|
| 468 | |
|---|
| 469 | /*************************************************************************** |
|---|
| 470 | Summary: |
|---|
| 471 | Get Source FIFO Buffers |
|---|
| 472 | ***************************************************************************/ |
|---|
| 473 | BERR_Code BAPE_SfifoGroup_P_GetBuffer( |
|---|
| 474 | BAPE_SfifoGroupHandle handle, |
|---|
| 475 | BAPE_BufferDescriptor *pBuffers /* [out] */ |
|---|
| 476 | ); |
|---|
| 477 | |
|---|
| 478 | /*************************************************************************** |
|---|
| 479 | Summary: |
|---|
| 480 | Commit data to Source FIFO Buffers |
|---|
| 481 | ***************************************************************************/ |
|---|
| 482 | BERR_Code BAPE_SfifoGroup_P_CommitData( |
|---|
| 483 | BAPE_SfifoGroupHandle handle, |
|---|
| 484 | unsigned numBytes /* Number of bytes written into the buffer */ |
|---|
| 485 | ); |
|---|
| 486 | |
|---|
| 487 | /*************************************************************************** |
|---|
| 488 | Summary: |
|---|
| 489 | Flush Source FIFO Buffers |
|---|
| 490 | ***************************************************************************/ |
|---|
| 491 | BERR_Code BAPE_SfifoGroup_P_Flush( |
|---|
| 492 | BAPE_SfifoGroupHandle handle |
|---|
| 493 | ); |
|---|
| 494 | |
|---|
| 495 | /*************************************************************************** |
|---|
| 496 | Summary: |
|---|
| 497 | Get num queued bytes |
|---|
| 498 | ***************************************************************************/ |
|---|
| 499 | BERR_Code BAPE_SfifoGroup_P_GetQueuedBytes( |
|---|
| 500 | BAPE_SfifoGroupHandle handle, |
|---|
| 501 | unsigned *pQueuedBytes |
|---|
| 502 | ); |
|---|
| 503 | |
|---|
| 504 | /*************************************************************************** |
|---|
| 505 | Summary: |
|---|
| 506 | Enable/Disable a source channel freemark interrupt |
|---|
| 507 | ***************************************************************************/ |
|---|
| 508 | BERR_Code BAPE_SfifoGroup_P_SetFreemarkInterrupt( |
|---|
| 509 | BAPE_SfifoGroupHandle handle, |
|---|
| 510 | BINT_CallbackFunc callback_isr, |
|---|
| 511 | void *pParam1, |
|---|
| 512 | int param2 |
|---|
| 513 | ); |
|---|
| 514 | |
|---|
| 515 | /*************************************************************************** |
|---|
| 516 | Summary: |
|---|
| 517 | Re-Arm the SFIFO Group Freemark Interrupt |
|---|
| 518 | ***************************************************************************/ |
|---|
| 519 | void BAPE_SfifoGroup_P_RearmFreemarkInterrupt( |
|---|
| 520 | BAPE_SfifoGroupHandle handle |
|---|
| 521 | ); |
|---|
| 522 | |
|---|
| 523 | /*************************************************************************** |
|---|
| 524 | Summary: |
|---|
| 525 | Get Hardware Index for a particular SFIFO |
|---|
| 526 | |
|---|
| 527 | Description: |
|---|
| 528 | This function should be avoided unless absolutely necessary |
|---|
| 529 | (e.g. setting up DSP <-> FMM Linkage) |
|---|
| 530 | ***************************************************************************/ |
|---|
| 531 | uint32_t BAPE_SfifoGroup_P_GetHwIndex( |
|---|
| 532 | BAPE_SfifoGroupHandle handle, |
|---|
| 533 | BAPE_ChannelPair channelPair |
|---|
| 534 | ); |
|---|
| 535 | |
|---|
| 536 | /*************************************************************************** |
|---|
| 537 | Summary: |
|---|
| 538 | Get Hardware Index for a particular SFIFO's Adaptive Rate Controller |
|---|
| 539 | |
|---|
| 540 | Description: |
|---|
| 541 | This function should be avoided unless absolutely necessary |
|---|
| 542 | (e.g. setting up DSP <-> FMM Linkage) |
|---|
| 543 | ***************************************************************************/ |
|---|
| 544 | uint32_t BAPE_SfifoGroup_P_GetAdaptRateHwIndex( |
|---|
| 545 | BAPE_SfifoGroupHandle handle, |
|---|
| 546 | BAPE_ChannelPair channelPair |
|---|
| 547 | ); |
|---|
| 548 | |
|---|
| 549 | /*************************************************************************** |
|---|
| 550 | Summary: |
|---|
| 551 | Destination FIFO Group Create Settings |
|---|
| 552 | ***************************************************************************/ |
|---|
| 553 | typedef struct BAPE_DfifoGroupCreateSettings |
|---|
| 554 | { |
|---|
| 555 | unsigned numChannelPairs; /* Number of channel pairs */ |
|---|
| 556 | } BAPE_DfifoGroupCreateSettings; |
|---|
| 557 | |
|---|
| 558 | /*************************************************************************** |
|---|
| 559 | Summary: |
|---|
| 560 | Get default DFIFO Group Create Settings |
|---|
| 561 | ***************************************************************************/ |
|---|
| 562 | void BAPE_DfifoGroup_P_GetDefaultCreateSettings( |
|---|
| 563 | BAPE_DfifoGroupCreateSettings *pSettings /* [out] */ |
|---|
| 564 | ); |
|---|
| 565 | |
|---|
| 566 | /*************************************************************************** |
|---|
| 567 | Summary: |
|---|
| 568 | Create DFIFO Group |
|---|
| 569 | ***************************************************************************/ |
|---|
| 570 | BERR_Code BAPE_DfifoGroup_P_Create( |
|---|
| 571 | BAPE_Handle deviceHandle, |
|---|
| 572 | const BAPE_DfifoGroupCreateSettings *pSettings, |
|---|
| 573 | BAPE_DfifoGroupHandle *pHandle /* [out] */ |
|---|
| 574 | ); |
|---|
| 575 | |
|---|
| 576 | /*************************************************************************** |
|---|
| 577 | Summary: |
|---|
| 578 | Destroy DFIFO Group |
|---|
| 579 | ***************************************************************************/ |
|---|
| 580 | void BAPE_DfifoGroup_P_Destroy( |
|---|
| 581 | BAPE_DfifoGroupHandle handle |
|---|
| 582 | ); |
|---|
| 583 | |
|---|
| 584 | /*************************************************************************** |
|---|
| 585 | Summary: |
|---|
| 586 | DFIFO Settings |
|---|
| 587 | ***************************************************************************/ |
|---|
| 588 | typedef struct BAPE_DfifoGroupSettings |
|---|
| 589 | { |
|---|
| 590 | BAPE_FciIdGroup input; /* Input FCI ID */ |
|---|
| 591 | BAPE_SfifoGroupHandle linkedSfifo; /* If not NULL, linked source FIFO */ |
|---|
| 592 | bool bypassMemory; /* If true and a linked SFIFO is provided, bypass memory and directly connect the FIFOs */ |
|---|
| 593 | bool highPriority; /* If sample rate is >= 96000 set this to true. */ |
|---|
| 594 | bool interleaveData; /* If true, data will be interleaved into a single buffer per channel pair */ |
|---|
| 595 | unsigned dataWidth; /* Data width in bits. 32 is supported on all platforms, 16 if BAPE_CHIP_DFIFO_SUPPORTS_16BIT_CAPTURE is defined to 1 */ |
|---|
| 596 | struct |
|---|
| 597 | { |
|---|
| 598 | uint32_t base; /* Base offset of the buffer */ |
|---|
| 599 | uint32_t length; /* Length of the buffer in bytes */ |
|---|
| 600 | uint32_t watermark; /* Watermark interrupt threshold in bytes */ |
|---|
| 601 | } bufferInfo[BAPE_Channel_eMax]; |
|---|
| 602 | } BAPE_DfifoGroupSettings; |
|---|
| 603 | |
|---|
| 604 | /*************************************************************************** |
|---|
| 605 | Summary: |
|---|
| 606 | Get Destination FIFO Settings |
|---|
| 607 | ***************************************************************************/ |
|---|
| 608 | void BAPE_DfifoGroup_P_GetSettings( |
|---|
| 609 | BAPE_DfifoGroupHandle handle, |
|---|
| 610 | BAPE_DfifoGroupSettings *pSettings /* [out] */ |
|---|
| 611 | ); |
|---|
| 612 | |
|---|
| 613 | /*************************************************************************** |
|---|
| 614 | Summary: |
|---|
| 615 | Set Destination FIFO Settings |
|---|
| 616 | ***************************************************************************/ |
|---|
| 617 | BERR_Code BAPE_DfifoGroup_P_SetSettings( |
|---|
| 618 | BAPE_DfifoGroupHandle handle, |
|---|
| 619 | const BAPE_DfifoGroupSettings *pSettings |
|---|
| 620 | ); |
|---|
| 621 | |
|---|
| 622 | /*************************************************************************** |
|---|
| 623 | Summary: |
|---|
| 624 | Start DFIFO group |
|---|
| 625 | ***************************************************************************/ |
|---|
| 626 | BERR_Code BAPE_DfifoGroup_P_Start( |
|---|
| 627 | BAPE_DfifoGroupHandle handle, |
|---|
| 628 | bool enableOnly /* If true, a separate call to BAPE_DfifoGroup_P_Run_isr is required to |
|---|
| 629 | start data flow. If false, data flow will start immediately. */ |
|---|
| 630 | ); |
|---|
| 631 | |
|---|
| 632 | /*************************************************************************** |
|---|
| 633 | Summary: |
|---|
| 634 | Stop DFIFO group |
|---|
| 635 | ***************************************************************************/ |
|---|
| 636 | void BAPE_DfifoGroup_P_Stop( |
|---|
| 637 | BAPE_DfifoGroupHandle handle |
|---|
| 638 | ); |
|---|
| 639 | |
|---|
| 640 | /*************************************************************************** |
|---|
| 641 | Summary: |
|---|
| 642 | Start DFIFO group data flow |
|---|
| 643 | |
|---|
| 644 | Description: |
|---|
| 645 | This call is only required if enableOnly was set to true in BAPE_DfifoGroup_P_Start |
|---|
| 646 | or if BAPE_DfifoGroup_P_Halt_isr was previously called. |
|---|
| 647 | ***************************************************************************/ |
|---|
| 648 | void BAPE_DfifoGroup_P_Run_isr( |
|---|
| 649 | BAPE_DfifoGroupHandle handle |
|---|
| 650 | ); |
|---|
| 651 | |
|---|
| 652 | /*************************************************************************** |
|---|
| 653 | Summary: |
|---|
| 654 | Stop DFIFO group data flow |
|---|
| 655 | |
|---|
| 656 | Description: |
|---|
| 657 | This call allows data flow to be stopped from an interrupt if required. |
|---|
| 658 | ***************************************************************************/ |
|---|
| 659 | void BAPE_DfifoGroup_P_Halt_isr( |
|---|
| 660 | BAPE_DfifoGroupHandle handle |
|---|
| 661 | ); |
|---|
| 662 | |
|---|
| 663 | /*************************************************************************** |
|---|
| 664 | Summary: |
|---|
| 665 | Get DFIFO Buffers |
|---|
| 666 | ***************************************************************************/ |
|---|
| 667 | BERR_Code BAPE_DfifoGroup_P_GetBuffer_isr( |
|---|
| 668 | BAPE_DfifoGroupHandle handle, |
|---|
| 669 | BAPE_BufferDescriptor *pBuffers /* [out] */ |
|---|
| 670 | ); |
|---|
| 671 | |
|---|
| 672 | /*************************************************************************** |
|---|
| 673 | Summary: |
|---|
| 674 | Commit data to DFIFO Buffers |
|---|
| 675 | ***************************************************************************/ |
|---|
| 676 | BERR_Code BAPE_DfifoGroup_P_CommitData_isr( |
|---|
| 677 | BAPE_DfifoGroupHandle handle, |
|---|
| 678 | unsigned numBytes /* Number of bytes written into the buffer */ |
|---|
| 679 | ); |
|---|
| 680 | |
|---|
| 681 | /*************************************************************************** |
|---|
| 682 | Summary: |
|---|
| 683 | Flush DFIFO Buffers |
|---|
| 684 | ***************************************************************************/ |
|---|
| 685 | BERR_Code BAPE_DfifoGroup_P_Flush_isr( |
|---|
| 686 | BAPE_DfifoGroupHandle handle |
|---|
| 687 | ); |
|---|
| 688 | |
|---|
| 689 | /*************************************************************************** |
|---|
| 690 | Summary: |
|---|
| 691 | Enable/Disable a DFIFO Fullmark Interrupt |
|---|
| 692 | ***************************************************************************/ |
|---|
| 693 | BERR_Code BAPE_DfifoGroup_P_SetFullmarkInterrupt( |
|---|
| 694 | BAPE_DfifoGroupHandle handle, |
|---|
| 695 | BINT_CallbackFunc callback_isr, |
|---|
| 696 | void *pParam1, |
|---|
| 697 | int param2 |
|---|
| 698 | ); |
|---|
| 699 | |
|---|
| 700 | /*************************************************************************** |
|---|
| 701 | Summary: |
|---|
| 702 | Re-Arm the Dfifo Group Fullmark Interrupt |
|---|
| 703 | ***************************************************************************/ |
|---|
| 704 | void BAPE_DfifoGroup_P_RearmFullmarkInterrupt_isr( |
|---|
| 705 | BAPE_DfifoGroupHandle handle |
|---|
| 706 | ); |
|---|
| 707 | |
|---|
| 708 | /*************************************************************************** |
|---|
| 709 | Summary: |
|---|
| 710 | Enable/Disable a DFIFO Overflow Interrupt |
|---|
| 711 | ***************************************************************************/ |
|---|
| 712 | BERR_Code BAPE_DfifoGroup_P_SetOverflowInterrupt( |
|---|
| 713 | BAPE_DfifoGroupHandle handle, |
|---|
| 714 | BINT_CallbackFunc callback_isr, |
|---|
| 715 | void *pParam1, |
|---|
| 716 | int param2 |
|---|
| 717 | ); |
|---|
| 718 | |
|---|
| 719 | /*************************************************************************** |
|---|
| 720 | Summary: |
|---|
| 721 | Re-Arm the Dfifo Group Overflow Interrupt |
|---|
| 722 | ***************************************************************************/ |
|---|
| 723 | void BAPE_DfifoGroup_P_RearmOverflowInterrupt_isr( |
|---|
| 724 | BAPE_DfifoGroupHandle handle |
|---|
| 725 | ); |
|---|
| 726 | |
|---|
| 727 | /*************************************************************************** |
|---|
| 728 | Summary: |
|---|
| 729 | Get Hardware Index for a particular DFIFO |
|---|
| 730 | |
|---|
| 731 | Description: |
|---|
| 732 | This function should be avoided unless absolutely necessary |
|---|
| 733 | (e.g. setting up DSP <-> FMM Linkage) |
|---|
| 734 | ***************************************************************************/ |
|---|
| 735 | uint32_t BAPE_DfifoGroup_P_GetHwIndex( |
|---|
| 736 | BAPE_DfifoGroupHandle handle, |
|---|
| 737 | BAPE_ChannelPair channelPair |
|---|
| 738 | ); |
|---|
| 739 | |
|---|
| 740 | /*************************************************************************** |
|---|
| 741 | Summary: |
|---|
| 742 | SRC Operation Mode |
|---|
| 743 | ***************************************************************************/ |
|---|
| 744 | typedef enum BAPE_SrcMode |
|---|
| 745 | { |
|---|
| 746 | BAPE_SrcMode_eBypass, |
|---|
| 747 | BAPE_SrcMode_eLinear, |
|---|
| 748 | BAPE_SrcMode_eIir, |
|---|
| 749 | BAPE_SrcMode_eUp2, |
|---|
| 750 | BAPE_SrcMode_eDown2, |
|---|
| 751 | BAPE_SrcMode_eUp4, |
|---|
| 752 | BAPE_SrcMode_eDown4, |
|---|
| 753 | BAPE_SrcMode_eMax |
|---|
| 754 | } BAPE_SrcMode; |
|---|
| 755 | |
|---|
| 756 | /*************************************************************************** |
|---|
| 757 | Summary: |
|---|
| 758 | IIR Coefficients |
|---|
| 759 | ***************************************************************************/ |
|---|
| 760 | |
|---|
| 761 | typedef struct BAPE_SRC_P_IIRCoeff |
|---|
| 762 | { |
|---|
| 763 | #ifdef BAPE_CHIP_P_MAX_IIR_FILTERS_PER_SRC |
|---|
| 764 | int32_t b0[BAPE_CHIP_P_MAX_IIR_FILTERS_PER_SRC]; |
|---|
| 765 | int32_t b1[BAPE_CHIP_P_MAX_IIR_FILTERS_PER_SRC]; |
|---|
| 766 | int32_t b2[BAPE_CHIP_P_MAX_IIR_FILTERS_PER_SRC]; |
|---|
| 767 | int32_t a1[BAPE_CHIP_P_MAX_IIR_FILTERS_PER_SRC]; |
|---|
| 768 | int32_t a2[BAPE_CHIP_P_MAX_IIR_FILTERS_PER_SRC]; |
|---|
| 769 | #else |
|---|
| 770 | int32_t dummy; |
|---|
| 771 | #endif |
|---|
| 772 | }BAPE_SRC_P_IIRCoeff; |
|---|
| 773 | |
|---|
| 774 | /*************************************************************************** |
|---|
| 775 | Summary: |
|---|
| 776 | SRC Coefficient Memory Descriptor |
|---|
| 777 | ***************************************************************************/ |
|---|
| 778 | typedef struct BAPE_SrcCoefficients |
|---|
| 779 | { |
|---|
| 780 | uint32_t baseAddress; /* Register Address Base */ |
|---|
| 781 | unsigned numCoefs; /* Number of 4-byte Coefficient Entries */ |
|---|
| 782 | } BAPE_SrcCoefficients; |
|---|
| 783 | |
|---|
| 784 | /*************************************************************************** |
|---|
| 785 | Summary: |
|---|
| 786 | SRC Coefficient Memory Parameters |
|---|
| 787 | ***************************************************************************/ |
|---|
| 788 | typedef struct BAPE_SrcCoefficientsSettings |
|---|
| 789 | { |
|---|
| 790 | BAPE_SrcMode mode; /* Mode Requiring the Coefficients - Typically this should only be Equalizer as |
|---|
| 791 | other modes are internally allocated when required. */ |
|---|
| 792 | union |
|---|
| 793 | { |
|---|
| 794 | struct |
|---|
| 795 | { |
|---|
| 796 | unsigned numIirBands; /* Used for Equalizer mode, ranges from 1..8 - default is 8 */ |
|---|
| 797 | } equalizer; |
|---|
| 798 | }modeSettings; |
|---|
| 799 | } BAPE_SrcCoefficientsSettings; |
|---|
| 800 | |
|---|
| 801 | /*************************************************************************** |
|---|
| 802 | Summary: |
|---|
| 803 | Get Default SRC Coefficient Memory Parameters |
|---|
| 804 | ***************************************************************************/ |
|---|
| 805 | void BAPE_SrcCoefficients_P_GetDefaultSettings( |
|---|
| 806 | BAPE_Handle deviceHandle, |
|---|
| 807 | const BAPE_SrcCoefficientsSettings *pSettings |
|---|
| 808 | ); |
|---|
| 809 | |
|---|
| 810 | /*************************************************************************** |
|---|
| 811 | Summary: |
|---|
| 812 | Allocate SRC Coefficient Memory |
|---|
| 813 | ***************************************************************************/ |
|---|
| 814 | BERR_Code BAPE_SrcCoefficients_P_Allocate( |
|---|
| 815 | BAPE_Handle deviceHandle, |
|---|
| 816 | const BAPE_SrcCoefficientsSettings *pSettings, |
|---|
| 817 | BAPE_SrcCoefficients *pCoefficients /* [out] Coefficient status */ |
|---|
| 818 | ); |
|---|
| 819 | |
|---|
| 820 | /*************************************************************************** |
|---|
| 821 | Summary: |
|---|
| 822 | Free SRC Coefficient Memory |
|---|
| 823 | ***************************************************************************/ |
|---|
| 824 | void BAPE_SrcCoefficients_P_Free( |
|---|
| 825 | BAPE_Handle deviceHandle, |
|---|
| 826 | BAPE_SrcCoefficients *pCoefficients /* [modified] Coefficients will be released */ |
|---|
| 827 | ); |
|---|
| 828 | |
|---|
| 829 | typedef struct BAPE_SrcGroupCoefficients |
|---|
| 830 | { |
|---|
| 831 | BAPE_SrcCoefficients srcCoefficients[BAPE_ChannelPair_eMax]; |
|---|
| 832 | }BAPE_SrcGroupCoefficients; |
|---|
| 833 | /*************************************************************************** |
|---|
| 834 | Summary: |
|---|
| 835 | SRC Group Create Settings |
|---|
| 836 | ***************************************************************************/ |
|---|
| 837 | typedef struct BAPE_SrcGroupCreateSettings |
|---|
| 838 | { |
|---|
| 839 | unsigned blockId; |
|---|
| 840 | unsigned numChannelPairs; /* Number of channel pairs */ |
|---|
| 841 | BAPE_SrcMode mode; /* Default is Linear */ |
|---|
| 842 | BAPE_SrcGroupCoefficients *pCoefMemory[2]; /* Coefficient Memory. Two are required only for IIR if doubleBuffered is true, otherwise one. |
|---|
| 843 | A valid value means sharing of an already allocated memory */ |
|---|
| 844 | /* Equalizer Settings */ |
|---|
| 845 | struct |
|---|
| 846 | { |
|---|
| 847 | unsigned numIirBands; /* Used for Equalizer mode, ranges from 1..8 - default is 8 */ |
|---|
| 848 | bool rampEnable; /* If true (default), the coefficients will be double-buffered for on-the-fly settings changes. |
|---|
| 849 | If false, the coefficients are not double-buffered to save coefficient memory space. */ |
|---|
| 850 | } equalizerSettings; |
|---|
| 851 | } BAPE_SrcGroupCreateSettings; |
|---|
| 852 | |
|---|
| 853 | /*************************************************************************** |
|---|
| 854 | Summary: |
|---|
| 855 | Get Default SRC Group Create Settings |
|---|
| 856 | ***************************************************************************/ |
|---|
| 857 | void BAPE_SrcGroup_P_GetDefaultCreateSettings( |
|---|
| 858 | BAPE_SrcGroupCreateSettings *pSettings /* [out] */ |
|---|
| 859 | ); |
|---|
| 860 | |
|---|
| 861 | /*************************************************************************** |
|---|
| 862 | Summary: |
|---|
| 863 | Create SRC Group |
|---|
| 864 | ***************************************************************************/ |
|---|
| 865 | BERR_Code BAPE_SrcGroup_P_Create( |
|---|
| 866 | BAPE_Handle deviceHandle, |
|---|
| 867 | const BAPE_SrcGroupCreateSettings *pSettings, |
|---|
| 868 | BAPE_SrcGroupHandle *pHandle /* [out] */ |
|---|
| 869 | ); |
|---|
| 870 | |
|---|
| 871 | /*************************************************************************** |
|---|
| 872 | Summary: |
|---|
| 873 | Destroy SRC Group |
|---|
| 874 | ***************************************************************************/ |
|---|
| 875 | void BAPE_SrcGroup_P_Destroy( |
|---|
| 876 | BAPE_SrcGroupHandle handle |
|---|
| 877 | ); |
|---|
| 878 | |
|---|
| 879 | /*************************************************************************** |
|---|
| 880 | Summary: |
|---|
| 881 | SRC Settings |
|---|
| 882 | ***************************************************************************/ |
|---|
| 883 | typedef struct BAPE_SrcGroupSettings |
|---|
| 884 | { |
|---|
| 885 | bool bypass; /* If true, bypass this SRC */ |
|---|
| 886 | bool highPriority; /* Set to true if sampleRate >= 96000 */ |
|---|
| 887 | bool rampEnabled; /* If true, ramp is enabled (set to false for compressed input) */ |
|---|
| 888 | bool startupRampEnabled; /* If true, ramp initial samples after startup (only valid if rampEnabled is true) */ |
|---|
| 889 | BAPE_FciIdGroup input; /* Input FCI ID */ |
|---|
| 890 | } BAPE_SrcGroupSettings; |
|---|
| 891 | |
|---|
| 892 | /*************************************************************************** |
|---|
| 893 | Summary: |
|---|
| 894 | Get SRC Settings |
|---|
| 895 | ***************************************************************************/ |
|---|
| 896 | void BAPE_SrcGroup_P_GetSettings( |
|---|
| 897 | BAPE_SrcGroupHandle handle, |
|---|
| 898 | BAPE_SrcGroupSettings *pSettings /* [out] */ |
|---|
| 899 | ); |
|---|
| 900 | |
|---|
| 901 | /*************************************************************************** |
|---|
| 902 | Summary: |
|---|
| 903 | Set SRC Settings |
|---|
| 904 | ***************************************************************************/ |
|---|
| 905 | BERR_Code BAPE_SrcGroup_P_SetSettings( |
|---|
| 906 | BAPE_SrcGroupHandle handle, |
|---|
| 907 | const BAPE_SrcGroupSettings *pSettings |
|---|
| 908 | ); |
|---|
| 909 | |
|---|
| 910 | /*************************************************************************** |
|---|
| 911 | Summary: |
|---|
| 912 | Set SRC Sample Rate (used for Linear mode only) |
|---|
| 913 | ***************************************************************************/ |
|---|
| 914 | void BAPE_SrcGroup_P_SetSampleRate_isr( |
|---|
| 915 | BAPE_SrcGroupHandle handle, |
|---|
| 916 | unsigned inputRate, |
|---|
| 917 | unsigned outputRate |
|---|
| 918 | ); |
|---|
| 919 | |
|---|
| 920 | /*************************************************************************** |
|---|
| 921 | Summary: |
|---|
| 922 | Set SRC Mute |
|---|
| 923 | ***************************************************************************/ |
|---|
| 924 | void BAPE_SrcGroup_P_SetMute_isr( |
|---|
| 925 | BAPE_SrcGroupHandle handle, |
|---|
| 926 | bool muted |
|---|
| 927 | ); |
|---|
| 928 | |
|---|
| 929 | /*************************************************************************** |
|---|
| 930 | Summary: |
|---|
| 931 | Start SRC |
|---|
| 932 | ***************************************************************************/ |
|---|
| 933 | BERR_Code BAPE_SrcGroup_P_Start( |
|---|
| 934 | BAPE_SrcGroupHandle handle |
|---|
| 935 | ); |
|---|
| 936 | |
|---|
| 937 | /*************************************************************************** |
|---|
| 938 | Summary: |
|---|
| 939 | Stop SRC |
|---|
| 940 | ***************************************************************************/ |
|---|
| 941 | void BAPE_SrcGroup_P_Stop( |
|---|
| 942 | BAPE_SrcGroupHandle handle |
|---|
| 943 | ); |
|---|
| 944 | |
|---|
| 945 | /*************************************************************************** |
|---|
| 946 | Summary: |
|---|
| 947 | Set Coefficient Index (used for Equalizer mode only) |
|---|
| 948 | ***************************************************************************/ |
|---|
| 949 | void BAPE_SrcGroup_P_SetCoefficientIndex_isr( |
|---|
| 950 | BAPE_SrcGroupHandle handle, |
|---|
| 951 | unsigned index |
|---|
| 952 | ); |
|---|
| 953 | |
|---|
| 954 | /*************************************************************************** |
|---|
| 955 | Summary: |
|---|
| 956 | Get FCI Connection IDs for this group |
|---|
| 957 | ***************************************************************************/ |
|---|
| 958 | void BAPE_SrcGroup_P_GetOutputFciIds( |
|---|
| 959 | BAPE_SrcGroupHandle handle, |
|---|
| 960 | BAPE_FciIdGroup *pFciGroup /* [out] */ |
|---|
| 961 | ); |
|---|
| 962 | |
|---|
| 963 | /*************************************************************************** |
|---|
| 964 | Summary: |
|---|
| 965 | Update Coefficients in the SRC Coefficients Memory |
|---|
| 966 | ***************************************************************************/ |
|---|
| 967 | void BAPE_SrcGroup_P_UpdateCoefficients_isr( |
|---|
| 968 | BAPE_SrcGroupHandle src, |
|---|
| 969 | BAPE_SRC_P_IIRCoeff *pCoeff, |
|---|
| 970 | unsigned *pStepSize /* NULL indicates No Ramping */ |
|---|
| 971 | ); |
|---|
| 972 | |
|---|
| 973 | /*************************************************************************** |
|---|
| 974 | Summary: |
|---|
| 975 | Mixer Group Create Settings |
|---|
| 976 | ***************************************************************************/ |
|---|
| 977 | typedef struct BAPE_MixerGroupCreateSettings |
|---|
| 978 | { |
|---|
| 979 | unsigned blockId; |
|---|
| 980 | unsigned numChannelPairs; /* Number of channel pairs */ |
|---|
| 981 | } BAPE_MixerGroupCreateSettings; |
|---|
| 982 | |
|---|
| 983 | /*************************************************************************** |
|---|
| 984 | Summary: |
|---|
| 985 | Get Default Mixer Group Create Settings |
|---|
| 986 | ***************************************************************************/ |
|---|
| 987 | void BAPE_MixerGroup_P_GetDefaultCreateSettings( |
|---|
| 988 | BAPE_MixerGroupCreateSettings *pSettings /* [out] */ |
|---|
| 989 | ); |
|---|
| 990 | |
|---|
| 991 | /*************************************************************************** |
|---|
| 992 | Summary: |
|---|
| 993 | Create a Mixer Group |
|---|
| 994 | ***************************************************************************/ |
|---|
| 995 | BERR_Code BAPE_MixerGroup_P_Create( |
|---|
| 996 | BAPE_Handle deviceHandle, |
|---|
| 997 | const BAPE_MixerGroupCreateSettings *pSettings, |
|---|
| 998 | BAPE_MixerGroupHandle *pHandle /* [out] */ |
|---|
| 999 | ); |
|---|
| 1000 | |
|---|
| 1001 | /*************************************************************************** |
|---|
| 1002 | Summary: |
|---|
| 1003 | Destroy a Mixer Group |
|---|
| 1004 | ***************************************************************************/ |
|---|
| 1005 | void BAPE_MixerGroup_P_Destroy( |
|---|
| 1006 | BAPE_MixerGroupHandle handle |
|---|
| 1007 | ); |
|---|
| 1008 | |
|---|
| 1009 | /*************************************************************************** |
|---|
| 1010 | Summary: |
|---|
| 1011 | Mixer Group Settings |
|---|
| 1012 | ***************************************************************************/ |
|---|
| 1013 | typedef struct BAPE_MixerGroupSettings |
|---|
| 1014 | { |
|---|
| 1015 | bool highPriority; /* Set to true if sampleRate >= 96000 */ |
|---|
| 1016 | bool volumeControlEnabled; /* Set to true to enable volume control, false otherwise. */ |
|---|
| 1017 | bool softLimitEnabled; /* Set to true to enable soft limiting */ |
|---|
| 1018 | } BAPE_MixerGroupSettings; |
|---|
| 1019 | |
|---|
| 1020 | /*************************************************************************** |
|---|
| 1021 | Summary: |
|---|
| 1022 | Get Mixer Group Settings |
|---|
| 1023 | ***************************************************************************/ |
|---|
| 1024 | void BAPE_MixerGroup_P_GetSettings( |
|---|
| 1025 | BAPE_MixerGroupHandle handle, |
|---|
| 1026 | BAPE_MixerGroupSettings *pSettings /* [out] */ |
|---|
| 1027 | ); |
|---|
| 1028 | |
|---|
| 1029 | /*************************************************************************** |
|---|
| 1030 | Summary: |
|---|
| 1031 | Set Mixer Group Settings |
|---|
| 1032 | ***************************************************************************/ |
|---|
| 1033 | BERR_Code BAPE_MixerGroup_P_SetSettings( |
|---|
| 1034 | BAPE_MixerGroupHandle handle, |
|---|
| 1035 | const BAPE_MixerGroupSettings *pSettings |
|---|
| 1036 | ); |
|---|
| 1037 | |
|---|
| 1038 | /*************************************************************************** |
|---|
| 1039 | Summary: |
|---|
| 1040 | Mixer Group Input Settings |
|---|
| 1041 | ***************************************************************************/ |
|---|
| 1042 | typedef struct BAPE_MixerGroupInputSettings |
|---|
| 1043 | { |
|---|
| 1044 | BAPE_FciIdGroup input; /* Can only be changed while stopped */ |
|---|
| 1045 | int32_t coefficients[BAPE_ChannelPair_eMax][2][2]; /* Entries in this table reflect scaling from the input channel to the output channel. |
|---|
| 1046 | The first index is the channel pair. The second index is the input channel, 0 |
|---|
| 1047 | for the first (left) channel and 1 for the second (right) channel. The third index |
|---|
| 1048 | is the output channel. Default is to have BAPE_VOLUME_NORMAL for each [0][0] and [1][1] |
|---|
| 1049 | coefficient and BAPE_VOLUME_MIN for all others. This maps input channels to the same |
|---|
| 1050 | output channel with no scaling. */ |
|---|
| 1051 | } BAPE_MixerGroupInputSettings; |
|---|
| 1052 | |
|---|
| 1053 | /*************************************************************************** |
|---|
| 1054 | Summary: |
|---|
| 1055 | Get Mixer Group Input Settings |
|---|
| 1056 | ***************************************************************************/ |
|---|
| 1057 | void BAPE_MixerGroup_P_GetInputSettings( |
|---|
| 1058 | BAPE_MixerGroupHandle handle, |
|---|
| 1059 | unsigned inputIndex, |
|---|
| 1060 | BAPE_MixerGroupInputSettings *pSettings /* [out] */ |
|---|
| 1061 | ); |
|---|
| 1062 | |
|---|
| 1063 | /*************************************************************************** |
|---|
| 1064 | Summary: |
|---|
| 1065 | Set Mixer Group Input Settings |
|---|
| 1066 | ***************************************************************************/ |
|---|
| 1067 | BERR_Code BAPE_MixerGroup_P_SetInputSettings( |
|---|
| 1068 | BAPE_MixerGroupHandle handle, |
|---|
| 1069 | unsigned inputIndex, |
|---|
| 1070 | const BAPE_MixerGroupInputSettings *pSettings |
|---|
| 1071 | ); |
|---|
| 1072 | |
|---|
| 1073 | /*************************************************************************** |
|---|
| 1074 | Summary: |
|---|
| 1075 | Start a Mixer Group Input |
|---|
| 1076 | ***************************************************************************/ |
|---|
| 1077 | BERR_Code BAPE_MixerGroup_P_StartInput( |
|---|
| 1078 | BAPE_MixerGroupHandle handle, |
|---|
| 1079 | unsigned inputIndex |
|---|
| 1080 | ); |
|---|
| 1081 | |
|---|
| 1082 | /*************************************************************************** |
|---|
| 1083 | Summary: |
|---|
| 1084 | Stop a Mixer Group Input |
|---|
| 1085 | ***************************************************************************/ |
|---|
| 1086 | void BAPE_MixerGroup_P_StopInput( |
|---|
| 1087 | BAPE_MixerGroupHandle handle, |
|---|
| 1088 | unsigned inputIndex |
|---|
| 1089 | ); |
|---|
| 1090 | |
|---|
| 1091 | /*************************************************************************** |
|---|
| 1092 | Summary: |
|---|
| 1093 | Mixer Group Output Settings |
|---|
| 1094 | ***************************************************************************/ |
|---|
| 1095 | typedef struct BAPE_MixerGroupOutputSettings |
|---|
| 1096 | { |
|---|
| 1097 | uint32_t coefficients[BAPE_Channel_eMax]; /* Output volume scaling per output channel. Default is BAPE_VOLUME_NORMAL for all channels. |
|---|
| 1098 | Ignored for compressed data. Values are specified in 5.23 integers, so 0x800000 corresponds |
|---|
| 1099 | to unity (BAPE_VOLUME_NORMAL). */ |
|---|
| 1100 | bool volumeRampDisabled; /* If true, disable the output volume ramping. */ |
|---|
| 1101 | bool muted; /* Mute all output channels if true. */ |
|---|
| 1102 | |
|---|
| 1103 | unsigned numChannelPairs; /* By default, this is 0 to use the same number of channel pairs as there are mixers in the group. |
|---|
| 1104 | If you want to force a different option, pass that here, but take care that one of the two |
|---|
| 1105 | mixer outputs is consuming all channel pairs or the hardware will pause. */ |
|---|
| 1106 | } BAPE_MixerGroupOutputSettings; |
|---|
| 1107 | |
|---|
| 1108 | /*************************************************************************** |
|---|
| 1109 | Summary: |
|---|
| 1110 | Get Mixer Group Output Settings |
|---|
| 1111 | ***************************************************************************/ |
|---|
| 1112 | void BAPE_MixerGroup_P_GetOutputSettings( |
|---|
| 1113 | BAPE_MixerGroupHandle handle, |
|---|
| 1114 | unsigned outputIndex, |
|---|
| 1115 | BAPE_MixerGroupOutputSettings *pSettings /* [out] */ |
|---|
| 1116 | ); |
|---|
| 1117 | |
|---|
| 1118 | /*************************************************************************** |
|---|
| 1119 | Summary: |
|---|
| 1120 | Set Mixer Group Output Settings |
|---|
| 1121 | ***************************************************************************/ |
|---|
| 1122 | BERR_Code BAPE_MixerGroup_P_SetOutputSettings( |
|---|
| 1123 | BAPE_MixerGroupHandle handle, |
|---|
| 1124 | unsigned outputIndex, |
|---|
| 1125 | const BAPE_MixerGroupOutputSettings *pSettings |
|---|
| 1126 | ); |
|---|
| 1127 | |
|---|
| 1128 | /*************************************************************************** |
|---|
| 1129 | Summary: |
|---|
| 1130 | Mixer Group Output Status |
|---|
| 1131 | ***************************************************************************/ |
|---|
| 1132 | typedef struct BAPE_MixerGroupOutputStatus |
|---|
| 1133 | { |
|---|
| 1134 | bool rampActive[BAPE_Channel_eMax]; |
|---|
| 1135 | } BAPE_MixerGroupOutputStatus; |
|---|
| 1136 | |
|---|
| 1137 | /*************************************************************************** |
|---|
| 1138 | Summary: |
|---|
| 1139 | Set Mixer Group Output Status |
|---|
| 1140 | ***************************************************************************/ |
|---|
| 1141 | void BAPE_MixerGroup_P_GetOutputStatus( |
|---|
| 1142 | BAPE_MixerGroupHandle handle, |
|---|
| 1143 | unsigned outputIndex, |
|---|
| 1144 | BAPE_MixerGroupOutputStatus *pStatus /* [out] */ |
|---|
| 1145 | ); |
|---|
| 1146 | |
|---|
| 1147 | /*************************************************************************** |
|---|
| 1148 | Summary: |
|---|
| 1149 | Start a Mixer Group Output |
|---|
| 1150 | ***************************************************************************/ |
|---|
| 1151 | BERR_Code BAPE_MixerGroup_P_StartOutput( |
|---|
| 1152 | BAPE_MixerGroupHandle handle, |
|---|
| 1153 | unsigned outputIndex |
|---|
| 1154 | ); |
|---|
| 1155 | |
|---|
| 1156 | /*************************************************************************** |
|---|
| 1157 | Summary: |
|---|
| 1158 | Stop a Mixer Group Output |
|---|
| 1159 | ***************************************************************************/ |
|---|
| 1160 | void BAPE_MixerGroup_P_StopOutput( |
|---|
| 1161 | BAPE_MixerGroupHandle handle, |
|---|
| 1162 | unsigned outputIndex |
|---|
| 1163 | ); |
|---|
| 1164 | |
|---|
| 1165 | /*************************************************************************** |
|---|
| 1166 | Summary: |
|---|
| 1167 | Get FCI IDs for a mixer output |
|---|
| 1168 | ***************************************************************************/ |
|---|
| 1169 | void BAPE_MixerGroup_P_GetOutputFciIds( |
|---|
| 1170 | BAPE_MixerGroupHandle handle, |
|---|
| 1171 | unsigned outputIndex, |
|---|
| 1172 | BAPE_FciIdGroup *pFciGroup /* [out] */ |
|---|
| 1173 | ); |
|---|
| 1174 | |
|---|
| 1175 | /*************************************************************************** |
|---|
| 1176 | Summary: |
|---|
| 1177 | IOP Stream Settings |
|---|
| 1178 | ***************************************************************************/ |
|---|
| 1179 | typedef struct BAPE_IopStreamSettings |
|---|
| 1180 | { |
|---|
| 1181 | unsigned resolution; /* Resolution in bits. Valid values are 16..24 */ |
|---|
| 1182 | BAPE_FciId input; /* Input FCI ID */ |
|---|
| 1183 | } BAPE_IopStreamSettings; |
|---|
| 1184 | |
|---|
| 1185 | /*************************************************************************** |
|---|
| 1186 | Summary: |
|---|
| 1187 | Get IOP Stream Settings |
|---|
| 1188 | ***************************************************************************/ |
|---|
| 1189 | void BAPE_Iop_P_GetStreamSettings( |
|---|
| 1190 | BAPE_Handle handle, |
|---|
| 1191 | unsigned streamId, |
|---|
| 1192 | BAPE_IopStreamSettings *pSettings /* [out] */ |
|---|
| 1193 | ); |
|---|
| 1194 | |
|---|
| 1195 | /*************************************************************************** |
|---|
| 1196 | Summary: |
|---|
| 1197 | Set IOP Stream Settings |
|---|
| 1198 | ***************************************************************************/ |
|---|
| 1199 | BERR_Code BAPE_Iop_P_SetStreamSettings( |
|---|
| 1200 | BAPE_Handle handle, |
|---|
| 1201 | unsigned streamId, |
|---|
| 1202 | const BAPE_IopStreamSettings *pSettings |
|---|
| 1203 | ); |
|---|
| 1204 | |
|---|
| 1205 | /*************************************************************************** |
|---|
| 1206 | Summary: |
|---|
| 1207 | Enable stream capture in IOP |
|---|
| 1208 | ***************************************************************************/ |
|---|
| 1209 | BERR_Code BAPE_Iop_P_EnableCapture( |
|---|
| 1210 | BAPE_Handle handle, |
|---|
| 1211 | unsigned baseCaptureId, |
|---|
| 1212 | unsigned numChannelPairs |
|---|
| 1213 | ); |
|---|
| 1214 | |
|---|
| 1215 | /*************************************************************************** |
|---|
| 1216 | Summary: |
|---|
| 1217 | Disable stream capture in IOP |
|---|
| 1218 | ***************************************************************************/ |
|---|
| 1219 | void BAPE_Iop_P_DisableCapture( |
|---|
| 1220 | BAPE_Handle handle, |
|---|
| 1221 | unsigned baseCaptureId, |
|---|
| 1222 | unsigned numChannelPairs |
|---|
| 1223 | ); |
|---|
| 1224 | |
|---|
| 1225 | /*************************************************************************** |
|---|
| 1226 | Summary: |
|---|
| 1227 | Loopback Create Settings |
|---|
| 1228 | ***************************************************************************/ |
|---|
| 1229 | typedef struct BAPE_LoopbackGroupCreateSettings |
|---|
| 1230 | { |
|---|
| 1231 | unsigned numChannelPairs; |
|---|
| 1232 | } BAPE_LoopbackGroupCreateSettings; |
|---|
| 1233 | |
|---|
| 1234 | /*************************************************************************** |
|---|
| 1235 | Summary: |
|---|
| 1236 | Get Default Loopback Create Settings |
|---|
| 1237 | ***************************************************************************/ |
|---|
| 1238 | void BAPE_LoopbackGroup_P_GetDefaultCreateSettings( |
|---|
| 1239 | BAPE_LoopbackGroupCreateSettings *pSettings /* [out] */ |
|---|
| 1240 | ); |
|---|
| 1241 | |
|---|
| 1242 | /*************************************************************************** |
|---|
| 1243 | Summary: |
|---|
| 1244 | Create Loopback Group |
|---|
| 1245 | ***************************************************************************/ |
|---|
| 1246 | BERR_Code BAPE_LoopbackGroup_P_Create( |
|---|
| 1247 | BAPE_Handle deviceHandle, |
|---|
| 1248 | const BAPE_LoopbackGroupCreateSettings *pSettings, |
|---|
| 1249 | BAPE_LoopbackGroupHandle *pHandle /* [out] */ |
|---|
| 1250 | ); |
|---|
| 1251 | |
|---|
| 1252 | /*************************************************************************** |
|---|
| 1253 | Summary: |
|---|
| 1254 | Destroy Loopback Group |
|---|
| 1255 | ***************************************************************************/ |
|---|
| 1256 | void BAPE_LoopbackGroup_P_Destroy( |
|---|
| 1257 | BAPE_LoopbackGroupHandle handle |
|---|
| 1258 | ); |
|---|
| 1259 | |
|---|
| 1260 | /*************************************************************************** |
|---|
| 1261 | Summary: |
|---|
| 1262 | Loopback Settings |
|---|
| 1263 | ***************************************************************************/ |
|---|
| 1264 | typedef struct BAPE_LoopbackGroupSettings |
|---|
| 1265 | { |
|---|
| 1266 | BAPE_FciIdGroup input; /* Input FCI feeding the loopback from the FMM. |
|---|
| 1267 | Loopback will loop this data back and provides |
|---|
| 1268 | a capture FCI ID, that can be obtained |
|---|
| 1269 | via BAPE_LoopbackGroup_P_GetCaptureFciIds. */ |
|---|
| 1270 | unsigned resolution; /* Resolution in bits. Valid values are 16..24 */ |
|---|
| 1271 | |
|---|
| 1272 | #if BAPE_CHIP_MAX_FS > 0 |
|---|
| 1273 | unsigned fs; /* Which FS timing source will be used. */ |
|---|
| 1274 | #else |
|---|
| 1275 | BAPE_MclkSource mclkSource; /* MCLK Source */ |
|---|
| 1276 | unsigned pllChannel; /* PLL Channel */ |
|---|
| 1277 | unsigned mclkFreqToFsRatio; /* Ratio of MCLK to sample clock */ |
|---|
| 1278 | #endif |
|---|
| 1279 | } BAPE_LoopbackGroupSettings; |
|---|
| 1280 | |
|---|
| 1281 | /*************************************************************************** |
|---|
| 1282 | Summary: |
|---|
| 1283 | Get Loopback Settings |
|---|
| 1284 | ***************************************************************************/ |
|---|
| 1285 | void BAPE_LoopbackGroup_P_GetSettings( |
|---|
| 1286 | BAPE_LoopbackGroupHandle handle, |
|---|
| 1287 | BAPE_LoopbackGroupSettings *pSettings /* [out] */ |
|---|
| 1288 | ); |
|---|
| 1289 | |
|---|
| 1290 | /*************************************************************************** |
|---|
| 1291 | Summary: |
|---|
| 1292 | Set Loopback Settings |
|---|
| 1293 | ***************************************************************************/ |
|---|
| 1294 | BERR_Code BAPE_LoopbackGroup_P_SetSettings( |
|---|
| 1295 | BAPE_LoopbackGroupHandle handle, |
|---|
| 1296 | const BAPE_LoopbackGroupSettings *pSettings |
|---|
| 1297 | ); |
|---|
| 1298 | |
|---|
| 1299 | /*************************************************************************** |
|---|
| 1300 | Summary: |
|---|
| 1301 | Start Capture and Output, reads from input FCI ID in BAPE_LoopbackGroupSettings |
|---|
| 1302 | ***************************************************************************/ |
|---|
| 1303 | BERR_Code BAPE_LoopbackGroup_P_Start( |
|---|
| 1304 | BAPE_LoopbackGroupHandle handle |
|---|
| 1305 | ); |
|---|
| 1306 | |
|---|
| 1307 | /*************************************************************************** |
|---|
| 1308 | Summary: |
|---|
| 1309 | Stop Output |
|---|
| 1310 | ***************************************************************************/ |
|---|
| 1311 | void BAPE_LoopbackGroup_P_Stop( |
|---|
| 1312 | BAPE_LoopbackGroupHandle handle |
|---|
| 1313 | ); |
|---|
| 1314 | |
|---|
| 1315 | /*************************************************************************** |
|---|
| 1316 | Summary: |
|---|
| 1317 | Get Capture FCI For Loopback |
|---|
| 1318 | ***************************************************************************/ |
|---|
| 1319 | void BAPE_LoopbackGroup_P_GetCaptureFciIds( |
|---|
| 1320 | BAPE_LoopbackGroupHandle handle, |
|---|
| 1321 | BAPE_FciIdGroup *pGroup /* [out] */ |
|---|
| 1322 | ); |
|---|
| 1323 | |
|---|
| 1324 | /*************************************************************************** |
|---|
| 1325 | Summary: |
|---|
| 1326 | Dummysink Create Settings |
|---|
| 1327 | ***************************************************************************/ |
|---|
| 1328 | typedef struct BAPE_DummysinkGroupCreateSettings |
|---|
| 1329 | { |
|---|
| 1330 | unsigned numChannelPairs; |
|---|
| 1331 | } BAPE_DummysinkGroupCreateSettings; |
|---|
| 1332 | |
|---|
| 1333 | /*************************************************************************** |
|---|
| 1334 | Summary: |
|---|
| 1335 | Get Default Dummysink Create Settings |
|---|
| 1336 | ***************************************************************************/ |
|---|
| 1337 | void BAPE_DummysinkGroup_P_GetDefaultCreateSettings( |
|---|
| 1338 | BAPE_DummysinkGroupCreateSettings *pSettings /* [out] */ |
|---|
| 1339 | ); |
|---|
| 1340 | |
|---|
| 1341 | /*************************************************************************** |
|---|
| 1342 | Summary: |
|---|
| 1343 | Create Dummysink Group |
|---|
| 1344 | ***************************************************************************/ |
|---|
| 1345 | BERR_Code BAPE_DummysinkGroup_P_Create( |
|---|
| 1346 | BAPE_Handle deviceHandle, |
|---|
| 1347 | const BAPE_DummysinkGroupCreateSettings *pSettings, |
|---|
| 1348 | BAPE_DummysinkGroupHandle *pHandle /* [out] */ |
|---|
| 1349 | ); |
|---|
| 1350 | |
|---|
| 1351 | /*************************************************************************** |
|---|
| 1352 | Summary: |
|---|
| 1353 | Destroy Dummysink Group |
|---|
| 1354 | ***************************************************************************/ |
|---|
| 1355 | void BAPE_DummysinkGroup_P_Destroy( |
|---|
| 1356 | BAPE_DummysinkGroupHandle handle |
|---|
| 1357 | ); |
|---|
| 1358 | |
|---|
| 1359 | /*************************************************************************** |
|---|
| 1360 | Summary: |
|---|
| 1361 | Dummysink Settings |
|---|
| 1362 | ***************************************************************************/ |
|---|
| 1363 | typedef struct BAPE_DummysinkGroupSettings |
|---|
| 1364 | { |
|---|
| 1365 | BAPE_FciIdGroup input; /* Input FCI feeding the dummysink from the FMM. */ |
|---|
| 1366 | unsigned resolution; /* Resolution in bits. Valid values are 16..24 */ |
|---|
| 1367 | #if BAPE_CHIP_MAX_FS > 0 |
|---|
| 1368 | unsigned fs; /* Which FS timing source will be used. */ |
|---|
| 1369 | #else |
|---|
| 1370 | BAPE_MclkSource mclkSource; /* MCLK Source */ |
|---|
| 1371 | unsigned pllChannel; /* PLL Channel */ |
|---|
| 1372 | unsigned mclkFreqToFsRatio; /* Ratio of MCLK to sample clock */ |
|---|
| 1373 | #endif |
|---|
| 1374 | } BAPE_DummysinkGroupSettings; |
|---|
| 1375 | |
|---|
| 1376 | /*************************************************************************** |
|---|
| 1377 | Summary: |
|---|
| 1378 | Get Dummysink Settings |
|---|
| 1379 | ***************************************************************************/ |
|---|
| 1380 | void BAPE_DummysinkGroup_P_GetSettings( |
|---|
| 1381 | BAPE_DummysinkGroupHandle handle, |
|---|
| 1382 | BAPE_DummysinkGroupSettings *pSettings /* [out] */ |
|---|
| 1383 | ); |
|---|
| 1384 | |
|---|
| 1385 | /*************************************************************************** |
|---|
| 1386 | Summary: |
|---|
| 1387 | Set Dummysink Settings |
|---|
| 1388 | ***************************************************************************/ |
|---|
| 1389 | BERR_Code BAPE_DummysinkGroup_P_SetSettings( |
|---|
| 1390 | BAPE_DummysinkGroupHandle handle, |
|---|
| 1391 | const BAPE_DummysinkGroupSettings *pSettings |
|---|
| 1392 | ); |
|---|
| 1393 | |
|---|
| 1394 | /*************************************************************************** |
|---|
| 1395 | Summary: |
|---|
| 1396 | Start Capture and Output, reads from input FCI ID in BAPE_DummysinkGroupSettings |
|---|
| 1397 | ***************************************************************************/ |
|---|
| 1398 | BERR_Code BAPE_DummysinkGroup_P_Start( |
|---|
| 1399 | BAPE_DummysinkGroupHandle handle |
|---|
| 1400 | ); |
|---|
| 1401 | |
|---|
| 1402 | /*************************************************************************** |
|---|
| 1403 | Summary: |
|---|
| 1404 | Stop Output |
|---|
| 1405 | ***************************************************************************/ |
|---|
| 1406 | void BAPE_DummysinkGroup_P_Stop( |
|---|
| 1407 | BAPE_DummysinkGroupHandle handle |
|---|
| 1408 | ); |
|---|
| 1409 | |
|---|
| 1410 | #endif /* #ifndef BAPE_FMM_PRIV_H_ */ |
|---|
| 1411 | |
|---|