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_FREERUN = 0x80, //if not free_run, just AV_sync 93 } AU_DEC_R2_CMD; 94 95 typedef enum 96 { 97 R2_DECCMD_STOP, 98 R2_DECCMD_PAUSE, 99 R2_DECCMD_PLAY, 100 } R2_DEC_PLAYCMD; 101 102 typedef enum 103 { 104 adec_type_dummy, 105 adec_type_ac3, 106 adec_type_ac3p, 107 adec_type_mpeg, 108 adec_type_dts, 109 adec_type_aac, 110 adec_type_aacp, 111 adec_type_xpcm, 112 adec_type_vorbis, 113 adec_type_flac, 114 adec_type_wma, 115 adec_type_wmap, 116 adec_type_ra8, 117 adec_type_gaac, 118 adec_type_ext_pcm, 119 adec_type_dolby_truhd_bypass, 120 adec_type_dra, 121 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 adec_capa_mpeg = 1 << adec_type_mpeg, 129 adec_capa_ac3 = 1 << adec_type_ac3, 130 adec_capa_ac3p = 1 << adec_type_ac3p, 131 adec_capa_dts = 1 << adec_type_dts, 132 adec_capa_aac = 1 << adec_type_aac, 133 adec_capa_aacp = 1 << adec_type_aacp, 134 adec_capa_xpcm = 1 << adec_type_xpcm, 135 adec_capa_vorbis = 1 << adec_type_vorbis, 136 adec_capa_flac = 1 << adec_type_flac, 137 adec_capa_wma = 1 << adec_type_wma, 138 adec_capa_wmap = 1 << adec_type_wmap, 139 adec_capa_ra8 = 1 << adec_type_ra8, 140 adec_capa_gaac = 1 << adec_type_gaac, 141 adec_capa_dra = 1<< adec_type_dra, 142 adec_capa_reserved = 1 << adec_type_reserved, 143 } adec_capability; 144 145 typedef enum 146 { 147 aenc_type_dummy, 148 aenc_type_mpeg, 149 aenc_type_ac3, 150 aenc_type_dts, 151 152 aenc_type_reserved = 0x1F, 153 } aenc_type; 154 155 typedef enum 156 { 157 aenc_capa_mpeg = 1 << aenc_type_mpeg, 158 aenc_capa_ac3 = 1 << aenc_type_ac3, 159 aenc_capa_dts = 1 << aenc_type_dts, 160 161 aenc_capa_reserved = 1 << aenc_type_reserved, 162 } aenc_capability; 163 164 typedef enum 165 { 166 aase_type_dummy, 167 aase_type_srs, 168 aase_type_srsTshd, 169 aase_type_srsApollo, 170 aase_type_srsTheater, 171 172 aase_type_customer = 0x1E, 173 aase_type_reserverd = 0x1F, 174 } aase_type; 175 176 typedef enum 177 { 178 aase_capa_srs = 1 << aase_type_srs, 179 aase_capa_srsTshd = 1 << aase_type_srsTshd, 180 aase_capa_srsApollo = 1 << aase_type_srsApollo, 181 aase_capa_srsTheater = 1 << aase_type_srsTheater, 182 183 aase_capa_customer= 1 << aase_type_customer, 184 aase_capa_reserved= 1 << aase_type_reserverd, 185 } aase_capability; 186 187 typedef enum 188 { 189 adec_ctrl_stop, 190 adec_ctrl_play, 191 adec_ctrl_pause, 192 adec_ctrl_ff2x, 193 adec_ctrl_ff4x, 194 } adec_ctrl; 195 196 typedef enum 197 { 198 aenc_ctrl_stop, 199 aenc_ctrl_play, 200 } aenc_ctrl; 201 202 typedef enum 203 { 204 adec_mode_stereo, 205 adec_mode_LL, 206 adec_mode_RR, 207 adec_mode_mixed, 208 209 } adec_sound_mode; 210 211 typedef enum 212 { 213 adec_drc_lineMode, 214 adec_drc_RfMode, 215 } adec_drcMode; 216 217 typedef enum 218 { 219 adec_dmx_LoRo, 220 adec_dmx_LtRt, 221 222 } adec_dmxMode; 223 224 typedef enum 225 { 226 adec_unlocked, 227 adec_locked, 228 adec_ip_check_fail, 229 230 } adec_status; 231 232 typedef enum 233 { 234 adec_ch_mono, 235 adec_ch_dual_mono, 236 adec_ch_joint_stereo, 237 adec_ch_stereo, 238 adec_ch_multi, 239 } adec_acmod; 240 241 typedef enum 242 { 243 adec_smpRate_48K, 244 adec_smpRate_44K, 245 adec_smpRate_32K, 246 } adec_smpRate; 247 248 typedef enum 249 { 250 ADEC1 = 0x00, //audio decoder 1 251 ADEC2 = 0x01, //audio decoder 2 252 ADEC3 = 0x02, //audio decoder 3 253 254 ABSE = 0x00, //audio basic sound effect 255 256 AASE1 = 0x00, //audio advanced sound effect 1 257 AASE2 = 0x01, //audio advanced sound effect 2 258 AASE3 = 0x02, //audio advanced sound effect 3 259 260 AIO = 0x00, //audio IO 261 } Audio_id; 262 263 typedef enum 264 { 265 //*********************************************** 266 // Audio decoder param 267 //*********************************************** 268 AUR2_CommParam_ADEC_setAudioDecoder = 0x0000, 269 AUR2_CommParam_ADEC_audioCtrl, 270 AUR2_CommParam_ADEC_DualCtrl, 271 AUR2_CommParam_ADEC_SoundMode, 272 AUR2_CommParam_ADEC_dmxMode, 273 AUR2_CommParam_ADEC_drcMode, 274 AUR2_CommParam_ADEC_drcHighCut, 275 AUR2_CommParam_ADEC_drcLowBosst, 276 AUR2_CommParam_ADEC_mute, 277 278 AUR2_CommParam_ADEC_mpeg_xxxx = 0x0100, 279 AUR2_CommParam_ADEC_mpeg_xxxx2, 280 281 AUR2_CommParam_ADEC_ac3_xxxx = 0x0200, 282 AUR2_CommParam_ADEC_ac3_xxxx2, 283 284 AUR2_CommParam_ADEC_aac_xxxx = 0x0300, 285 AUR2_CommParam_ADEC_aac_xxxx2, 286 287 AUR2_CommParam_ADEC_aacp_xxxx = 0x0400, 288 AUR2_CommParam_ADEC_aacp_xxxx2, 289 290 AUR2_CommParam_ADEC_wma_xxxx = 0x0500, 291 AUR2_CommParam_ADEC_wma_xxxx2, 292 293 AUR2_CommParam_ADEC_lastcmd = 0x3FFF, 294 295 //*********************************************** 296 // Advanced sound effect 297 //*********************************************** 298 AUR2_CommParam_AASE_setAaseType = 0x4000, 299 AUR2_CommParam_AASE_enableAase, 300 301 AUR2_CommParam_AASE_SRSHD_HdEn = 0x4100, 302 AUR2_CommParam_AASE_SRSHD_truBassEn, 303 AUR2_CommParam_AASE_SRSHD_definitionEn, 304 AUR2_CommParam_AASE_SRSHD_dialogClarityEn, 305 AUR2_CommParam_AASE_SRSHD_inputMode, 306 AUR2_CommParam_AASE_SRSHD_outputMode, 307 AUR2_CommParam_AASE_SRSHD_spkrSize, 308 AUR2_CommParam_AASE_SRSHD_truBassCtrl, 309 AUR2_CommParam_AASE_SRSHD_definitionCtrl, 310 AUR2_CommParam_AASE_SRSHD_focusCtrl, 311 AUR2_CommParam_AASE_SRSHD_surrLevel, 312 AUR2_CommParam_AASE_SRSHD_inputGain, 313 AUR2_CommParam_AASE_SRSHD_outputGain, 314 315 AUR2_CommParam_AASE_SRS_Apollo_processEn = 0x4200, 316 AUR2_CommParam_AASE_SRS_Apollo_InputGain, 317 AUR2_CommParam_AASE_SRS_Apollo_OutputGain, 318 AUR2_CommParam_AASE_SRS_Apollo_BypassGain, 319 AUR2_CommParam_AASE_SRS_Apollo_HeadroomGain, 320 AUR2_CommParam_AASE_SRS_Apollo_HdEn = 0x4210, 321 AUR2_CommParam_AASE_SRS_Apollo_HdOutputMode, 322 AUR2_CommParam_AASE_SRS_Apollo_HdSndLevelCtrl, 323 AUR2_CommParam_AASE_SRS_Apollo_HdInputGain, 324 AUR2_CommParam_AASE_SRS_Apollo_HdOutputGain, 325 AUR2_CommParam_AASE_SRS_Apollo_HdBypassGain, 326 AUR2_CommParam_AASE_SRS_Apollo_HddialogClarityEn = 0x4220, 327 AUR2_CommParam_AASE_SRS_Apollo_HddialogClarityCtrl, 328 AUR2_CommParam_AASE_SRS_Apollo_HddefintionEn = 0x4230, 329 AUR2_CommParam_AASE_SRS_Apollo_HddefintionCtrl, 330 AUR2_CommParam_AASE_SRS_Apollo_HdtruBassEn = 0x4240, 331 AUR2_CommParam_AASE_SRS_Apollo_HdtruBassProcessMode, 332 AUR2_CommParam_AASE_SRS_Apollo_HdtruBassFrontCtrl, 333 AUR2_CommParam_AASE_SRS_Apollo_HdtruBassSpkSize, 334 AUR2_CommParam_AASE_SRS_Apollo_hardlimiterEn = 0x4250, 335 AUR2_CommParam_AASE_SRS_Apollo_hardlimiterCtrl, 336 AUR2_CommParam_AASE_SRS_Apollo_hardlimiterdelaylength, 337 AUR2_CommParam_AASE_SRS_Apollo_hardlimiterBoost, 338 AUR2_CommParam_AASE_SRS_Apollo_truvolumeEn = 0x4260, 339 AUR2_CommParam_AASE_SRS_Apollo_truvolRefLevel, 340 AUR2_CommParam_AASE_SRS_Apollo_truvolspkSize, 341 AUR2_CommParam_AASE_SRS_Apollo_truvolInputGain, 342 AUR2_CommParam_AASE_SRS_Apollo_truvolOutGain, 343 AUR2_CommParam_AASE_SRS_Apollo_truvolMaxGain, 344 AUR2_CommParam_AASE_SRS_Apollo_truvolBlockSize, 345 AUR2_CommParam_AASE_SRS_Apollo_truvolnoiseManagerEn = 0x4270, 346 AUR2_CommParam_AASE_SRS_Apollo_truvolnoiseManagerThd, 347 AUR2_CommParam_AASE_SRS_Apollo_truvolCalibrate, 348 AUR2_CommParam_AASE_SRS_Apollo_PEQleftEn = 0x4280, 349 AUR2_CommParam_AASE_SRS_Apollo_PEQleftnumBands, 350 AUR2_CommParam_AASE_SRS_Apollo_PEQleftBandEn = 0x4290, 351 AUR2_CommParam_AASE_SRS_Apollo_PEQrightEn = 0x42A0, 352 AUR2_CommParam_AASE_SRS_Apollo_PEQrightnumBands, 353 AUR2_CommParam_AASE_SRS_Apollo_PEQrightBandEn = 0x42B0, 354 AUR2_CommParam_AASE_SRS_Apollo_HPFEn = 0x42C0, 355 AUR2_CommParam_AASE_SRS_Apollo_GEQEn = 0x42D0, 356 AUR2_CommParam_AASE_SRS_Apollo_GEQBandGain1, 357 AUR2_CommParam_AASE_SRS_Apollo_GEQBandGain2, 358 AUR2_CommParam_AASE_SRS_Apollo_GEQBandGain3, 359 AUR2_CommParam_AASE_SRS_Apollo_GEQBandGain4, 360 AUR2_CommParam_AASE_SRS_Apollo_GEQBandGain5, 361 AUR2_CommParam_AASE_SRS_Apollo_trudialogEn = 0x42E0, 362 AUR2_CommParam_AASE_SRS_Apollo_trudialogInputGain, 363 AUR2_CommParam_AASE_SRS_Apollo_trudialogOutputGain, 364 AUR2_CommParam_AASE_SRS_Apollo_trudialogProcessGain, 365 AUR2_CommParam_AASE_SRS_Apollo_trudialogClarityEn = 0x42F0, 366 AUR2_CommParam_AASE_SRS_Apollo_trudialogClarityGain, 367 AUR2_CommParam_AASE_SRS_Apollo_trudialogClarityThreshold, 368 369 AUR2_CommParam_AASE_SRS_Theater_processEn = 0x4300, 370 AUR2_CommParam_AASE_SRS_Theater_InputGain, 371 AUR2_CommParam_AASE_SRS_Theater_OutputGain, 372 AUR2_CommParam_AASE_SRS_Theater_BypassGain, 373 AUR2_CommParam_AASE_SRS_Theater_HeadroomGain, 374 AUR2_CommParam_AASE_SRS_Theater_InputMode, 375 AUR2_CommParam_AASE_SRS_Theater_CC3D_Process_Path, 376 AUR2_CommParam_AASE_SRS_Theater_HPFEn = 0x4310, 377 AUR2_CommParam_AASE_SRS_Theater_truvolHDEn = 0x4320, 378 AUR2_CommParam_AASE_SRS_Theater_truvolHDInputGain, 379 AUR2_CommParam_AASE_SRS_Theater_truvolHDOutGain, 380 AUR2_CommParam_AASE_SRS_Theater_truvolHDBypassGain, 381 AUR2_CommParam_AASE_SRS_Theater_truvolHDMode, 382 AUR2_CommParam_AASE_SRS_Theater_truvolHDMaxGainControl, 383 AUR2_CommParam_AASE_SRS_Theater_truvolHDNormalizerEnable, 384 AUR2_CommParam_AASE_SRS_Theater_truvolHDNormThresh, 385 AUR2_CommParam_AASE_SRS_Theater_truvolHDSmoothEnable, 386 AUR2_CommParam_AASE_SRS_Theater_truvolHDLKFS, 387 AUR2_CommParam_AASE_SRS_Theater_CSEn = 0x4330, 388 AUR2_CommParam_AASE_SRS_Theater_CSInputGain, 389 AUR2_CommParam_AASE_SRS_Theater_CSProcessingMode, 390 AUR2_CommParam_AASE_SRS_Theater_CSLROutputGain, 391 AUR2_CommParam_AASE_SRS_Theater_CSLsRsOutputGain, 392 AUR2_CommParam_AASE_SRS_Theater_CSCenterOutputGain, 393 AUR2_CommParam_AASE_SRS_Theater_trudialogEn = 0x4340, 394 AUR2_CommParam_AASE_SRS_Theater_trudialogInputGain, 395 AUR2_CommParam_AASE_SRS_Theater_trudialogOutputGain, 396 AUR2_CommParam_AASE_SRS_Theater_trudialogBypassGain, 397 AUR2_CommParam_AASE_SRS_Theater_trudialogProcessGain, 398 AUR2_CommParam_AASE_SRS_Theater_trudialogClarityGain, 399 400 AUR2_CommParam_AASE_SRS_Theater_TSHD_En = 0x4350, 401 AUR2_CommParam_AASE_SRS_Theater_tshd_input_gain, 402 AUR2_CommParam_AASE_SRS_Theater_tshd_output_gain, 403 AUR2_CommParam_AASE_SRS_Theater_TSHD_Sur_En = 0x4360, 404 AUR2_CommParam_AASE_SRS_Theater_tshd_surround_level_ctrl, 405 AUR2_CommParam_AASE_SRS_Theater_TSHD_Definition_En = 0x4370, 406 AUR2_CommParam_AASE_SRS_Theater_tshd_definition_ctrl, 407 AUR2_CommParam_AASE_SRS_Theater_TSHD_DialogClarity_En = 0x4380, 408 AUR2_CommParam_AASE_SRS_Theater_tshd_dialog_clarity_ctrl, 409 AUR2_CommParam_AASE_SRS_Theater_TSHD_TrubassFront_En = 0x4390, 410 AUR2_CommParam_AASE_SRS_Theater_tshd_trubass_front_ctrl, 411 AUR2_CommParam_AASE_SRS_Theater_TSHD_Trubass_level_indep_En = 0x43A0, 412 AUR2_CommParam_AASE_SRS_Theater_tshd_trubass_speaker_size, 413 AUR2_CommParam_AASE_SRS_Theater_tshd_trubass_compressor_ctrl, 414 AUR2_CommParam_AASE_SRS_Theater_tshd_trubass_process_mode, 415 AUR2_CommParam_AASE_SRS_Theater_tshd_trubass_speaker_audio, 416 AUR2_CommParam_AASE_SRS_Theater_tshd_trubass_speaker_analysis, 417 AUR2_CommParam_AASE_SRS_Theater_HPF_End_En = 0x43B0, 418 AUR2_CommParam_AASE_SRS_Theater_HL_En = 0x43C0, 419 AUR2_CommParam_AASE_SRS_Theater_HL_limit_ctrl, 420 AUR2_CommParam_AASE_SRS_Theater_HL_boost_gain, 421 422 AUR2_CommParam_AASE_SRS_Theater_CC3D_En = 0x43D0, 423 AUR2_CommParam_AASE_SRS_Theater_CC3D_DepthProcessing_En, 424 AUR2_CommParam_AASE_SRS_Theater_CC3D_3DSurroundBoost_En, 425 AUR2_CommParam_AASE_SRS_Theater_CC3D_TSHD_Mix_En, 426 AUR2_CommParam_AASE_SRS_Theater_CC3D_Fade_En, 427 AUR2_CommParam_AASE_SRS_Theater_CC3D_InputGain, 428 AUR2_CommParam_AASE_SRS_Theater_CC3D_OutputGain, 429 AUR2_CommParam_AASE_SRS_Theater_CC3D_BypassGain, 430 AUR2_CommParam_AASE_SRS_Theater_CC3D_TSHD_SurMode, 431 AUR2_CommParam_AASE_SRS_Theater_CC3D_TSHD_MixFadeCtrl, 432 AUR2_CommParam_AASE_SRS_Theater_CC3D_Aperture, 433 AUR2_CommParam_AASE_SRS_Theater_CC3D_GainLimit, 434 AUR2_CommParam_AASE_SRS_Theater_CC3D_FFDepth, 435 AUR2_CommParam_AASE_SRS_Theater_CC3D_NFDepth, 436 AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDx_En = 0x43E0, 437 AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxInputGain, 438 AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxBassLevel, 439 AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxSpeakerSize, 440 AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxMode, 441 AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxDynamics, 442 AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxHPOrder, 443 AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxCustomFilter, 444 //AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxHighPassRatio, 445 //AUR2_CommParam_AASE_SRS_Theater_CC3D_TBHDxExtendedBass, 446 447 AUR2_CommParam_AASE_SRS_Theater_GEQ_5B_En = 0x43F0, 448 AUR2_CommParam_AASE_Wall_Filter_En, 449 AUR2_CommParam_AASE_SRS_Theater_CC3D_GEQ_input_gain, 450 AUR2_CommParam_AASE_SRS_Theater_CC3D_GEQ_gain_band0, 451 AUR2_CommParam_AASE_SRS_Theater_CC3D_GEQ_gain_band1, 452 AUR2_CommParam_AASE_SRS_Theater_CC3D_GEQ_gain_band2, 453 AUR2_CommParam_AASE_SRS_Theater_CC3D_GEQ_gain_band3, 454 AUR2_CommParam_AASE_SRS_Theater_CC3D_GEQ_gain_band4, 455 456 AUR2_CommParam_AASE_VDS_xxxx = 0x4400, 457 AUR2_CommParam_AASE_VDS_xxxx2, 458 AUR2_CommParam_AASE_VDS_xxxx3, 459 460 AUR2_CommParam_AASE_VSPK_xxxx = 0x4500, 461 AUR2_CommParam_AASE_VSPK_xxxx2, 462 AUR2_CommParam_AASE_VSPK_xxxx3, 463 464 AUR2_CommParam_AASE_PL2_xxxx = 0x4600, 465 AUR2_CommParam_AASE_PL2_xxxx2, 466 AUR2_CommParam_AASE_PL2_xxxx3, 467 468 AUR2_CommParam_AASE_DtsSymmetry_xxxx = 0x4700, 469 AUR2_CommParam_AASE_DtsSymmetry_xxxx2, 470 471 AUR2_CommParam_AASE_CV3_xxxx = 0x4800, 472 AUR2_CommParam_AASE_CV3_xxxx2, 473 474 AUR2_CommParam_AASE_CV4_xxxx = 0x4900, 475 AUR2_CommParam_AASE_CV4_xxxx2, 476 477 AUR2_CommParam_AASE_DOLBY_DAP_SET_PARAMS = 0x4A00, 478 AUR2_CommParam_AASE_DOLBY_DAP_GET_PARAMS_R2_ADDR = 0x4A00, 479 AUR2_CommParam_AASE_DOLBY_DAP_GET_PARAMS_SIZE = 0x4A01, 480 481 AUR2_CommParam_AASE_SONICEMOTION_ABS3D_SET_PARAMS = 0x4B00, 482 AUR2_CommParam_AASE_SONICEMOTION_ABS3D_GET_PARAMS_R2_ADDR = 0x4B00, 483 AUR2_CommParam_AASE_SONICEMOTION_ABS3D_GET_PARAMS_SIZE = 0x4B01, 484 485 AUR2_CommParam_AASE_CUSFUNC_xxxx = 0x7E00, 486 AUR2_CommParam_AASE_CUSFUNC_xxxx2, 487 AUR2_CommParam_AASE_CUSFUNC_xxxx3, 488 489 AUR2_CommParam_AASE_lastcmd = 0x7FFF, 490 491 //*********************************************** 492 // Basic sound effect 493 //*********************************************** 494 AUR2_CommParam_ABSE_Volume = 0x8000, 495 AUR2_CommParam_ABSE_Prescale, 496 AUR2_CommParam_ABSE_Treble, 497 AUR2_CommParam_ABSE_Bass, 498 AUR2_CommParam_ABSE_EQ, 499 500 AUR2_CommParam_ABSE_lastcmd = 0x8FFF, 501 502 //*********************************************** 503 // Encoder 504 //*********************************************** 505 AUR2_CommParam_AENC_setEncoder = 0x9000, 506 AUR2_CommParam_AENC_audioCtrl, 507 508 AUR2_CommParam_AENC_lastcmd = 0x9FFF, 509 510 //*********************************************** 511 // IO 512 //*********************************************** 513 AUR2_CommParam_AIO_spdifMode = 0xA000, 514 515 AUR2_CommParam_AIO_lastcmd = 0xAFFF, 516 517 //*********************************************** 518 // Others 519 //*********************************************** 520 AUR2_CommParam_Misc_country = 0xB000, 521 522 } R2_AudioParamType; 523 524 typedef enum 525 { 526 //*********************************************** 527 // Audio decoder param 528 //*********************************************** 529 AUR2_CommParam_ADEC_PTS_input = 0x0000, 530 AUR2_CommParam_ADEC_updateEsWritePtr, 531 AUR2_CommParam_ADEC_UNI_setOutput, 532 533 AUR2_CommInfo_ADEC_capability, 534 AUR2_CommInfo_ADEC_audioType, 535 AUR2_CommInfo_ADEC_audioCtrl, 536 AUR2_CommInfo_ADEC_decStatus, 537 AUR2_CommInfo_ADEC_esLevel, 538 AUR2_CommInfo_ADEC_pcmLevel, 539 AUR2_CommInfo_ADEC_33bitPts, 540 AUR2_CommInfo_ADEC_33Bit_stcPts_DIFF, 541 AUR2_CommInfo_ADEC_acmode, 542 AUR2_CommInfo_ADEC_DualCtrl, 543 AUR2_CommInfo_ADEC_SoundMode, 544 AUR2_CommInfo_ADEC_dmxMode, 545 AUR2_CommInfo_ADEC_drcMode, 546 AUR2_CommInfo_ADEC_drcHighCut, 547 AUR2_CommInfo_ADEC_drcLowBosst, 548 AUR2_CommInfo_ADEC_ok_frmCnt, 549 AUR2_CommInfo_ADEC_err_frmCnt, 550 AUR2_CommInfo_ADEC_sampleRate, 551 AUR2_CommInfo_ADEC_bitRate, 552 553 AUR2_CommInfo_ADEC_mpeg_xxxx = 0x0100, 554 AUR2_CommInfo_ADEC_mpeg_xxxx2, 555 556 AUR2_CommInfo_ADEC_ac3_xxxx = 0x0200, 557 AUR2_CommInfo_ADEC_ac3_xxxx2, 558 559 AUR2_CommInfo_ADEC_aac_xxxx = 0x0300, 560 AUR2_CommInfo_ADEC_aac_xxxx2, 561 562 AUR2_CommInfo_ADEC_aacp_xxxx = 0x0400, 563 AUR2_CommInfo_ADEC_aacp_xxxx2, 564 565 AUR2_CommInfo_ADEC_lastcmd = 0x3FFF, 566 567 //*********************************************** 568 // Advanced sound effect 569 //*********************************************** 570 AUR2_CommInfo_AASE_AaseType = 0x4000, 571 572 AUR2_CommInfo_AASE_SRS_xxxx = 0x4100, 573 AUR2_CommInfo_AASE_SRS_xxxx2, 574 AUR2_CommInfo_AASE_SRS_xxxx3, 575 576 AUR2_CommInfo_AASE_SRSHD_xxxx = 0x4200, 577 AUR2_CommInfo_AASE_SRSHD_xxxx2, 578 AUR2_CommInfo_AASE_SRSHD_xxxx3, 579 580 AUR2_CommInfo_AASE_SRS_Apollo_xxxx = 0x4300, 581 AUR2_CommInfo_AASE_SRS_Apollo_xxxx2, 582 AUR2_CommInfo_AASE_SRS_Apollo_xxxx3, 583 584 AUR2_CommInfo_AASE_VDS_xxxx = 0x4400, 585 AUR2_CommInfo_AASE_VDS_xxxx2, 586 AUR2_CommInfo_AASE_VDS_xxxx3, 587 588 AUR2_CommInfo_AASE_VSPK_xxxx = 0x4500, 589 AUR2_CommInfo_AASE_VSPK_xxxx2, 590 AUR2_CommInfo_AASE_VSPK_xxxx3, 591 592 AUR2_CommInfo_AASE_PL2_xxxx = 0x4600, 593 AUR2_CommInfo_AASE_PL2_xxxx2, 594 AUR2_CommInfo_AASE_PL2_xxxx3, 595 596 AUR2_CommInfo_AASE_DtsSymmetry_xxxx = 0x4700, 597 AUR2_CommInfo_AASE_DtsSymmetry_xxxx2, 598 599 AUR2_CommInfo_AASE_CV3_xxxx = 0x4800, 600 AUR2_CommInfo_AASE_CV3_xxxx2, 601 602 AUR2_CommInfo_AASE_CV4_xxxx = 0x4900, 603 AUR2_CommInfo_AASE_CV4_xxxx2, 604 605 AUR2_CommInfo_AASE_CUSFUNC_xxxx = 0x7E00, 606 AUR2_CommInfo_AASE_CUSFUNC_xxxx2, 607 AUR2_CommInfo_AASE_CUSFUNC_xxxx3, 608 609 AUR2_CommInfo_AASE_lastcmd = 0x7FFF, 610 611 //*********************************************** 612 // Basic sound effect 613 //*********************************************** 614 AUR2_CommInfo_ABSE_Volume = 0x8000, 615 AUR2_CommInfo_ABSE_Prescale, 616 AUR2_CommInfo_ABSE_Treble, 617 AUR2_CommInfo_ABSE_Bass, 618 AUR2_CommInfo_ABSE_EQ, 619 620 AUR2_CommInfo_ABSE_lastcmd = 0x8FFF, 621 622 //*********************************************** 623 // Encoder 624 //*********************************************** 625 AUR2_CommInfo_AENC_xxxx = 0x9000, 626 AUR2_CommInfo_AENC_xxxx2, 627 628 AUR2_CommInfo_AENC_lastcmd = 0x9FFF, 629 630 //*********************************************** 631 // IO 632 //*********************************************** 633 AUR2_CommInfo_AIO_xxxx = 0xA000, 634 635 AUR2_CommInfo_AIO_lastcmd = 0xAFFF, 636 637 //*********************************************** 638 // Others 639 //*********************************************** 640 AUR2_CommInfo_Misc_country = 0xB000, 641 642 } R2_AudioInfoType; 643 644 typedef enum 645 { 646 R2_SHM_INFO_CAPABILITY, 647 R2_SHM_INFO_DEC_STAUS, 648 R2_SHM_INFO_DEC_ERROR_ID, 649 R2_SHM_INFO_SMP_RATE, 650 R2_SHM_INFO_BIT_RATE, 651 R2_SHM_INFO_SYNTH_RATE, 652 R2_SHM_INFO_DEC_CHANNEL_MODE, 653 R2_SHM_INFO_DEC_CHANNEL_MAPPING, 654 655 R2_SHM_INFO_ES_LEVEL, 656 R2_SHM_INFO_PCM_LEVEL, 657 R2_SHM_INFO_PCM_DMX_LEVEL, 658 R2_SHM_INFO_ES_RD_PTR, //a 659 R2_SHM_INFO_PCM_WR_PTR, 660 R2_SHM_INFO_MM_FILE_REQ_SIZE, //c 661 662 R2_SHM_INFO_ACCUM_ES_BYTECNT, 663 R2_SHM_INFO_WAIT_1STPTS_CNT, 664 R2_SHM_INFO_WAIT_STC_CNT, 665 R2_SHM_INFO_SMP_FLUSH_CNT, 666 667 R2_SHM_INFO_AVSYNC_STATE, 668 R2_SHM_INFO_AVSYNC_FREERUN_TYPE, 669 R2_SHM_INFO_AVSYNC_OFFSET, 670 671 R2_SHM_INFO_PTS_TAG_WR_IDX, 672 R2_SHM_INFO_PTS_TAG_RD_IDX, 673 674 R2_SHM_INFO_PLAY_STATE, 675 R2_SHM_INFO_DEC_TYPE, 676 R2_SHM_INFO_PLAYSMPFLAG, 677 R2_SHM_INFO_DEC_CALLING_CNT, 678 R2_SHM_INFO_RECEIVE_STOP_CNT, 679 680 R2_SHM_INFO_OK_FRMCNT, 681 R2_SHM_INFO_ERR_FRMCNT, 682 R2_SHM_INFO_SKIP_FRMCNT, 683 R2_SHM_INFO_REPT_FRMCNT, 684 R2_SHM_INFO_SYNC_MISS_CNT, 685 R2_SHM_INFO_PCM_EMPTY_CNT, 686 687 R2_SHM_INFO_STC, 688 R2_SHM_INFO_PTS, 689 R2_SHM_INFO_CURR_PTS, 690 R2_SHM_INFO_TD, 691 R2_SHM_INFO_PTS_LATENCY, 692 693 R2_SHM_INFO_UNI_DECODE_DONE_CNT, 694 R2_SHM_INFO_UNI_DECODE_DONE_PCM_ADDR, 695 R2_SHM_INFO_UNI_DECODE_DONE_PCM_SIZE, 696 697 R2_SHM_INFO_PCM_ADDR, 698 R2_SHM_INFO_PCM_SIZE, 699 700 R2_SHM_INFO_spdifbuf_LEVEL, 701 R2_SHM_INFO_spdifbuf_WR_PTR, 702 703 R2_SHM_INFO_DOLBY_DEC_TYPE, 704 R2_SHM_INFO_DOLBY_FRAME_SIZE, 705 R2_SHM_INFO_DOLBY_BS_MODE, 706 R2_SHM_INFO_DOLBY_AAC_TYPE, 707 708 R2_SHM_INFO_DTS_CD_MODE, 709 R2_SHM_INFO_DTS_ES_TYPE, 710 711 R2_SHM_INFO_MPEG_LAYER, 712 R2_SHM_INFO_MPEG_STEREOMODE, 713 R2_SHM_INFO_MPEG_HEADER, 714 R2_SHM_INFO_UNSUPPORT_TYPE, 715 R2_SHM_INFO_TRANSCODE_FLAG, 716 717 R2_SHM_INFO_SPDIFTx_SMP_RATE, 718 R2_SHM_INFO_HDMITx_SMP_RATE, 719 720 R2_SHM_INFO_PCM_OUTPUT_CHANNEL, 721 R2_SHM_INFO_OMX_NO_MIXING, 722 R2_SHM_INFO_OMX_ES_BYPASS, 723 R2_SHM_INFO_SECURITY_INFO, 724 R2_SHM_INFO_OMX_MCH_VALID, 725 } R2_SHM_INFO_TYPE; 726 727 typedef enum 728 { 729 R2_SHM_PARAM_ES_WR_PTR, 730 R2_SHM_PARAM_MPG_AVOFFSET, 731 R2_SHM_PARAM_AC3_AVOFFSET, 732 R2_SHM_PARAM_AAC_AVOFFSET, 733 734 R2_SHM_PARAM_DOLBY_DRC_MODE, 735 R2_SHM_PARAM_DOLBY_RF_MODE, 736 R2_SHM_PARAM_DOLBY_DMX_MODE, 737 R2_SHM_PARAM_DOLBY_HIGH_CUT, 738 R2_SHM_PARAM_DOLBY_LOW_BOOST, 739 R2_SHM_PARAM_DOLBY_GAIN, 740 R2_SHM_PARAM_DOLBY_MUL_FRAME_HEADER, 741 R2_SHM_PARAM_DOLBY_AAC_BYPASS, 742 R2_SHM_PARAM_DOLBY_DDP_HDMI_BYPASS, 743 R2_SHM_PARAM_DOLBY_TB11_ENABLE, 744 R2_SHM_PARAM_DOLBY_MIXER_BALANCE, 745 746 R2_SHM_PARAM_PARSER_SPEC, 747 R2_SHM_PARAM_PARSER_PES_BYPASS, 748 R2_SHM_PARAM_PARSER_PUSI_DISABLE, 749 R2_SHM_PARAM_REPORT_MM_TS_PTS_WITH_MSB, 750 R2_SHM_PARAM_MM_TS_SYNC_STC, 751 R2_SHM_PARAM_MM_FF2X, 752 R2_SHM_PARAM_DECODE_MUTE, 753 R2_SHM_PARAM_SOUND_MODE, 754 R2_SHM_PARAM_EXT_SMPRATE_CTRL, 755 756 R2_SHM_PARAM_MM_FILE_REQ_SIZE, 757 R2_SHM_PARAM_MM_INPUT_PTS, 758 759 R2_SHM_PARAM_UNI_PCM_SET_OUTPUT_CNT, 760 R2_SHM_PARAM_UNI_SETUP_DECODE_FRMCNT, 761 R2_SHM_PARAM_ES2_WR_PTR, 762 763 R2_SHM_PARAM_OMX_SPDIF_CTRL, 764 R2_SHM_PARAM_OMX_SPDIF_PCM_LEVEL, 765 766 R2_SHM_PARAM_MAIN_VOLUME, 767 R2_SHM_PARAM_MAIN_VOLUME_MUTE, 768 R2_SHM_PARAM_AD_VOLUME, 769 R2_SHM_PARAM_AD_VOLUME_MUTE, 770 771 R2_SHM_PARAM_MPEG_SOUNDMODE, 772 R2_SHM_PARAM_MPEG_GAIN, 773 774 R2_SHM_PARAM_COOK_NUMCODECS, 775 R2_SHM_PARAM_COOK_SAMPLES, 776 R2_SHM_PARAM_COOK_SAMPLERATES, 777 R2_SHM_PARAM_COOK_CHANNELS, 778 R2_SHM_PARAM_COOK_REGIONS, 779 R2_SHM_PARAM_COOK_CPLSTART, 780 R2_SHM_PARAM_COOK_CPLQBITS, 781 R2_SHM_PARAM_COOK_FRAMESIZE, 782 783 R2_SHM_PARAM_DTS_DMX_LFE_ENABLE, 784 R2_SHM_PARAM_DTS_DMX_MODE, 785 786 R2_SHM_PARAM_ASF_VERSION, 787 R2_SHM_PARAM_ASF_CHANNELS, 788 R2_SHM_PARAM_ASF_SAMPLERATE, 789 R2_SHM_PARAM_ASF_BYTERATE, 790 R2_SHM_PARAM_ASF_BLOCKALIGN, 791 R2_SHM_PARAM_ASF_ENCOPT, 792 R2_SHM_PARAM_ASF_PARSINGBYAPP, 793 R2_SHM_PARAM_ASF_BITS_PER_SAMPLE, 794 R2_SHM_PARAM_ASF_CHANNELMASK, 795 R2_SHM_PARAM_ASF_DRC_PARAM_EXIST, 796 R2_SHM_PARAM_ASF_DRC_RMS_AMP_REF, 797 R2_SHM_PARAM_ASF_DRC_RMS_AMP_TARGET, 798 R2_SHM_PARAM_ASF_DRC_PEAK_AMP_REF, 799 R2_SHM_PARAM_ASF_DRC_PEAK_AMP_TARGET, 800 R2_SHM_PARAM_ASF_MAX_PACKET_SIZE, 801 802 R2_SHM_PARAM_XPCM_TYPE, 803 R2_SHM_PARAM_XPCM_CHANNELS, 804 R2_SHM_PARAM_XPCM_SAMPLERATES, 805 R2_SHM_PARAM_XPCM_BITS_PER_SAMPLE, 806 R2_SHM_PARAM_XPCM_BLOCK_SIZE, 807 R2_SHM_PARAM_XPCM_SAMPLE_PER_BLOCK, 808 809 R2_SHM_PARAM_HASH_KEY, 810 811 R2_SHM_PARAM_SPDIF_TYPE, 812 813 R2_SHM_PARAM_RFSIGNAL_TYPE, 814 815 R2_SHM_PARAM_VORBIS_HEADER_SIZE, 816 817 R2_SHM_PARAM_TTS_EN, 818 819 R2_SHM_PARAM_ES_Limiter_EN, 820 R2_SHM_PARAM_ES_Limiter_Threshold, 821 R2_SHM_PARAM_PCM_Limiter_EN, 822 R2_SHM_PARAM_PCM_Limiter_Threshold, 823 R2_SHM_PARAM_STC_SELECT, 824 R2_SHM_PARAM_MULTI_CHANNEL, 825 R2_SHM_PARAM_DAP_EN, 826 R2_SHM_PARAM_SPEAKER_EN, 827 R2_SHM_PARAM_DDP_ENCODE_EN, 828 829 R2_SHM_PARAM_MP3_ENCODER_READ_PTR, 830 R2_SHM_PARAM_PCMR_SOUND_MODE, 831 } R2_SHM_PARAM_TYPE; 832 833 MS_U8 HAL_AUR2_ReadByte(MS_U32 u32RegAddr); 834 MS_U16 HAL_AUR2_ReadReg(MS_U32 u32RegAddr); 835 void HAL_AUR2_WriteByte(MS_U32 u32RegAddr, MS_U8 u8Val); 836 void HAL_AUR2_WriteReg(MS_U32 u32RegAddr, MS_U16 u16Val); 837 void HAL_AUR2_WriteMaskByte(MS_U32 u32RegAddr, MS_U8 u8Mask, MS_U8 u8Val); 838 void HAL_AUR2_WriteMaskReg(MS_U32 u32RegAddr, MS_U16 u16Mask, MS_U16 u16Val); 839 840 void HAL_DEC_R2_EnableR2( MS_BOOL en ); 841 void HAL_DEC_R2_init_SHM_param( void ); 842 void HAL_DEC_R2_SetCommInfo(R2_AudioParamType infoType, Audio_id id, MS_U16 param1, MS_U16 param2); 843 MS_U32 HAL_DEC_R2_GetCommInfo(R2_AudioInfoType infoType, Audio_id id, MS_U16 param1, MS_U16 param2); 844 MS_U32 HAL_DEC_R2_Get_SHM_INFO(R2_SHM_INFO_TYPE decInfoType, MS_U8 dec_id ); 845 MS_BOOL HAL_DEC_R2_Set_SHM_PARAM(R2_SHM_PARAM_TYPE decParamType, MS_U8 dec_id, MS_U32 param, MS_U32 param2 ); 846 MS_U32 HAL_DEC_R2_Get_SHM_PARAM(R2_SHM_PARAM_TYPE decParamType, MS_U8 dec_id, MS_U32 param ); 847 848 void HAL_SND_R2_EnableR2( MS_BOOL en ); 849 void HAL_SND_R2_init_SHM_param(void); 850 void HAL_SND_R2_SetCommInfo(R2_AudioParamType infoType, Audio_id id, MS_U16 param1, MS_U16 param2); 851 MS_U32 HAL_SND_R2_GetCommInfo(R2_AudioInfoType infoType, Audio_id id, MS_U16 param1, MS_U16 param2); 852 MS_U32 HAL_SND_R2_Get_SHM_INFO(R2_SHM_INFO_TYPE decInfoType, MS_U8 dec_id ); 853 MS_BOOL HAL_SND_R2_Set_SHM_PARAM(R2_SHM_PARAM_TYPE decParamType, MS_U8 dec_id, MS_U32 param, MS_U32 param2 ); 854 MS_U32 HAL_SND_R2_Get_SHM_PARAM(R2_SHM_PARAM_TYPE decParamType, MS_U8 dec_id, MS_U32 param ); 855 856 857 #endif 858