| 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_output.h $ |
|---|
| 11 | * $brcm_Revision: Hydra_Software_Devel/11 $ |
|---|
| 12 | * $brcm_Date: 7/8/11 6:38p $ |
|---|
| 13 | * |
|---|
| 14 | * Module Description: Audio Decoder Interface |
|---|
| 15 | * |
|---|
| 16 | * Revision History: |
|---|
| 17 | * |
|---|
| 18 | * $brcm_Log: /magnum/portinginterface/ape/7422/bape_output.h $ |
|---|
| 19 | * |
|---|
| 20 | * Hydra_Software_Devel/11 7/8/11 6:38p jgarrett |
|---|
| 21 | * SWDTV-6760: Adding I2sMultiOutput |
|---|
| 22 | * |
|---|
| 23 | * Hydra_Software_Devel/10 5/3/11 6:58p gskerl |
|---|
| 24 | * SW7422-354: First attempt at adding support for the audio return |
|---|
| 25 | * channel |
|---|
| 26 | * |
|---|
| 27 | * Hydra_Software_Devel/9 3/25/11 12:41p gskerl |
|---|
| 28 | * SW7422-375: Removed peakA1 and peakA2 from DAC settings |
|---|
| 29 | * |
|---|
| 30 | * Hydra_Software_Devel/8 3/22/11 5:02p gskerl |
|---|
| 31 | * SW7422-375: Added settings to BAPE_DacSettings for DAC peaking filter |
|---|
| 32 | * coefficients |
|---|
| 33 | * |
|---|
| 34 | * Hydra_Software_Devel/7 3/21/11 7:08p jgarrett |
|---|
| 35 | * SW7422-356: Adding MuxOutput |
|---|
| 36 | * |
|---|
| 37 | * Hydra_Software_Devel/6 2/22/11 5:43p jgarrett |
|---|
| 38 | * SW7422-146: Implemented type renaming based on filter graph review |
|---|
| 39 | * comments |
|---|
| 40 | * |
|---|
| 41 | * Hydra_Software_Devel/5 1/31/11 6:48p gskerl |
|---|
| 42 | * SW7422-146:Removed mclkRate from BAPE_SpdifOutputSettings, |
|---|
| 43 | * BAPE_MaiOutputSettings, and BAPE_I2sOutputSettings structs. |
|---|
| 44 | * |
|---|
| 45 | * Hydra_Software_Devel/4 1/18/11 5:08p gskerl |
|---|
| 46 | * SW7422-146:Adding mclkRate to BAPE_SpdifOutputSettings, |
|---|
| 47 | * BAPE_MaiOutputSettings, and BAPE_I2sOutputSettings structs. |
|---|
| 48 | * |
|---|
| 49 | * Hydra_Software_Devel/3 12/16/10 4:04p jgarrett |
|---|
| 50 | * SW7422-146: Initial compilable APE for 7422 |
|---|
| 51 | * |
|---|
| 52 | * Hydra_Software_Devel/2 12/14/10 2:39p jgarrett |
|---|
| 53 | * SW7422-146: Renaming MixerOutput to OutputPort |
|---|
| 54 | * |
|---|
| 55 | * Hydra_Software_Devel/1 12/14/10 2:16p jgarrett |
|---|
| 56 | * SW7422-146: Adding initial API for APE/DSP |
|---|
| 57 | * |
|---|
| 58 | ***************************************************************************/ |
|---|
| 59 | |
|---|
| 60 | #ifndef BAPE_OUTPUT_H_ |
|---|
| 61 | #define BAPE_OUTPUT_H_ |
|---|
| 62 | |
|---|
| 63 | /*************************************************************************** |
|---|
| 64 | Summary: |
|---|
| 65 | Audio DAC Handle |
|---|
| 66 | ***************************************************************************/ |
|---|
| 67 | typedef struct BAPE_Dac *BAPE_DacHandle; |
|---|
| 68 | |
|---|
| 69 | /*************************************************************************** |
|---|
| 70 | Summary: |
|---|
| 71 | Audio DAC Mute Modes |
|---|
| 72 | ***************************************************************************/ |
|---|
| 73 | typedef enum BAPE_DacMuteType |
|---|
| 74 | { |
|---|
| 75 | BAPE_DacMuteType_eDrive0, |
|---|
| 76 | BAPE_DacMuteType_eDriveNegative1, |
|---|
| 77 | BAPE_DacMuteType_eCustom, |
|---|
| 78 | BAPE_DacMuteType_eMax |
|---|
| 79 | } BAPE_DacMuteType; |
|---|
| 80 | |
|---|
| 81 | /*************************************************************************** |
|---|
| 82 | Summary: |
|---|
| 83 | Audio DAC Settings |
|---|
| 84 | ***************************************************************************/ |
|---|
| 85 | typedef struct BAPE_DacSettings |
|---|
| 86 | { |
|---|
| 87 | BAPE_StereoMode stereoMode; /* Mode to handle stereo mixer ouptut */ |
|---|
| 88 | BAPE_DacMuteType muteType; /* Mute mode. */ |
|---|
| 89 | uint16_t customLeftValue; /* 16-bit left sample, used only with custom mute type */ |
|---|
| 90 | uint16_t customRightValue; /* 16-bit right sample, used only with custom mute type */ |
|---|
| 91 | uint32_t peakGain; /* PEAK_GAIN - Peaking filter gain */ |
|---|
| 92 | struct |
|---|
| 93 | { |
|---|
| 94 | bool enabled; /* If true, test tone output is enabled with the settings below. If false, the tone output is disabled. */ |
|---|
| 95 | int32_t samples[64]; /* Test tone samples. The samples are 20-bit signed data. */ |
|---|
| 96 | bool zeroOnLeft; /* If true, the left channel will output zeroes */ |
|---|
| 97 | bool zeroOnRight; /* If true, the right channel will output zeroes */ |
|---|
| 98 | bool sharedSamples; /* If true (default), samples 0..63 will be output on both Left and Right. |
|---|
| 99 | If false, samples 0..31 will output on Left and 32..63 on Right. */ |
|---|
| 100 | unsigned numSamplesLeft; /* Number of samples to play on the left channel before repeating (1..64) */ |
|---|
| 101 | unsigned numSamplesRight; /* Number of samples to play on the right channel before repeating (1..64) */ |
|---|
| 102 | unsigned sampleRate; /* Sampling frequency of the samples */ |
|---|
| 103 | } testTone; |
|---|
| 104 | } BAPE_DacSettings; |
|---|
| 105 | |
|---|
| 106 | /*************************************************************************** |
|---|
| 107 | Summary: |
|---|
| 108 | Get Default Audio DAC Settings |
|---|
| 109 | ***************************************************************************/ |
|---|
| 110 | void BAPE_Dac_GetDefaultSettings( |
|---|
| 111 | BAPE_DacSettings *pSettings |
|---|
| 112 | ); |
|---|
| 113 | |
|---|
| 114 | /*************************************************************************** |
|---|
| 115 | Summary: |
|---|
| 116 | Open an audio DAC |
|---|
| 117 | ***************************************************************************/ |
|---|
| 118 | BERR_Code BAPE_Dac_Open( |
|---|
| 119 | BAPE_Handle deviceHandle, |
|---|
| 120 | unsigned index, |
|---|
| 121 | const BAPE_DacSettings *pSettings, |
|---|
| 122 | BAPE_DacHandle *pHandle /* [out] */ |
|---|
| 123 | ); |
|---|
| 124 | |
|---|
| 125 | /*************************************************************************** |
|---|
| 126 | Summary: |
|---|
| 127 | Close an audio DAC |
|---|
| 128 | ***************************************************************************/ |
|---|
| 129 | void BAPE_Dac_Close( |
|---|
| 130 | BAPE_DacHandle handle |
|---|
| 131 | ); |
|---|
| 132 | |
|---|
| 133 | /*************************************************************************** |
|---|
| 134 | Summary: |
|---|
| 135 | Get DAC Settings |
|---|
| 136 | ***************************************************************************/ |
|---|
| 137 | void BAPE_Dac_GetSettings( |
|---|
| 138 | BAPE_DacHandle handle, |
|---|
| 139 | BAPE_DacSettings *pSettings /* [out] */ |
|---|
| 140 | ); |
|---|
| 141 | |
|---|
| 142 | /*************************************************************************** |
|---|
| 143 | Summary: |
|---|
| 144 | Set DAC Settings |
|---|
| 145 | ***************************************************************************/ |
|---|
| 146 | BERR_Code BAPE_Dac_SetSettings( |
|---|
| 147 | BAPE_DacHandle handle, |
|---|
| 148 | const BAPE_DacSettings *pSettings |
|---|
| 149 | ); |
|---|
| 150 | |
|---|
| 151 | /*************************************************************************** |
|---|
| 152 | Summary: |
|---|
| 153 | Get mixer output connector for a DAC |
|---|
| 154 | ***************************************************************************/ |
|---|
| 155 | void BAPE_Dac_GetOutputPort( |
|---|
| 156 | BAPE_DacHandle handle, |
|---|
| 157 | BAPE_OutputPort *pConnector /* [out] */ |
|---|
| 158 | ); |
|---|
| 159 | |
|---|
| 160 | /*************************************************************************** |
|---|
| 161 | Summary: |
|---|
| 162 | SPDIF Output Handle |
|---|
| 163 | ***************************************************************************/ |
|---|
| 164 | typedef struct BAPE_SpdifOutput *BAPE_SpdifOutputHandle; |
|---|
| 165 | |
|---|
| 166 | /*************************************************************************** |
|---|
| 167 | Summary: |
|---|
| 168 | SPDIF Output Settings |
|---|
| 169 | ***************************************************************************/ |
|---|
| 170 | typedef struct BAPE_SpdifOutputSettings |
|---|
| 171 | { |
|---|
| 172 | BAPE_StereoMode stereoMode; /* Mode to handle stereo mixer ouptut. Ignored with compressed input. */ |
|---|
| 173 | bool ditherEnabled; /* If true, a dither signal will be sent |
|---|
| 174 | out when there is no PCM data. Every |
|---|
| 175 | 192 samples, a zero PCM sample will be overwritten |
|---|
| 176 | with one. Non-zero or compressed samples are ignored. */ |
|---|
| 177 | bool limitTo16Bits; /* If true, PCM data will be limited to 16 bits */ |
|---|
| 178 | BAPE_SpdifBurstType underflowBurst; /* A burst of the specified type will be sent |
|---|
| 179 | if the input underflows. */ |
|---|
| 180 | |
|---|
| 181 | bool useRawChannelStatus; /* If true, values from rawChannelStatus will be used instead of channelStatus */ |
|---|
| 182 | BAPE_SpdifChannelStatus channelStatus; |
|---|
| 183 | uint8_t rawChannelStatus[24]; /* Programs the channel status directly, sample rate and other values will not be set internally */ |
|---|
| 184 | } BAPE_SpdifOutputSettings; |
|---|
| 185 | |
|---|
| 186 | /*************************************************************************** |
|---|
| 187 | Summary: |
|---|
| 188 | Get Default SPDIF Output Settings |
|---|
| 189 | ***************************************************************************/ |
|---|
| 190 | void BAPE_SpdifOutput_GetDefaultSettings( |
|---|
| 191 | BAPE_SpdifOutputSettings *pSettings |
|---|
| 192 | ); |
|---|
| 193 | |
|---|
| 194 | /*************************************************************************** |
|---|
| 195 | Summary: |
|---|
| 196 | Open a SPDIF Output |
|---|
| 197 | ***************************************************************************/ |
|---|
| 198 | BERR_Code BAPE_SpdifOutput_Open( |
|---|
| 199 | BAPE_Handle deviceHandle, |
|---|
| 200 | unsigned index, |
|---|
| 201 | const BAPE_SpdifOutputSettings *pSettings, |
|---|
| 202 | BAPE_SpdifOutputHandle *pHandle /* [out] */ |
|---|
| 203 | ); |
|---|
| 204 | |
|---|
| 205 | /*************************************************************************** |
|---|
| 206 | Summary: |
|---|
| 207 | Close a SPDIF Output |
|---|
| 208 | ***************************************************************************/ |
|---|
| 209 | void BAPE_SpdifOutput_Close( |
|---|
| 210 | BAPE_SpdifOutputHandle handle |
|---|
| 211 | ); |
|---|
| 212 | |
|---|
| 213 | /*************************************************************************** |
|---|
| 214 | Summary: |
|---|
| 215 | Get SPDIF Output Settings |
|---|
| 216 | ***************************************************************************/ |
|---|
| 217 | void BAPE_SpdifOutput_GetSettings( |
|---|
| 218 | BAPE_SpdifOutputHandle handle, |
|---|
| 219 | BAPE_SpdifOutputSettings *pSettings /* [out] */ |
|---|
| 220 | ); |
|---|
| 221 | |
|---|
| 222 | /*************************************************************************** |
|---|
| 223 | Summary: |
|---|
| 224 | Set SPDIF Output Settings |
|---|
| 225 | ***************************************************************************/ |
|---|
| 226 | BERR_Code BAPE_SpdifOutput_SetSettings( |
|---|
| 227 | BAPE_SpdifOutputHandle handle, |
|---|
| 228 | const BAPE_SpdifOutputSettings *pSettings |
|---|
| 229 | ); |
|---|
| 230 | |
|---|
| 231 | /*************************************************************************** |
|---|
| 232 | Summary: |
|---|
| 233 | Get mixer output connector for SPDIF |
|---|
| 234 | ***************************************************************************/ |
|---|
| 235 | void BAPE_SpdifOutput_GetOutputPort( |
|---|
| 236 | BAPE_SpdifOutputHandle handle, |
|---|
| 237 | BAPE_OutputPort *pConnector /* [out] */ |
|---|
| 238 | ); |
|---|
| 239 | |
|---|
| 240 | /*************************************************************************** |
|---|
| 241 | Summary: |
|---|
| 242 | MAI (HDMI Output) Handle |
|---|
| 243 | ***************************************************************************/ |
|---|
| 244 | typedef struct BAPE_MaiOutput *BAPE_MaiOutputHandle; |
|---|
| 245 | |
|---|
| 246 | /*************************************************************************** |
|---|
| 247 | Summary: |
|---|
| 248 | MAI (HDMI Output) Settings |
|---|
| 249 | ***************************************************************************/ |
|---|
| 250 | typedef struct BAPE_MaiOutputSettings |
|---|
| 251 | { |
|---|
| 252 | BAPE_StereoMode stereoMode; /* Mode to handle stereo mixer ouptut. Ignored with compressed or multichannel input. */ |
|---|
| 253 | bool ditherEnabled; /* If true, a dither signal will be sent |
|---|
| 254 | out when there is no PCM data. Every |
|---|
| 255 | 192 samples, a zero PCM sample will be overwritten |
|---|
| 256 | with one. Non-zero or compressed samples are ignored. */ |
|---|
| 257 | BAPE_SpdifBurstType underflowBurst; /* A burst of the specified type will be sent |
|---|
| 258 | if the input underflows. */ |
|---|
| 259 | |
|---|
| 260 | bool useRawChannelStatus; /* If true, values from rawChannelStatus will be used instead of channelStatus */ |
|---|
| 261 | BAPE_SpdifChannelStatus channelStatus; |
|---|
| 262 | uint8_t rawChannelStatus[24]; /* Programs the channel status directly, sample rate and other values will not be set internally */ |
|---|
| 263 | } BAPE_MaiOutputSettings; |
|---|
| 264 | |
|---|
| 265 | /*************************************************************************** |
|---|
| 266 | Summary: |
|---|
| 267 | Get Default MAI (HDMI Output) Settings |
|---|
| 268 | ***************************************************************************/ |
|---|
| 269 | void BAPE_MaiOutput_GetDefaultSettings( |
|---|
| 270 | BAPE_MaiOutputSettings *pSettings |
|---|
| 271 | ); |
|---|
| 272 | |
|---|
| 273 | /*************************************************************************** |
|---|
| 274 | Summary: |
|---|
| 275 | Open a MAI Output (HDMI) |
|---|
| 276 | ***************************************************************************/ |
|---|
| 277 | BERR_Code BAPE_MaiOutput_Open( |
|---|
| 278 | BAPE_Handle deviceHandle, |
|---|
| 279 | unsigned index, |
|---|
| 280 | const BAPE_MaiOutputSettings *pSettings, |
|---|
| 281 | BAPE_MaiOutputHandle *pHandle /* [out] */ |
|---|
| 282 | ); |
|---|
| 283 | |
|---|
| 284 | /*************************************************************************** |
|---|
| 285 | Summary: |
|---|
| 286 | Close a MAI Output (HDMI) |
|---|
| 287 | ***************************************************************************/ |
|---|
| 288 | void BAPE_MaiOutput_Close( |
|---|
| 289 | BAPE_MaiOutputHandle handle |
|---|
| 290 | ); |
|---|
| 291 | |
|---|
| 292 | /*************************************************************************** |
|---|
| 293 | Summary: |
|---|
| 294 | Get MAI Output (HDMI) Settings |
|---|
| 295 | ***************************************************************************/ |
|---|
| 296 | void BAPE_MaiOutput_GetSettings( |
|---|
| 297 | BAPE_MaiOutputHandle handle, |
|---|
| 298 | BAPE_MaiOutputSettings *pSettings /* [out] */ |
|---|
| 299 | ); |
|---|
| 300 | |
|---|
| 301 | /*************************************************************************** |
|---|
| 302 | Summary: |
|---|
| 303 | Set MAI Output (HDMI) Settings |
|---|
| 304 | ***************************************************************************/ |
|---|
| 305 | BERR_Code BAPE_MaiOutput_SetSettings( |
|---|
| 306 | BAPE_MaiOutputHandle handle, |
|---|
| 307 | const BAPE_MaiOutputSettings *pSettings |
|---|
| 308 | ); |
|---|
| 309 | |
|---|
| 310 | /*************************************************************************** |
|---|
| 311 | Summary: |
|---|
| 312 | Get mixer output connector for MAI Output (HDMI) |
|---|
| 313 | ***************************************************************************/ |
|---|
| 314 | void BAPE_MaiOutput_GetOutputPort( |
|---|
| 315 | BAPE_MaiOutputHandle handle, |
|---|
| 316 | BAPE_OutputPort *pConnector /* [out] */ |
|---|
| 317 | ); |
|---|
| 318 | |
|---|
| 319 | /*************************************************************************** |
|---|
| 320 | Summary: |
|---|
| 321 | HDMI output interrupts |
|---|
| 322 | ***************************************************************************/ |
|---|
| 323 | typedef struct BAPE_MaiOutputInterruptHandlers |
|---|
| 324 | { |
|---|
| 325 | struct |
|---|
| 326 | { |
|---|
| 327 | void (*pCallback_isr)(void *pParam1, int param2, unsigned sampleRate); |
|---|
| 328 | void *pParam1; |
|---|
| 329 | int param2; |
|---|
| 330 | } sampleRate; |
|---|
| 331 | } BAPE_MaiOutputInterruptHandlers; |
|---|
| 332 | |
|---|
| 333 | /*************************************************************************** |
|---|
| 334 | Summary: |
|---|
| 335 | Get HDMI output interrupts |
|---|
| 336 | ***************************************************************************/ |
|---|
| 337 | void BAPE_MaiOutput_GetInterruptHandlers( |
|---|
| 338 | BAPE_MaiOutputHandle handle, |
|---|
| 339 | BAPE_MaiOutputInterruptHandlers *pInterrupts /* [out] */ |
|---|
| 340 | ); |
|---|
| 341 | |
|---|
| 342 | /*************************************************************************** |
|---|
| 343 | Summary: |
|---|
| 344 | Set HDMI output interrupts |
|---|
| 345 | ***************************************************************************/ |
|---|
| 346 | BERR_Code BAPE_MaiOutput_SetInterruptHandlers( |
|---|
| 347 | BAPE_MaiOutputHandle handle, |
|---|
| 348 | const BAPE_MaiOutputInterruptHandlers *pInterrupts |
|---|
| 349 | ); |
|---|
| 350 | |
|---|
| 351 | /*************************************************************************** |
|---|
| 352 | Summary: |
|---|
| 353 | I2S Output Handle |
|---|
| 354 | ***************************************************************************/ |
|---|
| 355 | typedef struct BAPE_I2sOutput *BAPE_I2sOutputHandle; |
|---|
| 356 | |
|---|
| 357 | /*************************************************************************** |
|---|
| 358 | Summary: |
|---|
| 359 | I2S Output Settings |
|---|
| 360 | ***************************************************************************/ |
|---|
| 361 | typedef struct BAPE_I2sOutputSettings |
|---|
| 362 | { |
|---|
| 363 | BAPE_StereoMode stereoMode; /* Mode to handle stereo mixer ouptut. */ |
|---|
| 364 | |
|---|
| 365 | BAPE_I2sJustification justification; /* Data Justification*/ |
|---|
| 366 | BAPE_I2sDataAlignment dataAlignment; /* Data Alignment */ |
|---|
| 367 | BAPE_I2sLRClockPolarity lrPolarity; /* LRCK polarity */ |
|---|
| 368 | BAPE_I2sSclkPolarity sclkPolarity; /* SCLK polarity */ |
|---|
| 369 | |
|---|
| 370 | BAPE_SclkRate sclkRate; /* Bit clock Rate in multiple of Fs */ |
|---|
| 371 | } BAPE_I2sOutputSettings; |
|---|
| 372 | |
|---|
| 373 | /*************************************************************************** |
|---|
| 374 | Summary: |
|---|
| 375 | Get Default I2S Output Settings |
|---|
| 376 | ***************************************************************************/ |
|---|
| 377 | void BAPE_I2sOutput_GetDefaultSettings( |
|---|
| 378 | BAPE_I2sOutputSettings *pSettings |
|---|
| 379 | ); |
|---|
| 380 | |
|---|
| 381 | /*************************************************************************** |
|---|
| 382 | Summary: |
|---|
| 383 | Open an I2S Output |
|---|
| 384 | ***************************************************************************/ |
|---|
| 385 | BERR_Code BAPE_I2sOutput_Open( |
|---|
| 386 | BAPE_Handle deviceHandle, |
|---|
| 387 | unsigned index, |
|---|
| 388 | const BAPE_I2sOutputSettings *pSettings, |
|---|
| 389 | BAPE_I2sOutputHandle *pHandle /* [out] */ |
|---|
| 390 | ); |
|---|
| 391 | |
|---|
| 392 | /*************************************************************************** |
|---|
| 393 | Summary: |
|---|
| 394 | Close an I2S Output |
|---|
| 395 | ***************************************************************************/ |
|---|
| 396 | void BAPE_I2sOutput_Close( |
|---|
| 397 | BAPE_I2sOutputHandle handle |
|---|
| 398 | ); |
|---|
| 399 | |
|---|
| 400 | /*************************************************************************** |
|---|
| 401 | Summary: |
|---|
| 402 | Get I2S Output Settings |
|---|
| 403 | ***************************************************************************/ |
|---|
| 404 | void BAPE_I2sOutput_GetSettings( |
|---|
| 405 | BAPE_I2sOutputHandle handle, |
|---|
| 406 | BAPE_I2sOutputSettings *pSettings /* [out] */ |
|---|
| 407 | ); |
|---|
| 408 | |
|---|
| 409 | /*************************************************************************** |
|---|
| 410 | Summary: |
|---|
| 411 | Set I2S Output Settings |
|---|
| 412 | ***************************************************************************/ |
|---|
| 413 | BERR_Code BAPE_I2sOutput_SetSettings( |
|---|
| 414 | BAPE_I2sOutputHandle handle, |
|---|
| 415 | const BAPE_I2sOutputSettings *pSettings |
|---|
| 416 | ); |
|---|
| 417 | |
|---|
| 418 | /*************************************************************************** |
|---|
| 419 | Summary: |
|---|
| 420 | Get mixer output connector for I2S |
|---|
| 421 | ***************************************************************************/ |
|---|
| 422 | void BAPE_I2sOutput_GetOutputPort( |
|---|
| 423 | BAPE_I2sOutputHandle handle, |
|---|
| 424 | BAPE_OutputPort *pConnector /* [out] */ |
|---|
| 425 | ); |
|---|
| 426 | |
|---|
| 427 | /*************************************************************************** |
|---|
| 428 | Summary: |
|---|
| 429 | Multichannel I2S Output Handle |
|---|
| 430 | ***************************************************************************/ |
|---|
| 431 | typedef struct BAPE_I2sMultiOutput *BAPE_I2sMultiOutputHandle; |
|---|
| 432 | |
|---|
| 433 | /*************************************************************************** |
|---|
| 434 | Summary: |
|---|
| 435 | Multichannel I2S Output Settings |
|---|
| 436 | ***************************************************************************/ |
|---|
| 437 | typedef struct BAPE_I2sMultiOutputSettings |
|---|
| 438 | { |
|---|
| 439 | BAPE_I2sMultiMode mode; /* Mode of operation, multichannel or stereo. |
|---|
| 440 | Must be set prior to BAPE_I2sMultiOutput_Open() |
|---|
| 441 | and cannot be changed on the fly. */ |
|---|
| 442 | |
|---|
| 443 | BAPE_I2sOutputSettings i2sSettings; /* I2S Settings */ |
|---|
| 444 | } BAPE_I2sMultiOutputSettings; |
|---|
| 445 | |
|---|
| 446 | /*************************************************************************** |
|---|
| 447 | Summary: |
|---|
| 448 | Get Default Multichannel I2S Output Settings |
|---|
| 449 | ***************************************************************************/ |
|---|
| 450 | void BAPE_I2sMultiOutput_GetDefaultSettings( |
|---|
| 451 | BAPE_I2sMultiOutputSettings *pSettings |
|---|
| 452 | ); |
|---|
| 453 | |
|---|
| 454 | /*************************************************************************** |
|---|
| 455 | Summary: |
|---|
| 456 | Open a Multichannel I2S Output |
|---|
| 457 | ***************************************************************************/ |
|---|
| 458 | BERR_Code BAPE_I2sMultiOutput_Open( |
|---|
| 459 | BAPE_Handle deviceHandle, |
|---|
| 460 | unsigned index, |
|---|
| 461 | const BAPE_I2sMultiOutputSettings *pSettings, |
|---|
| 462 | BAPE_I2sMultiOutputHandle *pHandle /* [out] */ |
|---|
| 463 | ); |
|---|
| 464 | |
|---|
| 465 | /*************************************************************************** |
|---|
| 466 | Summary: |
|---|
| 467 | Close a Multichannel I2S Output |
|---|
| 468 | ***************************************************************************/ |
|---|
| 469 | void BAPE_I2sMultiOutput_Close( |
|---|
| 470 | BAPE_I2sMultiOutputHandle handle |
|---|
| 471 | ); |
|---|
| 472 | |
|---|
| 473 | /*************************************************************************** |
|---|
| 474 | Summary: |
|---|
| 475 | Get Multichannel I2S Output Settings |
|---|
| 476 | ***************************************************************************/ |
|---|
| 477 | void BAPE_I2sMultiOutput_GetSettings( |
|---|
| 478 | BAPE_I2sMultiOutputHandle handle, |
|---|
| 479 | BAPE_I2sMultiOutputSettings *pSettings /* [out] */ |
|---|
| 480 | ); |
|---|
| 481 | |
|---|
| 482 | /*************************************************************************** |
|---|
| 483 | Summary: |
|---|
| 484 | Set Multichannel I2S Output Settings |
|---|
| 485 | ***************************************************************************/ |
|---|
| 486 | BERR_Code BAPE_I2sMultiOutput_SetSettings( |
|---|
| 487 | BAPE_I2sMultiOutputHandle handle, |
|---|
| 488 | const BAPE_I2sMultiOutputSettings *pSettings |
|---|
| 489 | ); |
|---|
| 490 | |
|---|
| 491 | /*************************************************************************** |
|---|
| 492 | Summary: |
|---|
| 493 | Get mixer output connector for Multichannel I2S or the first stereo pair |
|---|
| 494 | if set to stereo mode. |
|---|
| 495 | ***************************************************************************/ |
|---|
| 496 | void BAPE_I2sMultiOutput_GetOutputPort( |
|---|
| 497 | BAPE_I2sMultiOutputHandle handle, |
|---|
| 498 | BAPE_OutputPort *pConnector /* [out] */ |
|---|
| 499 | ); |
|---|
| 500 | |
|---|
| 501 | /*************************************************************************** |
|---|
| 502 | Summary: |
|---|
| 503 | Get mixer output connector for an individual stereo pair on Multichannel I2S. |
|---|
| 504 | Only supported if BAPE_I2sMultiOutputSettings.mode is set to |
|---|
| 505 | BAPE_I2sMultiMode_eStereo. |
|---|
| 506 | ***************************************************************************/ |
|---|
| 507 | void BAPE_I2sMultiOutput_GetStereoOutputPort( |
|---|
| 508 | BAPE_I2sMultiOutputHandle handle, |
|---|
| 509 | BAPE_ChannelPair channelPair, |
|---|
| 510 | BAPE_OutputPort *pConnector /* [out] */ |
|---|
| 511 | ); |
|---|
| 512 | |
|---|
| 513 | /*************************************************************************** |
|---|
| 514 | Summary: |
|---|
| 515 | RF Modulator Handle |
|---|
| 516 | ***************************************************************************/ |
|---|
| 517 | typedef struct BAPE_RfMod *BAPE_RfModHandle; |
|---|
| 518 | |
|---|
| 519 | /*************************************************************************** |
|---|
| 520 | Summary: |
|---|
| 521 | RF Modulator Settings |
|---|
| 522 | ***************************************************************************/ |
|---|
| 523 | typedef struct BAPE_RfModSettings |
|---|
| 524 | { |
|---|
| 525 | BAPE_OutputPort master; /* The RF Modulator must slave to a DAC output */ |
|---|
| 526 | bool muted; /* If true, the RF Modulator will be muted */ |
|---|
| 527 | } BAPE_RfModSettings; |
|---|
| 528 | |
|---|
| 529 | /*************************************************************************** |
|---|
| 530 | Summary: |
|---|
| 531 | Get Default RF Modulator Settings |
|---|
| 532 | ***************************************************************************/ |
|---|
| 533 | void BAPE_RfMod_GetDefaultSettings( |
|---|
| 534 | BAPE_RfModSettings *pSettings |
|---|
| 535 | ); |
|---|
| 536 | |
|---|
| 537 | /*************************************************************************** |
|---|
| 538 | Summary: |
|---|
| 539 | Open an RF Modulator |
|---|
| 540 | ***************************************************************************/ |
|---|
| 541 | BERR_Code BAPE_RfMod_Open( |
|---|
| 542 | BAPE_Handle deviceHandle, |
|---|
| 543 | unsigned index, |
|---|
| 544 | const BAPE_RfModSettings *pSettings, |
|---|
| 545 | BAPE_RfModHandle *pHandle /* [out] */ |
|---|
| 546 | ); |
|---|
| 547 | |
|---|
| 548 | /*************************************************************************** |
|---|
| 549 | Summary: |
|---|
| 550 | Close an RF Modulator |
|---|
| 551 | ***************************************************************************/ |
|---|
| 552 | void BAPE_RfMod_Close( |
|---|
| 553 | BAPE_RfModHandle handle |
|---|
| 554 | ); |
|---|
| 555 | |
|---|
| 556 | /*************************************************************************** |
|---|
| 557 | Summary: |
|---|
| 558 | Get RF Modulator Settings |
|---|
| 559 | ***************************************************************************/ |
|---|
| 560 | void BAPE_RfMod_GetSettings( |
|---|
| 561 | BAPE_RfModHandle handle, |
|---|
| 562 | BAPE_RfModSettings *pSettings /* [out] */ |
|---|
| 563 | ); |
|---|
| 564 | |
|---|
| 565 | /*************************************************************************** |
|---|
| 566 | Summary: |
|---|
| 567 | Set RF Modulator Settings |
|---|
| 568 | ***************************************************************************/ |
|---|
| 569 | BERR_Code BAPE_RfMod_SetSettings( |
|---|
| 570 | BAPE_RfModHandle handle, |
|---|
| 571 | const BAPE_RfModSettings *pSettings |
|---|
| 572 | ); |
|---|
| 573 | |
|---|
| 574 | /*************************************************************************** |
|---|
| 575 | Summary: |
|---|
| 576 | Audio Return Channel Handle |
|---|
| 577 | ***************************************************************************/ |
|---|
| 578 | typedef struct BAPE_AudioReturnChannel *BAPE_AudioReturnChannelHandle; |
|---|
| 579 | |
|---|
| 580 | /*************************************************************************** |
|---|
| 581 | Summary: |
|---|
| 582 | Audio Return Channel Settings |
|---|
| 583 | ***************************************************************************/ |
|---|
| 584 | typedef struct BAPE_AudioReturnChannelSettings |
|---|
| 585 | { |
|---|
| 586 | BAPE_OutputPort master; /* The Audio Return Channel must slave to a Spdif output */ |
|---|
| 587 | bool muted; /* If true, the Audio Return Channel will be muted */ |
|---|
| 588 | } BAPE_AudioReturnChannelSettings; |
|---|
| 589 | |
|---|
| 590 | /*************************************************************************** |
|---|
| 591 | Summary: |
|---|
| 592 | Get Default Audio Return Channel Settings |
|---|
| 593 | ***************************************************************************/ |
|---|
| 594 | void BAPE_AudioReturnChannel_GetDefaultSettings( |
|---|
| 595 | BAPE_AudioReturnChannelSettings *pSettings |
|---|
| 596 | ); |
|---|
| 597 | |
|---|
| 598 | /*************************************************************************** |
|---|
| 599 | Summary: |
|---|
| 600 | Open an Audio Return Channel |
|---|
| 601 | ***************************************************************************/ |
|---|
| 602 | BERR_Code BAPE_AudioReturnChannel_Open( |
|---|
| 603 | BAPE_Handle deviceHandle, |
|---|
| 604 | unsigned index, |
|---|
| 605 | const BAPE_AudioReturnChannelSettings *pSettings, |
|---|
| 606 | BAPE_AudioReturnChannelHandle *pHandle /* [out] */ |
|---|
| 607 | ); |
|---|
| 608 | |
|---|
| 609 | /*************************************************************************** |
|---|
| 610 | Summary: |
|---|
| 611 | Close an Audio Return Channel |
|---|
| 612 | ***************************************************************************/ |
|---|
| 613 | void BAPE_AudioReturnChannel_Close( |
|---|
| 614 | BAPE_AudioReturnChannelHandle handle |
|---|
| 615 | ); |
|---|
| 616 | |
|---|
| 617 | /*************************************************************************** |
|---|
| 618 | Summary: |
|---|
| 619 | Get Audio Return Channel Settings |
|---|
| 620 | ***************************************************************************/ |
|---|
| 621 | void BAPE_AudioReturnChannel_GetSettings( |
|---|
| 622 | BAPE_AudioReturnChannelHandle handle, |
|---|
| 623 | BAPE_AudioReturnChannelSettings *pSettings /* [out] */ |
|---|
| 624 | ); |
|---|
| 625 | |
|---|
| 626 | /*************************************************************************** |
|---|
| 627 | Summary: |
|---|
| 628 | Set Audio Return Channel Settings |
|---|
| 629 | ***************************************************************************/ |
|---|
| 630 | BERR_Code BAPE_AudioReturnChannel_SetSettings( |
|---|
| 631 | BAPE_AudioReturnChannelHandle handle, |
|---|
| 632 | const BAPE_AudioReturnChannelSettings *pSettings |
|---|
| 633 | ); |
|---|
| 634 | |
|---|
| 635 | /*************************************************************************** |
|---|
| 636 | Summary: |
|---|
| 637 | Dummy Output Handle |
|---|
| 638 | ***************************************************************************/ |
|---|
| 639 | typedef struct BAPE_DummyOutput *BAPE_DummyOutputHandle; |
|---|
| 640 | |
|---|
| 641 | /*************************************************************************** |
|---|
| 642 | Summary: |
|---|
| 643 | Dummy Output Settings |
|---|
| 644 | ***************************************************************************/ |
|---|
| 645 | typedef struct BAPE_DummyOutputOpenSettings |
|---|
| 646 | { |
|---|
| 647 | BAPE_MultichannelFormat maxMultichannelFormat; /* Set to the worst case multichannel format |
|---|
| 648 | you would like to handle. Controls the |
|---|
| 649 | number of HW resources allocated. */ |
|---|
| 650 | } BAPE_DummyOutputOpenSettings; |
|---|
| 651 | |
|---|
| 652 | /*************************************************************************** |
|---|
| 653 | Summary: |
|---|
| 654 | Get Default Dummy Output Settings |
|---|
| 655 | ***************************************************************************/ |
|---|
| 656 | void BAPE_DummyOutput_GetDefaultOpenSettings( |
|---|
| 657 | BAPE_DummyOutputOpenSettings *pSettings |
|---|
| 658 | ); |
|---|
| 659 | |
|---|
| 660 | /*************************************************************************** |
|---|
| 661 | Summary: |
|---|
| 662 | Open a Dummy Output |
|---|
| 663 | ***************************************************************************/ |
|---|
| 664 | BERR_Code BAPE_DummyOutput_Open( |
|---|
| 665 | BAPE_Handle deviceHandle, |
|---|
| 666 | unsigned index, |
|---|
| 667 | const BAPE_DummyOutputOpenSettings *pSettings, |
|---|
| 668 | BAPE_DummyOutputHandle *pHandle /* [out] */ |
|---|
| 669 | ); |
|---|
| 670 | |
|---|
| 671 | /*************************************************************************** |
|---|
| 672 | Summary: |
|---|
| 673 | Close a Dummy Output |
|---|
| 674 | ***************************************************************************/ |
|---|
| 675 | void BAPE_DummyOutput_Close( |
|---|
| 676 | BAPE_DummyOutputHandle handle |
|---|
| 677 | ); |
|---|
| 678 | |
|---|
| 679 | /*************************************************************************** |
|---|
| 680 | Summary: |
|---|
| 681 | Get mixer output connector for a Dummy Output |
|---|
| 682 | ***************************************************************************/ |
|---|
| 683 | void BAPE_DummyOutput_GetOutputPort( |
|---|
| 684 | BAPE_DummyOutputHandle handle, |
|---|
| 685 | BAPE_OutputPort *pConnector /* [out] */ |
|---|
| 686 | ); |
|---|
| 687 | |
|---|
| 688 | #endif /* #ifndef BAPE_OUTPUT_H_ */ |
|---|
| 689 | |
|---|