1 //<MStar Software> 2 //****************************************************************************** 3 // MStar Software 4 // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved. 5 // All software, firmware and related documentation herein ("MStar Software") are 6 // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by 7 // law, including, but not limited to, copyright law and international treaties. 8 // Any use, modification, reproduction, retransmission, or republication of all 9 // or part of MStar Software is expressly prohibited, unless prior written 10 // permission has been granted by MStar. 11 // 12 // By accessing, browsing and/or using MStar Software, you acknowledge that you 13 // have read, understood, and agree, to be bound by below terms ("Terms") and to 14 // comply with all applicable laws and regulations: 15 // 16 // 1. MStar shall retain any and all right, ownership and interest to MStar 17 // Software and any modification/derivatives thereof. 18 // No right, ownership, or interest to MStar Software and any 19 // modification/derivatives thereof is transferred to you under Terms. 20 // 21 // 2. You understand that MStar Software might include, incorporate or be 22 // supplied together with third party`s software and the use of MStar 23 // Software may require additional licenses from third parties. 24 // Therefore, you hereby agree it is your sole responsibility to separately 25 // obtain any and all third party right and license necessary for your use of 26 // such third party`s software. 27 // 28 // 3. MStar Software and any modification/derivatives thereof shall be deemed as 29 // MStar`s confidential information and you agree to keep MStar`s 30 // confidential information in strictest confidence and not disclose to any 31 // third party. 32 // 33 // 4. MStar Software is provided on an "AS IS" basis without warranties of any 34 // kind. Any warranties are hereby expressly disclaimed by MStar, including 35 // without limitation, any warranties of merchantability, non-infringement of 36 // intellectual property rights, fitness for a particular purpose, error free 37 // and in conformity with any international standard. You agree to waive any 38 // claim against MStar for any loss, damage, cost or expense that you may 39 // incur related to your use of MStar Software. 40 // In no event shall MStar be liable for any direct, indirect, incidental or 41 // consequential damages, including without limitation, lost of profit or 42 // revenues, lost or damage of data, and unauthorized system use. 43 // You agree that this Section 4 shall still apply without being affected 44 // even if MStar Software has been modified by MStar in accordance with your 45 // request or instruction for your use, except otherwise agreed by both 46 // parties in writing. 47 // 48 // 5. If requested, MStar may from time to time provide technical supports or 49 // services in relation with MStar Software to you for your use of 50 // MStar Software in conjunction with your or your customer`s product 51 // ("Services"). 52 // You understand and agree that, except otherwise agreed by both parties in 53 // writing, Services are provided on an "AS IS" basis and the warranty 54 // disclaimer set forth in Section 4 above shall apply. 55 // 56 // 6. Nothing contained herein shall be construed as by implication, estoppels 57 // or otherwise: 58 // (a) conferring any license or right to use MStar name, trademark, service 59 // mark, symbol or any other identification; 60 // (b) obligating MStar or any of its affiliates to furnish any person, 61 // including without limitation, you and your customers, any assistance 62 // of any kind whatsoever, or any information; or 63 // (c) conferring any license or right under any intellectual property right. 64 // 65 // 7. These terms shall be governed by and construed in accordance with the laws 66 // of Taiwan, R.O.C., excluding its conflict of law rules. 67 // Any and all dispute arising out hereof or related hereto shall be finally 68 // settled by arbitration referred to the Chinese Arbitration Association, 69 // Taipei in accordance with the ROC Arbitration Law and the Arbitration 70 // Rules of the Association by three (3) arbitrators appointed in accordance 71 // with the said Rules. 72 // The place of arbitration shall be in Taipei, Taiwan and the language shall 73 // be English. 74 // The arbitration award shall be final and binding to both parties. 75 // 76 //****************************************************************************** 77 //<MStar Software> 78 #ifndef _AUR2_H_ 79 #define _AUR2_H_ 80 81 // enum for r2 decoder command 82 typedef enum 83 { 84 AU_DEC_R2_CMD_STOP = 0x0, 85 AU_DEC_R2_CMD_PLAY = 0x1, 86 AU_DEC_R2_CMD_PLAYFILETSP = 0x2, 87 AU_DEC_R2_CMD_PLAYUNI = 0x3, 88 AU_DEC_R2_CMD_PLAYFILE = 0x4, 89 AU_DEC_R2_CMD_PLAY_AD = 0x10, 90 AU_DEC_R2_CMD_STARTBROWSE = 0x20, 91 AU_DEC_R2_CMD_PAUSE = 0x40, 92 AU_DEC_R2_CMD_SKIP = 0x6, 93 AU_DEC_R2_CMD_FREERUN = 0x80, //if not free_run, just AV_sync 94 } AU_DEC_R2_CMD; 95 96 typedef enum 97 { 98 R2_DECCMD_STOP, 99 R2_DECCMD_PAUSE, 100 R2_DECCMD_PLAY, 101 } R2_DEC_PLAYCMD; 102 103 typedef enum 104 { 105 adec_type_dummy, 106 adec_type_ac3, 107 adec_type_ac3p, 108 adec_type_mpeg, 109 adec_type_dts, 110 adec_type_aac, 111 adec_type_aacp, 112 adec_type_xpcm, 113 adec_type_vorbis, 114 adec_type_flac, 115 adec_type_wma, 116 adec_type_wmap, 117 adec_type_ra8, 118 adec_type_gaac, 119 adec_type_dolby_truhd_bypass, 120 adec_type_dolby_dtshd_ado, 121 adec_type_dra, 122 adec_type_reserved = 0x1F, //Maxium Number of codec type 123 adec_type_regmask = 0x1F, //Maxium Bit use for register 124 } adec_type; 125 126 typedef enum 127 { 128 asnd_dsp_type_dummy, 129 asnd_dsp_type_dde=1, 130 asnd_dsp_type_MS10dde=2, 131 asnd_dsp_type_dtst=3, 132 asnd_dsp_type_fmtx=4, 133 asnd_dsp_type_btscencode=5, 134 asnd_dsp_type_reserved, 135 } asnd_dsp_type; 136 137 typedef enum 138 { 139 adec_capa_mpeg = 1 << adec_type_mpeg, 140 adec_capa_ac3 = 1 << adec_type_ac3, 141 adec_capa_ac3p = 1 << adec_type_ac3p, 142 adec_capa_dts = 1 << adec_type_dts, 143 adec_capa_aac = 1 << adec_type_aac, 144 adec_capa_aacp = 1 << adec_type_aacp, 145 adec_capa_xpcm = 1 << adec_type_xpcm, 146 adec_capa_vorbis = 1 << adec_type_vorbis, 147 adec_capa_flac = 1 << adec_type_flac, 148 adec_capa_wma = 1 << adec_type_wma, 149 adec_capa_wmap = 1 << adec_type_wmap, 150 adec_capa_ra8 = 1 << adec_type_ra8, 151 adec_capa_gaac = 1 << adec_type_gaac, 152 adec_capa_dra = 1<< adec_type_dra, 153 adec_capa_reserved = 1 << adec_type_reserved, 154 } adec_capability; 155 156 typedef enum 157 { 158 aenc_type_dummy, 159 aenc_type_mpeg, 160 aenc_type_ac3, 161 aenc_type_dts, 162 163 aenc_type_reserved = 0x1F, 164 } aenc_type; 165 166 typedef enum 167 { 168 aenc_capa_mpeg = 1 << aenc_type_mpeg, 169 aenc_capa_ac3 = 1 << aenc_type_ac3, 170 aenc_capa_dts = 1 << aenc_type_dts, 171 172 aenc_capa_reserved = 1 << aenc_type_reserved, 173 } aenc_capability; 174 175 typedef enum 176 { 177 aase_type_dummy, 178 aase_type_srs, 179 aase_type_srsTshd, 180 aase_type_srsApollo, 181 aase_type_srsTheater, 182 183 aase_type_customer = 0x1E, 184 aase_type_reserverd = 0x1F, 185 } aase_type; 186 187 typedef enum 188 { 189 aase_capa_srs = 1 << aase_type_srs, 190 aase_capa_srsTshd = 1 << aase_type_srsTshd, 191 aase_capa_srsApollo = 1 << aase_type_srsApollo, 192 aase_capa_srsTheater = 1 << aase_type_srsTheater, 193 194 aase_capa_customer= 1 << aase_type_customer, 195 aase_capa_reserved= 1 << aase_type_reserverd, 196 } aase_capability; 197 198 typedef enum 199 { 200 adec_ctrl_stop, 201 adec_ctrl_play, 202 adec_ctrl_pause, 203 adec_ctrl_ff2x, 204 adec_ctrl_ff4x, 205 } adec_ctrl; 206 207 typedef enum 208 { 209 aenc_ctrl_stop, 210 aenc_ctrl_play, 211 } aenc_ctrl; 212 213 typedef enum 214 { 215 adec_mode_stereo, 216 adec_mode_LL, 217 adec_mode_RR, 218 adec_mode_mixed, 219 220 } adec_sound_mode; 221 222 typedef enum 223 { 224 adec_drc_lineMode, 225 adec_drc_RfMode, 226 } adec_drcMode; 227 228 typedef enum 229 { 230 adec_dmx_LoRo, 231 adec_dmx_LtRt, 232 233 } adec_dmxMode; 234 235 typedef enum 236 { 237 adec_unlocked, 238 adec_locked, 239 adec_ip_check_fail, 240 241 } adec_status; 242 243 typedef enum 244 { 245 adec_ch_mono, 246 adec_ch_dual_mono, 247 adec_ch_joint_stereo, 248 adec_ch_stereo, 249 adec_ch_multi, 250 } adec_acmod; 251 252 typedef enum 253 { 254 adec_smpRate_48K, 255 adec_smpRate_44K, 256 adec_smpRate_32K, 257 } adec_smpRate; 258 259 typedef enum 260 { 261 ADEC1 = 0x00, //audio decoder 1 262 ADEC2 = 0x01, //audio decoder 2 263 ADEC3 = 0x02, //audio decoder 3 264 265 ABSE = 0x00, //audio basic sound effect 266 267 AASE1 = 0x00, //audio advanced sound effect 1 268 AASE2 = 0x01, //audio advanced sound effect 2 269 AASE3 = 0x02, //audio advanced sound effect 3 270 271 AIO = 0x00, //audio IO 272 } Audio_id; 273 274 typedef enum 275 { 276 //*********************************************** 277 // Audio decoder param 278 //*********************************************** 279 AUR2_CommParam_ADEC_setAudioDecoder = 0x0000, 280 AUR2_CommParam_ADEC_audioCtrl, 281 AUR2_CommParam_ADEC_DualCtrl, 282 AUR2_CommParam_ADEC_SoundMode, 283 AUR2_CommParam_ADEC_dmxMode, 284 AUR2_CommParam_ADEC_drcMode, 285 AUR2_CommParam_ADEC_drcHighCut, 286 AUR2_CommParam_ADEC_drcLowBosst, 287 AUR2_CommParam_ADEC_mute, 288 289 AUR2_CommParam_ADEC_mpeg_xxxx = 0x0100, 290 AUR2_CommParam_ADEC_mpeg_xxxx2, 291 292 AUR2_CommParam_ADEC_ac3_xxxx = 0x0200, 293 AUR2_CommParam_ADEC_ac3_xxxx2, 294 295 AUR2_CommParam_ADEC_aac_xxxx = 0x0300, 296 AUR2_CommParam_ADEC_aac_xxxx2, 297 298 AUR2_CommParam_ADEC_aacp_xxxx = 0x0400, 299 AUR2_CommParam_ADEC_aacp_xxxx2, 300 301 AUR2_CommParam_ADEC_wma_xxxx = 0x0500, 302 AUR2_CommParam_ADEC_wma_xxxx2, 303 304 AUR2_CommParam_ADEC_lastcmd = 0x3FFF, 305 306 //*********************************************** 307 // Advanced sound effect 308 //*********************************************** 309 AUR2_CommParam_AASE_setAaseType = 0x4000, 310 AUR2_CommParam_AASE_enableAase, 311 312 AUR2_CommParam_AASE_SRSHD_HdEn = 0x4100, 313 AUR2_CommParam_AASE_SRSHD_truBassEn, 314 AUR2_CommParam_AASE_SRSHD_definitionEn, 315 AUR2_CommParam_AASE_SRSHD_dialogClarityEn, 316 AUR2_CommParam_AASE_SRSHD_inputMode, 317 AUR2_CommParam_AASE_SRSHD_outputMode, 318 AUR2_CommParam_AASE_SRSHD_spkrSize, 319 AUR2_CommParam_AASE_SRSHD_truBassCtrl, 320 AUR2_CommParam_AASE_SRSHD_definitionCtrl, 321 AUR2_CommParam_AASE_SRSHD_focusCtrl, 322 AUR2_CommParam_AASE_SRSHD_surrLevel, 323 AUR2_CommParam_AASE_SRSHD_inputGain, 324 AUR2_CommParam_AASE_SRSHD_outputGain, 325 326 AUR2_CommParam_AASE_SRS_Apollo_processEn = 0x4200, 327 AUR2_CommParam_AASE_SRS_Apollo_InputGain, 328 AUR2_CommParam_AASE_SRS_Apollo_OutputGain, 329 AUR2_CommParam_AASE_SRS_Apollo_BypassGain, 330 AUR2_CommParam_AASE_SRS_Apollo_HeadroomGain, 331 AUR2_CommParam_AASE_SRS_Apollo_HdEn = 0x4210, 332 AUR2_CommParam_AASE_SRS_Apollo_HdOutputMode, 333 AUR2_CommParam_AASE_SRS_Apollo_HdSndLevelCtrl, 334 AUR2_CommParam_AASE_SRS_Apollo_HdInputGain, 335 AUR2_CommParam_AASE_SRS_Apollo_HdOutputGain, 336 AUR2_CommParam_AASE_SRS_Apollo_HdBypassGain, 337 AUR2_CommParam_AASE_SRS_Apollo_HddialogClarityEn = 0x4220, 338 AUR2_CommParam_AASE_SRS_Apollo_HddialogClarityCtrl, 339 AUR2_CommParam_AASE_SRS_Apollo_HddefintionEn = 0x4230, 340 AUR2_CommParam_AASE_SRS_Apollo_HddefintionCtrl, 341 AUR2_CommParam_AASE_SRS_Apollo_HdtruBassEn = 0x4240, 342 AUR2_CommParam_AASE_SRS_Apollo_HdtruBassProcessMode, 343 AUR2_CommParam_AASE_SRS_Apollo_HdtruBassFrontCtrl, 344 AUR2_CommParam_AASE_SRS_Apollo_HdtruBassSpkSize, 345 AUR2_CommParam_AASE_SRS_Apollo_hardlimiterEn = 0x4250, 346 AUR2_CommParam_AASE_SRS_Apollo_hardlimiterCtrl, 347 AUR2_CommParam_AASE_SRS_Apollo_hardlimiterdelaylength, 348 AUR2_CommParam_AASE_SRS_Apollo_hardlimiterBoost, 349 AUR2_CommParam_AASE_SRS_Apollo_truvolumeEn = 0x4260, 350 AUR2_CommParam_AASE_SRS_Apollo_truvolRefLevel, 351 AUR2_CommParam_AASE_SRS_Apollo_truvolspkSize, 352 AUR2_CommParam_AASE_SRS_Apollo_truvolInputGain, 353 AUR2_CommParam_AASE_SRS_Apollo_truvolOutGain, 354 AUR2_CommParam_AASE_SRS_Apollo_truvolMaxGain, 355 AUR2_CommParam_AASE_SRS_Apollo_truvolBlockSize, 356 AUR2_CommParam_AASE_SRS_Apollo_truvolnoiseManagerEn = 0x4270, 357 AUR2_CommParam_AASE_SRS_Apollo_truvolnoiseManagerThd, 358 AUR2_CommParam_AASE_SRS_Apollo_truvolCalibrate, 359 AUR2_CommParam_AASE_SRS_Apollo_PEQleftEn = 0x4280, 360 AUR2_CommParam_AASE_SRS_Apollo_PEQleftnumBands, 361 AUR2_CommParam_AASE_SRS_Apollo_PEQleftBandEn = 0x4290, 362 AUR2_CommParam_AASE_SRS_Apollo_PEQrightEn = 0x42A0, 363 AUR2_CommParam_AASE_SRS_Apollo_PEQrightnumBands, 364 AUR2_CommParam_AASE_SRS_Apollo_PEQrightBandEn = 0x42B0, 365 AUR2_CommParam_AASE_SRS_Apollo_HPFEn = 0x42C0, 366 AUR2_CommParam_AASE_SRS_Apollo_GEQEn = 0x42D0, 367 AUR2_CommParam_AASE_SRS_Apollo_GEQBandGain1, 368 AUR2_CommParam_AASE_SRS_Apollo_GEQBandGain2, 369 AUR2_CommParam_AASE_SRS_Apollo_GEQBandGain3, 370 AUR2_CommParam_AASE_SRS_Apollo_GEQBandGain4, 371 AUR2_CommParam_AASE_SRS_Apollo_GEQBandGain5, 372 AUR2_CommParam_AASE_SRS_Apollo_trudialogEn = 0x42E0, 373 AUR2_CommParam_AASE_SRS_Apollo_trudialogInputGain, 374 AUR2_CommParam_AASE_SRS_Apollo_trudialogOutputGain, 375 AUR2_CommParam_AASE_SRS_Apollo_trudialogProcessGain, 376 AUR2_CommParam_AASE_SRS_Apollo_trudialogClarityEn = 0x42F0, 377 AUR2_CommParam_AASE_SRS_Apollo_trudialogClarityGain, 378 AUR2_CommParam_AASE_SRS_Apollo_trudialogClarityThreshold, 379 380 AUR2_CommParam_AASE_SRS_Theater_processEn = 0x4300, 381 AUR2_CommParam_AASE_SRS_Theater_InputGain, 382 AUR2_CommParam_AASE_SRS_Theater_OutputGain, 383 AUR2_CommParam_AASE_SRS_Theater_BypassGain, 384 AUR2_CommParam_AASE_SRS_Theater_HeadroomGain, 385 AUR2_CommParam_AASE_SRS_Theater_InputMode, 386 AUR2_CommParam_AASE_SRS_Theater_CC3D_Process_Path, 387 AUR2_CommParam_AASE_SRS_Theater_HPFEn = 0x4310, 388 AUR2_CommParam_AASE_SRS_Theater_truvolHDEn = 0x4320, 389 AUR2_CommParam_AASE_SRS_Theater_truvolHDInputGain, 390 AUR2_CommParam_AASE_SRS_Theater_truvolHDOutGain, 391 AUR2_CommParam_AASE_SRS_Theater_truvolHDBypassGain, 392 AUR2_CommParam_AASE_SRS_Theater_truvolHDMode, 393 AUR2_CommParam_AASE_SRS_Theater_truvolHDMaxGainControl, 394 AUR2_CommParam_AASE_SRS_Theater_truvolHDNormalizerEnable, 395 AUR2_CommParam_AASE_SRS_Theater_truvolHDNormThresh, 396 AUR2_CommParam_AASE_SRS_Theater_truvolHDSmoothEnable, 397 AUR2_CommParam_AASE_SRS_Theater_truvolHDLKFS, 398 AUR2_CommParam_AASE_SRS_Theater_CSEn = 0x4330, 399 AUR2_CommParam_AASE_SRS_Theater_CSInputGain, 400 AUR2_CommParam_AASE_SRS_Theater_CSProcessingMode, 401 AUR2_CommParam_AASE_SRS_Theater_CSLROutputGain, 402 AUR2_CommParam_AASE_SRS_Theater_CSLsRsOutputGain, 403 AUR2_CommParam_AASE_SRS_Theater_CSCenterOutputGain, 404 AUR2_CommParam_AASE_SRS_Theater_trudialogEn = 0x4340, 405 AUR2_CommParam_AASE_SRS_Theater_trudialogInputGain, 406 AUR2_CommParam_AASE_SRS_Theater_trudialogOutputGain, 407 AUR2_CommParam_AASE_SRS_Theater_trudialogBypassGain, 408 AUR2_CommParam_AASE_SRS_Theater_trudialogProcessGain, 409 AUR2_CommParam_AASE_SRS_Theater_trudialogClarityGain, 410 411 AUR2_CommParam_AASE_SRS_Theater_TSHD_En = 0x4350, 412 AUR2_CommParam_AASE_SRS_Theater_tshd_input_gain, 413 AUR2_CommParam_AASE_SRS_Theater_tshd_output_gain, 414 AUR2_CommParam_AASE_SRS_Theater_TSHD_Sur_En = 0x4360, 415 AUR2_CommParam_AASE_SRS_Theater_tshd_surround_level_ctrl, 416 AUR2_CommParam_AASE_SRS_Theater_TSHD_Definition_En = 0x4370, 417 AUR2_CommParam_AASE_SRS_Theater_tshd_definition_ctrl, 418 AUR2_CommParam_AASE_SRS_Theater_TSHD_DialogClarity_En = 0x4380, 419 AUR2_CommParam_AASE_SRS_Theater_tshd_dialog_clarity_ctrl, 420 AUR2_CommParam_AASE_SRS_Theater_TSHD_TrubassFront_En = 0x4390, 421 AUR2_CommParam_AASE_SRS_Theater_tshd_trubass_front_ctrl, 422 AUR2_CommParam_AASE_SRS_Theater_TSHD_Trubass_level_indep_En = 0x43A0, 423 AUR2_CommParam_AASE_SRS_Theater_tshd_trubass_speaker_size, 424 AUR2_CommParam_AASE_SRS_Theater_tshd_trubass_compressor_ctrl, 425 AUR2_CommParam_AASE_SRS_Theater_tshd_trubass_process_mode, 426 AUR2_CommParam_AASE_SRS_Theater_tshd_trubass_speaker_audio, 427 AUR2_CommParam_AASE_SRS_Theater_tshd_trubass_speaker_analysis, 428 AUR2_CommParam_AASE_SRS_Theater_HPF_End_En = 0x43B0, 429 AUR2_CommParam_AASE_SRS_Theater_HL_En = 0x43C0, 430 AUR2_CommParam_AASE_SRS_Theater_HL_limit_ctrl, 431 AUR2_CommParam_AASE_SRS_Theater_HL_boost_gain, 432 433 AUR2_CommParam_AASE_SRS_Theater_CC3D_En = 0x43D0, 434 AUR2_CommParam_AASE_SRS_Theater_CC3D_DepthProcessing_En, 435 AUR2_CommParam_AASE_SRS_Theater_CC3D_3DSurroundBoost_En, 436 AUR2_CommParam_AASE_SRS_Theater_CC3D_TSHD_Mix_En, 437 AUR2_CommParam_AASE_SRS_Theater_CC3D_Fade_En, 438 AUR2_CommParam_AASE_SRS_Theater_CC3D_InputGain, 439 AUR2_CommParam_AASE_SRS_Theater_CC3D_OutputGain, 440 AUR2_CommParam_AASE_SRS_Theater_CC3D_BypassGain, 441 AUR2_CommParam_AASE_SRS_Theater_CC3D_TSHD_SurMode, 442 AUR2_CommParam_AASE_SRS_Theater_CC3D_TSHD_MixFadeCtrl, 443 AUR2_CommParam_AASE_SRS_Theater_CC3D_Aperture, 444 AUR2_CommParam_AASE_SRS_Theater_CC3D_GainLimit, 445 AUR2_CommParam_AASE_SRS_Theater_CC3D_FFDepth, 446 AUR2_CommParam_AASE_SRS_Theater_CC3D_NFDepth, 447 AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDx_En = 0x43E0, 448 AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxInputGain, 449 AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxBassLevel, 450 AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxSpeakerSize, 451 AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxMode, 452 AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxDynamics, 453 AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxHPOrder, 454 AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxCustomFilter, 455 //AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxHighPassRatio, 456 //AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxExtendedBass, 457 458 AUR2_CommParam_AASE_SRS_Theater_GEQ_5B_En = 0x43F0, 459 AUR2_CommParam_AASE_Wall_Filter_En, 460 AUR2_CommParam_AASE_SRS_Theater_CC3D_GEQ_input_gain, 461 AUR2_CommParam_AASE_SRS_Theater_CC3D_GEQ_gain_band0, 462 AUR2_CommParam_AASE_SRS_Theater_CC3D_GEQ_gain_band1, 463 AUR2_CommParam_AASE_SRS_Theater_CC3D_GEQ_gain_band2, 464 AUR2_CommParam_AASE_SRS_Theater_CC3D_GEQ_gain_band3, 465 AUR2_CommParam_AASE_SRS_Theater_CC3D_GEQ_gain_band4, 466 467 AUR2_CommParam_AASE_VDS_xxxx = 0x4400, 468 AUR2_CommParam_AASE_VDS_xxxx2, 469 AUR2_CommParam_AASE_VDS_xxxx3, 470 471 AUR2_CommParam_AASE_VSPK_xxxx = 0x4500, 472 AUR2_CommParam_AASE_VSPK_xxxx2, 473 AUR2_CommParam_AASE_VSPK_xxxx3, 474 475 AUR2_CommParam_AASE_PL2_xxxx = 0x4600, 476 AUR2_CommParam_AASE_PL2_xxxx2, 477 AUR2_CommParam_AASE_PL2_xxxx3, 478 479 AUR2_CommParam_AASE_DtsSymmetry_xxxx = 0x4700, 480 AUR2_CommParam_AASE_DtsSymmetry_xxxx2, 481 482 AUR2_CommParam_AASE_CV3_xxxx = 0x4800, 483 AUR2_CommParam_AASE_CV3_xxxx2, 484 485 AUR2_CommParam_AASE_CV4_xxxx = 0x4900, 486 AUR2_CommParam_AASE_CV4_xxxx2, 487 488 AUR2_CommParam_AASE_CUSFUNC_xxxx = 0x7E00, 489 AUR2_CommParam_AASE_CUSFUNC_xxxx2, 490 AUR2_CommParam_AASE_CUSFUNC_xxxx3, 491 492 AUR2_CommParam_AASE_lastcmd = 0x7FFF, 493 494 //*********************************************** 495 // Basic sound effect 496 //*********************************************** 497 AUR2_CommParam_ABSE_Volume = 0x8000, 498 AUR2_CommParam_ABSE_Prescale, 499 AUR2_CommParam_ABSE_Treble, 500 AUR2_CommParam_ABSE_Bass, 501 AUR2_CommParam_ABSE_EQ, 502 503 AUR2_CommParam_ABSE_lastcmd = 0x8FFF, 504 505 //*********************************************** 506 // Encoder 507 //*********************************************** 508 AUR2_CommParam_AENC_setEncoder = 0x9000, 509 AUR2_CommParam_AENC_audioCtrl, 510 511 AUR2_CommParam_AENC_lastcmd = 0x9FFF, 512 513 //*********************************************** 514 // IO 515 //*********************************************** 516 AUR2_CommParam_AIO_spdifMode = 0xA000, 517 518 AUR2_CommParam_AIO_lastcmd = 0xAFFF, 519 520 //*********************************************** 521 // Others 522 //*********************************************** 523 AUR2_CommParam_Misc_country = 0xB000, 524 525 AUR2_HDMITx_TypeChanged = 0xC000, 526 527 } R2_AudioParamType; 528 529 typedef enum 530 { 531 //*********************************************** 532 // Audio decoder param 533 //*********************************************** 534 AUR2_CommParam_ADEC_PTS_input = 0x0000, 535 AUR2_CommParam_ADEC_updateEsWritePtr, 536 AUR2_CommParam_ADEC_UNI_setOutput, 537 538 AUR2_CommInfo_ADEC_capability, 539 AUR2_CommInfo_ADEC_audioType, 540 AUR2_CommInfo_ADEC_audioCtrl, 541 AUR2_CommInfo_ADEC_decStatus, 542 AUR2_CommInfo_ADEC_esLevel, 543 AUR2_CommInfo_ADEC_pcmLevel, 544 AUR2_CommInfo_ADEC_33bitPts, 545 AUR2_CommInfo_ADEC_33Bit_stcPts_DIFF, 546 AUR2_CommInfo_ADEC_acmode, 547 AUR2_CommInfo_ADEC_DualCtrl, 548 AUR2_CommInfo_ADEC_SoundMode, 549 AUR2_CommInfo_ADEC_dmxMode, 550 AUR2_CommInfo_ADEC_drcMode, 551 AUR2_CommInfo_ADEC_drcHighCut, 552 AUR2_CommInfo_ADEC_drcLowBosst, 553 AUR2_CommInfo_ADEC_ok_frmCnt, 554 AUR2_CommInfo_ADEC_err_frmCnt, 555 AUR2_CommInfo_ADEC_sampleRate, 556 AUR2_CommInfo_ADEC_bitRate, 557 558 AUR2_CommInfo_ADEC_mpeg_xxxx = 0x0100, 559 AUR2_CommInfo_ADEC_mpeg_xxxx2, 560 561 AUR2_CommInfo_ADEC_ac3_xxxx = 0x0200, 562 AUR2_CommInfo_ADEC_ac3_xxxx2, 563 564 AUR2_CommInfo_ADEC_aac_xxxx = 0x0300, 565 AUR2_CommInfo_ADEC_aac_xxxx2, 566 567 AUR2_CommInfo_ADEC_aacp_xxxx = 0x0400, 568 AUR2_CommInfo_ADEC_aacp_xxxx2, 569 570 AUR2_CommInfo_ADEC_lastcmd = 0x3FFF, 571 572 //*********************************************** 573 // Advanced sound effect 574 //*********************************************** 575 AUR2_CommInfo_AASE_AaseType = 0x4000, 576 577 AUR2_CommInfo_AASE_SRS_xxxx = 0x4100, 578 AUR2_CommInfo_AASE_SRS_xxxx2, 579 AUR2_CommInfo_AASE_SRS_xxxx3, 580 581 AUR2_CommInfo_AASE_SRSHD_xxxx = 0x4200, 582 AUR2_CommInfo_AASE_SRSHD_xxxx2, 583 AUR2_CommInfo_AASE_SRSHD_xxxx3, 584 585 AUR2_CommInfo_AASE_SRS_Apollo_xxxx = 0x4300, 586 AUR2_CommInfo_AASE_SRS_Apollo_xxxx2, 587 AUR2_CommInfo_AASE_SRS_Apollo_xxxx3, 588 589 AUR2_CommInfo_AASE_VDS_xxxx = 0x4400, 590 AUR2_CommInfo_AASE_VDS_xxxx2, 591 AUR2_CommInfo_AASE_VDS_xxxx3, 592 593 AUR2_CommInfo_AASE_VSPK_xxxx = 0x4500, 594 AUR2_CommInfo_AASE_VSPK_xxxx2, 595 AUR2_CommInfo_AASE_VSPK_xxxx3, 596 597 AUR2_CommInfo_AASE_PL2_xxxx = 0x4600, 598 AUR2_CommInfo_AASE_PL2_xxxx2, 599 AUR2_CommInfo_AASE_PL2_xxxx3, 600 601 AUR2_CommInfo_AASE_DtsSymmetry_xxxx = 0x4700, 602 AUR2_CommInfo_AASE_DtsSymmetry_xxxx2, 603 604 AUR2_CommInfo_AASE_CV3_xxxx = 0x4800, 605 AUR2_CommInfo_AASE_CV3_xxxx2, 606 607 AUR2_CommInfo_AASE_CV4_xxxx = 0x4900, 608 AUR2_CommInfo_AASE_CV4_xxxx2, 609 610 AUR2_CommInfo_AASE_CUSFUNC_xxxx = 0x7E00, 611 AUR2_CommInfo_AASE_CUSFUNC_xxxx2, 612 AUR2_CommInfo_AASE_CUSFUNC_xxxx3, 613 614 AUR2_CommInfo_AASE_lastcmd = 0x7FFF, 615 616 //*********************************************** 617 // Basic sound effect 618 //*********************************************** 619 AUR2_CommInfo_ABSE_Volume = 0x8000, 620 AUR2_CommInfo_ABSE_Prescale, 621 AUR2_CommInfo_ABSE_Treble, 622 AUR2_CommInfo_ABSE_Bass, 623 AUR2_CommInfo_ABSE_EQ, 624 625 AUR2_CommInfo_ABSE_lastcmd = 0x8FFF, 626 627 //*********************************************** 628 // Encoder 629 //*********************************************** 630 AUR2_CommInfo_AENC_xxxx = 0x9000, 631 AUR2_CommInfo_AENC_xxxx2, 632 633 AUR2_CommInfo_AENC_lastcmd = 0x9FFF, 634 635 //*********************************************** 636 // IO 637 //*********************************************** 638 AUR2_CommInfo_AIO_xxxx = 0xA000, 639 640 AUR2_CommInfo_AIO_lastcmd = 0xAFFF, 641 642 //*********************************************** 643 // Others 644 //*********************************************** 645 AUR2_CommInfo_Misc_country = 0xB000, 646 647 } R2_AudioInfoType; 648 649 typedef enum 650 { 651 R2_SHM_INFO_CAPABILITY, 652 R2_SHM_INFO_DEC_STAUS, 653 R2_SHM_INFO_DEC_ERROR_ID, 654 R2_SHM_INFO_SMP_RATE, 655 R2_SHM_INFO_SPDIFTx_SMP_RATE, 656 R2_SHM_INFO_HDMITx_SMP_RATE, 657 R2_SHM_INFO_BIT_RATE, 658 R2_SHM_INFO_SYNTH_RATE, 659 R2_SHM_INFO_DEC_CHANNEL_MODE, 660 R2_SHM_INFO_DEC_CHANNEL_MAPPING, 661 662 R2_SHM_INFO_DEC_OUT_L, 663 R2_SHM_INFO_DEC_OUT_R, 664 665 R2_SHM_INFO_ES_LEVEL, 666 R2_SHM_INFO_PCM_LEVEL, 667 R2_SHM_INFO_PCM_DMX_LEVEL, 668 R2_SHM_INFO_ES_RD_PTR, 669 R2_SHM_INFO_PCM_WR_PTR, 670 R2_SHM_INFO_MM_FILE_REQ_SIZE, 671 672 R2_SHM_INFO_ACCUM_ES_BYTECNT, 673 R2_SHM_INFO_WAIT_1STPTS_CNT, 674 R2_SHM_INFO_WAIT_STC_CNT, 675 R2_SHM_INFO_SMP_FLUSH_CNT, 676 677 R2_SHM_INFO_AVSYNC_STATE, 678 R2_SHM_INFO_AVSYNC_FREERUN_TYPE, 679 R2_SHM_INFO_AVSYNC_OFFSET, 680 R2_SHM_INFO_AVSYNC_MMTsSyncFlag, 681 682 R2_SHM_INFO_PTS_TAG_WR_IDX, 683 R2_SHM_INFO_PTS_TAG_RD_IDX, 684 685 R2_SHM_INFO_PLAY_STATE, 686 R2_SHM_INFO_DEC_TYPE, 687 R2_SHM_INFO_PLAYSMPFLAG, 688 R2_SHM_INFO_DEC_CALLING_CNT, 689 R2_SHM_INFO_PCMISR_EMPTY_CNT, 690 R2_SHM_INFO_ELAPSED_PCM_CNT, 691 R2_SHM_INFO_RECEIVE_STOP_CNT, 692 693 R2_SHM_INFO_OK_FRMCNT, 694 R2_SHM_INFO_ERR_FRMCNT, 695 R2_SHM_INFO_SKIP_FRMCNT, 696 R2_SHM_INFO_REPT_FRMCNT, 697 R2_SHM_INFO_SYNC_MISS_CNT, 698 R2_SHM_INFO_PCM_EMPTY_CNT, 699 700 R2_SHM_INFO_STC, 701 R2_SHM_INFO_PTS, 702 R2_SHM_INFO_CURR_PTS, 703 R2_SHM_INFO_TD, 704 R2_SHM_INFO_PTS_LATENCY, 705 706 R2_SHM_INFO_UNI_DECODE_DONE_CNT, 707 R2_SHM_INFO_UNI_DECODE_DONE_PCM_ADDR, 708 R2_SHM_INFO_UNI_DECODE_DONE_PCM_SIZE, 709 710 R2_SHM_INFO_PCM_ADDR, 711 R2_SHM_INFO_PCM_SIZE, 712 713 R2_SHM_INFO_spdifbuf_LEVEL, 714 R2_SHM_INFO_spdifbuf_WR_PTR, 715 716 R2_SHM_INFO_HDMIbuf_LEVEL, 717 R2_SHM_INFO_HDMIbuf_WR_PTR, 718 R2_SHM_INFO_HDMIbuf_HBR, 719 720 R2_SHM_INFO_DOLBY_DEC_TYPE, 721 R2_SHM_INFO_DOLBY_FRAME_SIZE, 722 R2_SHM_INFO_DOLBY_BS_MODE, 723 R2_SHM_INFO_DOLBY_AAC_TYPE, 724 R2_SHM_INFO_DOLBY_DDP_71_STREAM, 725 726 R2_SHM_INFO_DTS_CD_MODE, 727 R2_SHM_INFO_DTS_ES_TYPE, 728 729 R2_SHM_INFO_MPEG_LAYER, 730 R2_SHM_INFO_MPEG_STEREOMODE, 731 R2_SHM_INFO_MPEG_HEADER, 732 R2_SHM_INFO_UNSUPPORT_TYPE, 733 R2_SHM_INFO_TRANSCODE_FLAG, 734 735 R2_SHM_INFO_PCM_OUTPUT_CHANNEL, 736 R2_SHM_INFO_OMX_NO_MIXING, 737 R2_SHM_INFO_OMX_ES_BYPASS, 738 R2_SHM_INFO_OMX_MCH_VALID, 739 740 R2_SHM_INFO_PARSER_INFO, 741 742 /* TVOS2.0 DTV */ 743 R2_SHM_INFO_TVOS2_PCM_WRPT, 744 R2_SHM_INFO_TVOS2_CPTS, 745 R2_SHM_INFO_TVOS2_PCM_FRAMESIZE, 746 R2_SHM_INFO_TVOS2_PCM_CH, 747 748 /* UART INFO */ 749 R2_SHM_INFO_UART_BUF_BASE, 750 R2_SHM_INFO_UART_BUF_SIZE, 751 R2_SHM_INFO_UART_BUF_WPTR, 752 753 } R2_SHM_INFO_TYPE; 754 755 typedef enum 756 { 757 R2_SHM_PARAM_ES_WR_PTR, 758 R2_SHM_PARAM_MPG_AVOFFSET, 759 R2_SHM_PARAM_AC3_AVOFFSET, 760 R2_SHM_PARAM_AAC_AVOFFSET, 761 762 R2_SHM_PARAM_DOLBY_DRC_MODE, 763 R2_SHM_PARAM_DOLBY_RF_MODE, 764 R2_SHM_PARAM_DOLBY_DMX_MODE, 765 R2_SHM_PARAM_DOLBY_HIGH_CUT, 766 R2_SHM_PARAM_DOLBY_LOW_BOOST, 767 R2_SHM_PARAM_DOLBY_GAIN, 768 R2_SHM_PARAM_DOLBY_MUL_FRAME_HEADER, 769 R2_SHM_PARAM_DOLBY_AAC_BYPASS, 770 R2_SHM_PARAM_DOLBY_DDP_HDMI_BYPASS, 771 R2_SHM_PARAM_DOLBY_TB11_ENABLE, 772 R2_SHM_PARAM_DOLBY_MIXER_BALANCE, 773 R2_SHM_PARAM_DOLBY_DDP_DISABLE_ATMOS, 774 775 R2_SHM_PARAM_PARSER_SPEC, 776 R2_SHM_PARAM_PARSER_PES_BYPASS, 777 R2_SHM_PARAM_PARSER_PUSI_DISABLE, 778 R2_SHM_PARAM_REPORT_MM_TS_PTS_WITH_MSB, 779 R2_SHM_PARAM_MM_TS_SYNC_STC, 780 R2_SHM_PARAM_MM_FF2X, 781 R2_SHM_PARAM_DECODE_MUTE, 782 R2_SHM_PARAM_SOUND_MODE, 783 R2_SHM_PARAM_EXT_SMPRATE_CTRL, 784 785 R2_SHM_PARAM_MM_FILE_REQ_SIZE, 786 R2_SHM_PARAM_MM_INPUT_PTS, 787 788 R2_SHM_PARAM_UNI_PCM_SET_OUTPUT_CNT, 789 R2_SHM_PARAM_UNI_SETUP_DECODE_FRMCNT, 790 R2_SHM_PARAM_ES2_WR_PTR, 791 792 R2_SHM_PARAM_OMX_SPDIF_CTRL, 793 R2_SHM_PARAM_OMX_SPDIF_PCM_LEVEL, 794 795 R2_SHM_PARAM_MAIN_VOLUME, 796 R2_SHM_PARAM_MAIN_VOLUME_MUTE, 797 R2_SHM_PARAM_AD_VOLUME, 798 R2_SHM_PARAM_AD_VOLUME_MUTE, 799 800 R2_SHM_PARAM_MPEG_SOUNDMODE, 801 R2_SHM_PARAM_MPEG_GAIN, 802 803 R2_SHM_PARAM_COOK_NUMCODECS, 804 R2_SHM_PARAM_COOK_SAMPLES, 805 R2_SHM_PARAM_COOK_SAMPLERATES, 806 R2_SHM_PARAM_COOK_CHANNELS, 807 R2_SHM_PARAM_COOK_REGIONS, 808 R2_SHM_PARAM_COOK_CPLSTART, 809 R2_SHM_PARAM_COOK_CPLQBITS, 810 R2_SHM_PARAM_COOK_FRAMESIZE, 811 812 R2_SHM_PARAM_DTS_DMX_LFE_ENABLE, 813 R2_SHM_PARAM_DTS_DMX_MODE, 814 R2_SHM_PARAM_DTS_HD_HDMI_BYPASS, 815 816 R2_SHM_PARAM_ASF_VERSION, 817 R2_SHM_PARAM_ASF_CHANNELS, 818 R2_SHM_PARAM_ASF_SAMPLERATE, 819 R2_SHM_PARAM_ASF_BYTERATE, 820 R2_SHM_PARAM_ASF_BLOCKALIGN, 821 R2_SHM_PARAM_ASF_ENCOPT, 822 R2_SHM_PARAM_ASF_PARSINGBYAPP, 823 R2_SHM_PARAM_ASF_BITS_PER_SAMPLE, 824 R2_SHM_PARAM_ASF_CHANNELMASK, 825 R2_SHM_PARAM_ASF_DRC_PARAM_EXIST, 826 R2_SHM_PARAM_ASF_DRC_RMS_AMP_REF, 827 R2_SHM_PARAM_ASF_DRC_RMS_AMP_TARGET, 828 R2_SHM_PARAM_ASF_DRC_PEAK_AMP_REF, 829 R2_SHM_PARAM_ASF_DRC_PEAK_AMP_TARGET, 830 R2_SHM_PARAM_ASF_MAX_PACKET_SIZE, 831 832 R2_SHM_PARAM_XPCM_TYPE, 833 R2_SHM_PARAM_XPCM_CHANNELS, 834 R2_SHM_PARAM_XPCM_SAMPLERATES, 835 R2_SHM_PARAM_XPCM_BITS_PER_SAMPLE, 836 R2_SHM_PARAM_XPCM_BLOCK_SIZE, 837 R2_SHM_PARAM_XPCM_SAMPLE_PER_BLOCK, 838 839 R2_SHM_PARAM_HASH_KEY, 840 841 R2_SHM_PARAM_SPDIF_TYPE, 842 R2_SHM_PARAM_HDMI_TYPE, 843 844 R2_SHM_PARAM_RFSIGNAL_TYPE, 845 846 R2_SHM_PARAM_VORBIS_HEADER_SIZE, 847 848 R2_SHM_PARAM_ES_Limiter_EN, 849 R2_SHM_PARAM_ES_Limiter_Threshold, 850 R2_SHM_PARAM_PCM_Limiter_EN, 851 R2_SHM_PARAM_PCM_Limiter_Threshold, 852 853 R2_SHM_PARAM_STC_SELECTION, 854 /* TVOS2.0 DTV */ 855 R2_SHM_PARAM_TVOS2_PCM_RDPTR, 856 R2_SHM_PARAM_TVOS2_DTV_SYNCTYPE, 857 858 R2_SHM_PARAM_MULTI_CHANNEL, 859 R2_SHM_PARAM_DAP_EN, 860 R2_SHM_PARAM_SPEAKER_EN, 861 862 /* SPDIF PAUSE Command */ 863 R2_SHM_PARAM_OMX_SPDIF_PAUSE, 864 865 R2_SHM_PARAM_TTS_EN, 866 R2_SHM_PARAM_DDP_ENCODE_EN, 867 868 R2_SHM_PARAM_ES_PassThrough_DelaySmp, 869 R2_SHM_PARAM_ES_PassThrough_PcmSamRate, 870 R2_SHM_PARAM_ES_PassThrough_HdmiSmpRate, 871 872 R2_SHM_PARAM_ES2_IsUsedBy_Dual, 873 874 R2_SHM_PARAM_LOW_LATENCY_LIMITER_ES_THRESHOLD, 875 R2_SHM_PARAM_LOW_LATENCY_LIMITER_PCM_THRESHOLD, 876 R2_SHM_PARAM_LOW_LATENCY_LIMITER_PCM_SKIP_TARGET, 877 R2_SHM_PARAM_ES_REPEAT_MODE, 878 879 R2_SHM_PARAM_AUR2_HDMITx_TypeChanged, 880 } R2_SHM_PARAM_TYPE; 881 882 MS_U8 HAL_AUR2_ReadByte(MS_U32 u32RegAddr); 883 MS_U16 HAL_AUR2_ReadReg(MS_U32 u32RegAddr); 884 void HAL_AUR2_WriteByte(MS_U32 u32RegAddr, MS_U8 u8Val); 885 void HAL_AUR2_WriteReg(MS_U32 u32RegAddr, MS_U16 u16Val); 886 void HAL_AUR2_WriteMaskByte(MS_U32 u32RegAddr, MS_U8 u8Mask, MS_U8 u8Val); 887 void HAL_AUR2_WriteMaskReg(MS_U32 u32RegAddr, MS_U16 u16Mask, MS_U16 u16Val); 888 889 void HAL_DEC_R2_EnableR2( MS_BOOL en ); 890 void HAL_DEC_R2_init_SHM_param( void ); 891 void HAL_DEC_R2_SetCommInfo(R2_AudioParamType infoType, Audio_id id, MS_U16 param1, MS_U16 param2); 892 MS_U32 HAL_DEC_R2_GetCommInfo(R2_AudioInfoType infoType, Audio_id id, MS_U16 param1, MS_U16 param2); 893 MS_U32 HAL_DEC_R2_Get_SHM_INFO(R2_SHM_INFO_TYPE decInfoType, MS_U8 dec_id ); 894 MS_BOOL HAL_DEC_R2_Set_SHM_PARAM(R2_SHM_PARAM_TYPE decParamType, MS_U8 dec_id, MS_U32 param, MS_U32 param2 ); 895 MS_U32 HAL_DEC_R2_Get_SHM_PARAM(R2_SHM_PARAM_TYPE decParamType, MS_U8 dec_id, MS_U32 param ); 896 897 void HAL_SND_R2_EnableR2( MS_BOOL en ); 898 void HAL_SND_R2_SetCommInfo(R2_AudioParamType infoType, Audio_id id, MS_U16 param1, MS_U16 param2); 899 MS_U32 HAL_SND_R2_GetCommInfo(R2_AudioInfoType infoType, Audio_id id, MS_U16 param1, MS_U16 param2); 900 MS_U32 HAL_SND_R2_Get_SHM_INFO(R2_SHM_INFO_TYPE decInfoType, MS_U8 dec_id ); 901 MS_BOOL HAL_SND_R2_Set_SHM_PARAM(R2_SHM_PARAM_TYPE decParamType, MS_U8 dec_id, MS_U32 param, MS_U32 param2 ); 902 MS_U32 HAL_SND_R2_Get_SHM_PARAM(R2_SHM_PARAM_TYPE decParamType, MS_U8 dec_id, MS_U32 param ); 903 904 905 #endif 906