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 //////////////////////////////////////////////////////////////////////////////// 79 // 80 // Copyright (c) 2008-2009 MStar Semiconductor, Inc. 81 // All rights reserved. 82 // 83 // Unless otherwise stipulated in writing, any and all information contained 84 // herein regardless in any format shall remain the sole proprietary of 85 // MStar Semiconductor Inc. and be kept in strict confidence 86 // ("MStar Confidential Information") by the recipient. 87 // Any unauthorized act including without limitation unauthorized disclosure, 88 // copying, use, reproduction, sale, distribution, modification, disassembling, 89 // reverse engineering and compiling of the contents of MStar Confidential 90 // Information is unlawful and strictly prohibited. MStar hereby reserves the 91 // rights to any and all damages, losses, costs and expenses resulting therefrom. 92 // 93 //////////////////////////////////////////////////////////////////////////////// 94 95 /////////////////////////////////////////////////////////////////////////////////////////////////// 96 /// 97 /// @file apiAUDIO.h 98 /// @brief AUDIO API 99 /// @author MStar Semiconductor Inc. 100 /////////////////////////////////////////////////////////////////////////////////////////////////// 101 102 /*! \defgroup Audio Audio interface 103 104 \brief 105 Audio Module is used for: 106 107 - 1. Audio Input source handling 108 - support input source as VGA, ATV, CVBS, YPbPr, SCART, HDMI, DTV, MM ... 109 110 - 2. Audio Output source handling 111 - support stereo audio analog output ,SPDIF digital output, I2S, HDMI 1.4 ARC output 112 113 - 3. Basic Sound Effect support 114 - support Volume Control , Bass, Treble, GEQ, PEQ, Surround, AVC ... 115 116 - 4. Digital audio format decoding 117 - support MPEG-1, MPEG-2(Layer I/II), MP3, AC-3,E-AC-3, WMA, HE-AAC, DTS, FLAC, XPCM 118 119 - 5. Advanced Sound Effect support 120 - support SRS-TSHD , SRS-TSXT, DBX.... 121 122 - All audio related features , architecture and bolck diagram are collected in 123 MStar Audio Application Note(Chip dependent). 124 125 *! \defgroup Audio_System System 126 * \ingroup Audio 127 128 *! \defgroup Audio_Decoder Decoder 129 * \ingroup Audio 130 131 *! \defgroup Audio_ATV_SPDIF_HDMI ATV SPDIF HDMI 132 * \ingroup Audio 133 134 *! \defgroup Audio_BASIC_SOUNDEFFECT Basic Sound Effect 135 * \ingroup Audio 136 137 *! \defgroup Audio_ADVANCED_SOUNDEFFECT Advanced Sound Effect 138 * \ingroup Audio 139 140 *! \defgroup Audio_ToBeMerged To Be Merged 141 * \ingroup Audio 142 143 *! \defgroup Audio_ToBeModified To Be Modified 144 * \ingroup Audio 145 146 *! \defgroup Audio_ToBeMoved To Be Moved 147 * \ingroup Audio 148 149 *! \defgroup Audio_ToBeRemove To Be Removed 150 * \ingroup Audio 151 */ 152 153 #ifndef _API_AUDIO_H_ 154 #define _API_AUDIO_H_ 155 156 #include "MsCommon.h" 157 #include "drvAUDIO_if.h" 158 159 160 #ifdef __cplusplus 161 extern "C" 162 { 163 #endif 164 //------------------------------------------------------------------------------------------------- 165 // Macro and Define 166 //------------------------------------------------------------------------------------------------- 167 //----------------------------------------------------------- 168 #define MSAPI_AUD_SPDIF_PCM 0 169 #define MSAPI_AUD_SPDIF_OFF 1 170 #define MSAPI_AUD_SPDIF_NONPCM 2 171 172 #define MSAPI_AUD_DTV_IN 0 173 #define MSAPI_AUD_ATV_IN 1 174 #define MSAPI_AUD_HDMI_IN 2 175 #define MSAPI_AUD_ADC_IN 3 176 #define MSAPI_AUD_CardRD_IN 4 177 #define MSAPI_AUD_MM_IN 5 178 179 #define MSAPI_AUD_AVsync 0 180 #define MSAPI_AUD_FreeRun 1 181 182 /// A2/FM/_SOUND_MOD Report info 183 #define _STATUS_MOD_MONO_EXIST 0x01 184 #define _STATUS_MOD_STEREO_EXIST 0x02 185 #define _STATUS_MOD_DUAL_EXIST 0x04 186 #define _STATUS_MOD_A2_PILOT_EXIST 0x08 187 #define _STATUS_MOD_A2_PRIMARY_EXIST 0x10 188 #define _STATUS_MOD_A2_SECONDARY_EXIST 0x20 189 #define _STATUS_MOD_A2_DK2_EXIST 0x40 190 #define _STATUS_MOD_A2_DK3_EXIST 0x80 191 192 /// NICAM_SOUND_MOD Report info 193 #define _MASK_NICAM_STATUS_INFO 0x0F 194 #define _NICAM_SOUND_MODE_LOCK_STATE 0x05 195 #define _MASK_NICAM_SOUND_MODE_INFO 0xF0 196 #define _NICAM_SOUND_MOD_MONO_NOT_EXIST 0x00 197 #define _NICAM_SOUND_MOD_NICAM_MONO 0x10 198 #define _NICAM_SOUND_MOD_NICAM_STEREO 0x20 199 #define _NICAM_SOUND_MOD_NICAM_DUAL 0x30 200 #define _NICAM_SOUND_MOD_MONO_EXIST 0x80 201 #define _NICAM_SOUND_MOD_MONO_n_NICAM_MONO 0x90 202 #define _NICAM_SOUND_MOD_MONO_n_NICAM_STEREO 0xA0 203 #define _NICAM_SOUND_MOD_MONO_n_NICAM_DUAL 0xB0 204 205 /******************************** 206 * SIF Standard 207 ********************************/ 208 #define _STD_SEL_INVALID 0x00 209 #define _STD_SEL_M_BTSC 0x01 210 #define _STD_SEL_M_EIAJ 0x02 211 #define _STD_SEL_M_A2 0x03 212 #define _STD_SEL_BG_A2 0x04 213 #define _STD_SEL_DK1_A2 0x05 214 #define _STD_SEL_DK2_A2 0x06 215 #define _STD_SEL_DK3_A2 0x07 216 #define _STD_SEL_BG_NICAM 0x08 217 #define _STD_SEL_DK_NICAM 0x09 218 #define _STD_SEL_I_NICAM 0x0A 219 #define _STD_SEL_L_NICAM 0x0B 220 #define _STD_SEL_AUTO 0xE0 221 222 //------------------------------------------------------------------------------------------------- 223 // Type and Structure 224 //------------------------------------------------------------------------------------------------- 225 ///< Decoder command type 226 typedef enum 227 { 228 MSAPI_AUD_DVB_DECCMD_STOP = 0x0, ///< 1st DSP stop 229 MSAPI_AUD_DVB_DECCMD_PLAY, ///< 1st DSP play 230 MSAPI_AUD_DVB_DECCMD_RESYNC, 231 MSAPI_AUD_DVB_DECCMD_FREE_RUN, 232 MSAPI_AUD_DVB_DECCMD_AVSYNC, 233 MSAPI_AUD_DVB_DECCMD_PLAYFILE, ///< 1st DSP play file 234 MSAPI_AUD_DVB_DECCMD_PAUSE, ///< 1st DSP pause 235 MSAPI_AUD_DVB_DECCMD_PLAYFILETSP, ///< 1st DSP play TS file 236 MSAPI_AUD_DVB_DECCMD_STARTBROWSE, 237 MSAPI_AUD_DVB_DECCMD_PLAYFRAME, ///<1st DSP play MM (for uniplayer/Mstreamer) 238 MSAPI_AUD_DVB_DECCMD_PLAYFRAME_STAGE, ////<1st DSP play MM (for stagecraft) 239 MSAPI_AUD_DVB_DECCMD_PLAYFRAME_GS, ///<1st DSP play MM (for uniplayer/Gstreamer ES copy) 240 MSAPI_AUD_DVB_DECCMD_PLAYMM_FILE2, 241 MSAPI_AUD_DVB_DECCMD_PLAY_AD, 242 MSAPI_AUD_DVB_DECCMD_STOP_AD, 243 MSAPI_AUD_DVB_DECCMD_SKIP, 244 // SE DSP 245 MSAPI_AUD_DVB2_DECCMD_STOP=0x10, ///< 2nd DSP stop 246 MSAPI_AUD_DVB2_DECCMD_PLAY, ///< 2nd DSP play 247 MSAPI_AUD_DVB2_DECCMD_RESYNC, 248 MSAPI_AUD_DVB2_DECCMD_FREE_RUN, 249 MSAPI_AUD_DVB2_DECCMD_AVSYNC, 250 MSAPI_AUD_DVB2_DECCMD_PLAYFILE, ///< 2nd DSP play file 251 MSAPI_AUD_DVB2_DECCMD_PAUSE, ///< 2nd DSP pause 252 MSAPI_AUD_DVB2_DECCMD_PLAYFILETSP, ///< 2nd DSP play TS file 253 254 } En_DVB_decCmdType; 255 256 ///< Encoder Command 257 typedef enum 258 { 259 MSAPI_AUD_DVB_ENCCMD_STOP = 0x0, ///< stop encode 260 MSAPI_AUD_DVB_ENCCMD_START ///< start encode 261 }En_DVB_EncCmdType; 262 263 ///< ATV SIF Command 264 typedef enum 265 { 266 MSAPI_AUD_SIF_CMD_SET_STOP = 0x00, 267 MSAPI_AUD_SIF_CMD_SET_PLAY = 0x01, 268 MSAPI_AUD_SIF_CMD_ENABLE_HIDEV = 0x02, 269 MSAPI_AUD_SIF_CMD_SET_HIDEV_FILTER_BW_LEVEL = 0x03, 270 MSAPI_AUD_SIF_CMD_RESET_FC_TRACKING = 0x04, 271 MSAPI_AUD_SIF_CMD_ENABLE_FC_TRACKING = 0x05, 272 MSAPI_AUD_SIF_CMD_SET_ADC_FROM_VIF_PATH = 0x06, 273 MSAPI_AUD_SIF_CMD_ENABLE_AUTO_MUTE = 0x07, 274 MSAPI_AUD_SIF_CMD_ENABLE_BEEPER_FUNCTION = 0x08, 275 MSAPI_AUD_SIF_CMD_SET_BEEPER_TONE = 0x09, 276 MSAPI_AUD_SIF_CMD_ENABLE_AGC = 0x0A, 277 MSAPI_AUD_SIF_CMD_RESET_AGC = 0x0B, 278 MSAPI_AUD_SIF_STANDARD_RESET = 0x0C, 279 MSAPI_AUD_SIF_CMD_DETECT_MAIN_STD_ONLY = 0x0D, 280 MSAPI_AUD_SIF_CMD_ENABLE_AUTO_SOUNDMODE = 0x0E, 281 MSAPI_AUD_SIF_CMD_FMTX_SET_PREEMP = 0x0F, 282 MSAPI_AUD_SIF_CMD_SET_ENC_CMD = 0x10, 283 MSAPI_AUD_SIF_CMD_SET_ENC_Input_attenuation= 0x11, 284 MSAPI_AUD_SIF_CMD_SET_ENC_Output_scaling= 0x12, 285 MSAPI_AUD_SIF_CMD_SET_BTSC_Enc_M_Gain=0x13, 286 MSAPI_AUD_SIF_CMD_SET_BTSC_Enc_D_Gain= 0x14, 287 MSAPI_AUD_SIF_CMD_SET_BTSC_Enc_SAP_Gain= 0x15, 288 289 MSAPI_AUD_SIF_CMD2_ADC_VIA_VIF_PIN = 0x01 290 } En_AUD_SIF_CmdType; 291 292 typedef enum 293 { 294 MSAPI_AUD_SIF_42M, 295 MSAPI_AUD_SIF_43M, 296 MSAPI_AUD_SIF_44M, 297 } En_AUD_VIF_Type; 298 299 enum 300 { 301 MSAPI_AUD_SIF_HIDEV_FILTER_BW_DEFAULT = 0x00, // equal middle filter bandwidth 302 MSAPI_AUD_SIF_HIDEV_FILTER_BW_L1 = 0x10, // narrowest filter bandwidth 303 MSAPI_AUD_SIF_HIDEV_FILTER_BW_L2 = 0x20, // middle filter bandwidth 304 MSAPI_AUD_SIF_HIDEV_FILTER_BW_L3 = 0x30 // widest filter bandwidth 305 }; 306 307 ///< Decoder Number 308 typedef enum 309 { 310 DVB_Audio_Decoder1, ///<Audio decoder1 311 DVB_Audio_Decoder2 ///<Audio decoder2 312 } En_DVB_AudioDecoder; 313 314 ///< Advance sound effect type 315 typedef enum 316 { 317 MSAPI_AUD_ADVSND_PL2, ///<ID = 0 318 MSAPI_AUD_ADVSND_BBE, ///<ID = 1 319 MSAPI_AUD_ADVSND_SRS, ///<ID = 2 320 MSAPI_AUD_ADVSND_VDS, ///<ID = 3 321 MSAPI_AUD_ADVSND_VSPK, ///<ID = 4 322 MSAPI_AUD_ADVSND_SUPV, ///<ID = 5 323 MSAPI_AUD_ADVSND_TSHD, ///<ID = 6 324 MSAPI_AUD_ADVSND_DTS_ULTRATV, ///<ID = 7 325 MSAPI_AUD_ADVSND_TSHDVIQ, ///<ID = 8 326 MSAPI_AUD_ADVSND_AUDYSSEY, ///<ID = 9 327 MSAPI_AUD_ADVSND_DBX, ///<ID = 10 328 MSAPI_AUD_ADVSND_SSHD_TSHD, ///<ID = 55 329 MSAPI_AUD_ADVSND_PURESND, ///<ID = 66 330 MSAPI_AUD_ADVSND_BONGIOVI_DPS, ///<ID = 93 331 332 } En_DVB_advsndType; 333 334 ///< Select audio output mode type 335 typedef enum 336 { 337 MSAPI_AUD_DVB_SOUNDMODE_STEREO, 338 MSAPI_AUD_DVB_SOUNDMODE_LEFT, 339 MSAPI_AUD_DVB_SOUNDMODE_RIGHT, 340 MSAPI_AUD_DVB_SOUNDMODE_NONE, 341 } En_DVB_soundModeType; 342 343 ///< Melody play command type 344 typedef enum 345 { 346 MSAPI_AUD_MELODY_START, 347 MSAPI_AUD_MELODY_STOP, 348 MSAPI_AUD_MELODY_RESUME, 349 MSAPI_AUD_MELODY_CHK_STATUS 350 }En_DVB_melodyPlayCmdType; 351 352 typedef struct 353 { 354 MS_U32 u32BufStartAddr; 355 MS_U32 u32BufEndAddr; 356 MS_U32 u32BufWrPtr; 357 MS_U32 u32BufTotalSize; 358 MS_U32 u32BufferedPCMSize; 359 }audioBufMonitor; 360 361 typedef struct 362 { 363 audioBufMonitor _stBufInfo; 364 MS_U32 u32ReqAddr; 365 MS_U32 u32ReqSize; 366 MS_PHY phyRetAddr1; 367 MS_U32 u32RetSize1; 368 MS_PHY phyRetAddr2; 369 MS_U32 u32RetSize2; 370 MS_U8 u8RingStatus; 371 }audioRingTask; 372 373 374 ///< Melody play status 375 typedef enum 376 { 377 MSAPI_AUD_MELODY_NEED_MORE_DATA, 378 MSAPI_AUD_MELODY_PLAY_INIT, 379 MSAPI_AUD_MELODY_PLAY_ING, 380 MSAPI_AUD_MELODY_PLAY_DONE, 381 MSAPI_AUD_MELODY_PLAY_STOP 382 }En_DVB_melodyPlayStatus; 383 384 ///< Select AD output type 385 enum 386 { 387 AD_OUT_SPEAKER, ///< AD out in speaker only 388 AD_OUT_HP, ///< AD out in HP only 389 AD_OUT_BOTH, ///< AD out both in speaker & HP 390 AD_OUT_NONE ///< no AD out 391 }; 392 393 ///< Audio System Type 394 typedef enum 395 { 396 E_AUDIO_SYSTEM_BTSC, 397 E_AUDIO_SYSTEM_A2, 398 E_AUDIO_SYSTEM_EIAJ 399 }AUDIO_SYSTEM_TYPE; 400 401 ///< Audio SIF Standard Type 402 typedef enum 403 { 404 E_AUDIOSTANDARD_BG = 0x00, ///< Audio standard BG 405 E_AUDIOSTANDARD_BG_A2 = 0x01, ///< Audio standard BG A2 406 E_AUDIOSTANDARD_BG_NICAM = 0x02, ///< Audio standard BG NICAM 407 E_AUDIOSTANDARD_I = 0x03, ///< Audio standard I 408 E_AUDIOSTANDARD_DK = 0x04, ///< Audio standard DK 409 E_AUDIOSTANDARD_DK1_A2 = 0x05, ///< Audio standard DK1 A2 410 E_AUDIOSTANDARD_DK2_A2 = 0x06, ///< Audio standard DK2 A2 411 E_AUDIOSTANDARD_DK3_A2 = 0x07, ///< Audio standard DK3 A2 412 E_AUDIOSTANDARD_DK_NICAM = 0x08, ///< Audio standard DK NICAM 413 E_AUDIOSTANDARD_L = 0x09, ///< Audio standard L 414 E_AUDIOSTANDARD_M = 0x0A, ///< Audio standard M 415 E_AUDIOSTANDARD_M_BTSC = 0x0B, ///< Audio standard M BTSC 416 E_AUDIOSTANDARD_M_A2 = 0x0C, ///< Audio standard M A2 417 E_AUDIOSTANDARD_M_EIA_J = 0x0D, ///< Audio standard M EIA J 418 E_AUDIOSTANDARD_NOTSTANDARD = 0x0F ///< Not Audio standard 419 } AUDIOSTANDARD_TYPE; 420 421 ///< Audio Stream type 422 typedef enum 423 { 424 E_AUDIOSTREAM_INVALID = 0x00, 425 E_AUDIOSTREAM_MPEG = 0x01, 426 E_AUDIOSTREAM_AC3 = 0x02, 427 E_AUDIOSTREAM_MPEG_AD = 0x03, 428 E_AUDIOSTREAM_MPEG4 = 0x04, 429 E_AUDIOSTREAM_AAC = 0x05, 430 E_AUDIOSTREAM_AC3P = 0x06, 431 E_AUDIOSTREAM_AC3_AD = 0x07, 432 E_AUDIOSTREAM_AC3P_AD = 0x08, 433 E_AUDIOSTREAM_AACP_AD = 0x09, 434 E_AUDIOSTREAM_DRA = 0x0A 435 } AUDIOSTREAM_TYPE; 436 437 ///< Audio mode type 438 typedef enum 439 { 440 E_AUDIOMODE_INVALID = 0x00, ///< Audio Mode Invalid 441 E_AUDIOMODE_MONO = 0x01, ///< Audio Mode MONO 442 E_AUDIOMODE_FORCED_MONO = 0x02, ///< Audio Mode Forced MONO 443 E_AUDIOMODE_G_STEREO = 0x03, ///< Audio Mode G Stereo 444 E_AUDIOMODE_K_STEREO = 0x04, ///< Audio Mode K Stereo 445 E_AUDIOMODE_MONO_SAP = 0x05, ///< Audio Mode MONO SAP 446 E_AUDIOMODE_STEREO_SAP = 0x06, ///< Audio Mode Stereo SAP 447 E_AUDIOMODE_DUAL_A = 0x07, ///< Audio Mode Dual A 448 E_AUDIOMODE_DUAL_B = 0x08, ///< Audio Mode Dual B 449 E_AUDIOMODE_DUAL_AB = 0x09, ///< Audio Mode Dual AB 450 E_AUDIOMODE_NICAM_MONO = 0x0A, ///< Audio Mode NICAM MONO 451 E_AUDIOMODE_NICAM_STEREO = 0x0B, ///< Audio Mode NICAM Stereo 452 E_AUDIOMODE_NICAM_DUAL_A = 0x0C, ///< Audio Mode NICAM DUAL A 453 E_AUDIOMODE_NICAM_DUAL_B = 0x0D, ///< Audio Mode NICAM DUAL B 454 E_AUDIOMODE_NICAM_DUAL_AB = 0x0E, ///< Audio Mode NICAM DUAL AB 455 E_AUDIOMODE_HIDEV_MONO = 0x0F, ///< Audio Mode HIDEV MONO 456 E_AUDIOMODE_LEFT_LEFT = 0x10, ///< Audio Mode Left left 457 E_AUDIOMODE_RIGHT_RIGHT = 0x11, ///< Audio Mode right right 458 E_AUDIOMODE_LEFT_RIGHT = 0x12 ///< Audio Mode left right 459 } AUDIOMODE_TYPE; 460 461 ///< sif carrier status define 462 typedef enum 463 { // Never change the value of enumeration. Because each bit has weight. 464 E_STATE_AUDIO_NO_CARRIER = 0x00, ///< No carrier detect 465 E_STATE_AUDIO_PRIMARY_CARRIER = 0x01, ///< Carrier 1 exist 466 E_STATE_AUDIO_SECONDARY_CARRIER = 0x02, ///< Carrier 2 exist 467 E_STATE_AUDIO_NICAM = 0x04, ///< Nicam lock state 468 E_STATE_AUDIO_STEREO = 0x08, ///< A2 Stereo exist 469 E_STATE_AUDIO_BILINGUAL = 0x10, ///< A2 Dual exist 470 E_STATE_AUDIO_PILOT = 0x20, ///< A2 Pilot exist 471 E_STATE_AUDIO_DK2 = 0x40, ///< Sound standard is DK2 472 E_STATE_AUDIO_DK3 = 0x80 ///< Sound standard is DK3 473 } AUDIOSTATUS; 474 475 ///< EQ band define 476 typedef enum 477 { 478 E_EQUALIZER_BAND_1 = 0x00, ///< EQ Band1 479 E_EQUALIZER_BAND_2 = 0x01, ///< EQ Band2 480 E_EQUALIZER_BAND_3 = 0x02, ///< EQ Band3 481 E_EQUALIZER_BAND_4 = 0x03, ///< EQ Band4 482 E_EQUALIZER_BAND_5 = 0x04, ///< EQ Band5 483 E_EQUALIZER_BAND_6 = 0x05, ///< EQ Band6 484 E_EQUALIZER_BAND_7 = 0x06 ///< EQ Band7 485 } EQUALIZER_BAND; 486 487 ///< Audio command type 488 typedef enum 489 { 490 E_AUDIO_COM_PLAY, 491 E_AUDIO_COM_STOP, 492 E_AUDIO_COM_RESYNC, 493 E_AUDIO_COM_FREE_RUN, 494 E_AUDIO_COM_LOCK_AVSYNC, 495 E_AUDIO_COM_FILE_PLAY, // start playing file based audio in MHEG5 496 E_AUDIO_COM_FILE_PAUSE, // pause playing file based audio in MHEG5 497 E_AUDIO_DVB2_COM_PLAY, 498 E_AUDIO_DVB2_COM_STOP, 499 E_AUDIO_DVB2_COM_RESYNC, 500 E_AUDIO_DVB2_COM_FREE_RUN, 501 E_AUDIO_DVB2_COM_LOCK_AVSYNC, 502 E_AUDIO_DVB2_COM_FILE_PLAY, // start playing file based audio in MHEG5 503 E_AUDIO_DVB2_COM_FILE_PAUSE // pause playing file based audio in MHEG5 504 } DTV_AUDIO_COMMAND; 505 506 enum 507 { 508 MSAPI_AUD_MODE_STEREO, ///< 0:STEREO 509 MSAPI_AUD_MODE_LL, ///< 1: LL 510 MSAPI_AUD_MODE_RR, ///< 2: RR 511 MSAPI_AUD_MODE_MUTE ///< 3:MUTE 512 }; 513 514 /// TSXT mode 515 enum 516 { 517 MSAPI_TSXT_OFF = 0, 518 MSAPI_TSXT_STEREO, 519 MSAPI_TSXT_3D_MONO, 520 MSAPI_TSXT_MAX, 521 MSAPI_TSXT_INVALID = -1 522 }; 523 524 typedef enum 525 { 526 E_TSXT_MOD_STEREO, ///< 0:STEREO 527 E_TSXT_MOD_3D_MONO, ///< 0:MONO 528 E_TSXT_MOD_MAX ///< 0:PASSIVE MATRIX 529 } TSXT_MODETYPE; 530 531 ///< TSXT parameter 532 typedef enum 533 { 534 E_TSXT_PARA_TS_GAIN, 535 E_TSXT_PARA_DC_GAIN, 536 E_TSXT_PARA_TB_GAIN, 537 E_TSXT_PARA_SPK, 538 E_TSXT_PARA_INPUT_MOD, 539 E_TSXT_PARA_OUTPUT_GAIN 540 } TSXT_PARATYPE; 541 542 ///< Audio DSP system type 543 typedef enum 544 { 545 E_AUDIO_DSP_MPEG, ///< AUDIO DSP = MPEG 546 E_AUDIO_DSP_AC3, ///< AUDIO DSP = AC3 547 E_AUDIO_DSP_AC3_AD, ///< AUDIO DSP = AC3 AD 548 E_AUDIO_DSP_SIF, ///< AUDIO DSP = SIF 549 E_AUDIO_DSP_AACP, ///< AUDIO DSP = HE-AAC 550 E_AUDIO_DSP_MPEG_AD, ///< AUDIO DSP = MPEG AD 551 E_AUDIO_DSP_AC3P, ///< AUDIO DSP = AC3+ 552 E_AUDIO_DSP_AC3P_AD, ///< AUDIO DSP = AC3P AD 553 E_AUDIO_DSP_AACP_AD, ///< AUDIO DSP = HE-AAC AD 554 E_AUDIO_DSP_DTS, ///< AUDIO DSP = DTS 555 E_AUDIO_DSP_MS10_DDT, ///< AUDIO DSP = MS10 DDT 556 E_AUDIO_DSP_MS10_DDC, ///< AUDIO DSP = MS10 DDC 557 E_AUDIO_DSP_FLAC, ///< AUDIO DSP = FLAC 558 E_AUDIO_DSP_FM_RADIO, ///< AUDIO DSP = FM RADIO 559 E_AUDIO_DSP_KTV, 560 E_AUDIO_DSP_RESERVE3, 561 E_AUDIO_DSP_RESERVE2, 562 E_AUDIO_DSP_RESERVE1, 563 E_AUDIO_DSP_MAX, 564 E_AUDIO_DSP_INVALID=0xFF ///< AUDIO DSP = Invalid 565 } AUDIO_DSP_SYSTEM; 566 567 ///<Audio source switch group 568 typedef enum 569 { 570 E_AUDIO_GROUP_MAIN, ///< Main speaker, HP, Line-out , S/PDIF PCM mode 571 E_AUDIO_GROUP_SCART, ///< SCART 572 E_AUDIO_GROUP_SPDIF, ///< SPDIF non-pcm 573 E_AUDIO_GROUP_SUB, ///< SUB source for PIP application 574 E_AUDIO_GROUP_INVALID 575 } AUDIO_SWITCH_GROUP; 576 577 #define TBL_INDEX MS_U8 578 #define TBL_LENGTH MS_U8 579 580 #define FM_RADIO_TBL_LENGTH 6 ///< FM Radio Threshold table length 581 #define BTSC_TBL_LENGTH 10 ///< BTSC Threshold table length 582 #define A2_M_TBL_LENGTH 10 ///< A2_M Threshold table length 583 #define A2_BG_TBL_LENGTH 10 ///< A2_BG Threshold table length 584 #define A2_DK_TBL_LENGTH 10 ///< A2_DK Threshold table length 585 #define FM_I_TBL_LENGTH 4 ///< FM_I Threshold table length 586 #define AM_TBL_LENGTH 2 ///< AM Threshold table length 587 #define NICAM_BG_TBL_LENGTH 2 ///< NICAM_BG Threshold table length 588 #define NICAM_I_TBL_LENGTH 2 ///< NICAM_I Threshold table length 589 #define HIDEV_M_TBL_LENGTH 4 ///< HIDEV_M Threshold table length 590 #define HIDEV_BG_TBL_LENGTH 4 ///< HIDEV_BG Threshold table length 591 #define HIDEV_DK_TBL_LENGTH 4 ///< HIDEV_DK Threshold table length 592 #define HIDEV_I_TBL_LENGTH 4 ///< HIDEV_I Threshold table length 593 594 #define FM_RADIO_TBL_INDEX 0 595 #define BTSC_TBL_INDEX 0 596 #define A2_M_TBL_INDEX 0 597 #define A2_BG_TBL_INDEX A2_M_TBL_INDEX + A2_M_TBL_LENGTH 598 #define A2_DK_TBL_INDEX A2_BG_TBL_INDEX + A2_BG_TBL_LENGTH 599 #define FM_I_TBL_INDEX A2_DK_TBL_INDEX + A2_DK_TBL_LENGTH 600 #define AM_TBL_INDEX FM_I_TBL_INDEX + FM_I_TBL_LENGTH 601 #define NICAM_BG_TBL_INDEX AM_TBL_INDEX + AM_TBL_LENGTH 602 #define NICAM_I_TBL_INDEX NICAM_BG_TBL_INDEX + NICAM_BG_TBL_LENGTH 603 #define HIDEV_M_TBL_INDEX NICAM_I_TBL_INDEX + NICAM_I_TBL_LENGTH 604 #define HIDEV_BG_TBL_INDEX HIDEV_M_TBL_INDEX + HIDEV_M_TBL_LENGTH 605 #define HIDEV_DK_TBL_INDEX HIDEV_BG_TBL_INDEX + HIDEV_BG_TBL_LENGTH 606 #define HIDEV_I_TBL_INDEX HIDEV_DK_TBL_INDEX + HIDEV_DK_TBL_LENGTH 607 608 //------------------------------------------------------------------------------------------------- 609 // Function and Variable 610 //------------------------------------------------------------------------------------------------- 611 612 //============================================================ 613 // AUDIO_SYSTEM RELATIONAL API FUNCTION 614 //============================================================ 615 616 //////////////////////////////////////////////////////////////////////////////// 617 /// @ingroup Audio_System 618 /// @brief \b Function \b Name: MApi_AUDIO_SetPowerOn() 619 /// @brief \b Function \b Description: This routine is used to execute DSP power on/down setting. 620 /// @param bFlag \b : TRUE --power on; 621 /// FALSE--power off 622 //////////////////////////////////////////////////////////////////////////////// 623 void MApi_AUDIO_SetPowerOn(MS_BOOL bFlag); 624 625 //////////////////////////////////////////////////////////////////////////////// 626 /// @ingroup Audio_System 627 /// @brief \b Function \b Name: MApi_AUD_Initialize() 628 /// @brief \b Function \b Description: Audio initialize function incluing DSP power on and load code. 629 //////////////////////////////////////////////////////////////////////////////// 630 void MApi_AUDIO_Initialize(void); 631 632 //////////////////////////////////////////////////////////////////////////////// 633 /// @ingroup Audio_System 634 /// @brief \b Function \b Name: MApi_AUDIO_SetSystemInfo() 635 /// @brief \b Function \b Description: Function for Driver layer to get the system compile option 636 /// (TV system , Audio system ....) 637 /// @param pau_info \b : Audio output path information structure pointer 638 /// Please refer AUDIO_INIT_INFO in header file 639 //////////////////////////////////////////////////////////////////////////////// 640 void MApi_AUDIO_SetSystemInfo(AUDIO_INIT_INFO *pau_info); 641 642 //////////////////////////////////////////////////////////////////////////////// 643 /// @ingroup Audio_System 644 /// @brief \b Function \b Name: MApi_Audio_Monitor() 645 /// @brief \b Function \b Description: This function is used to monitor DSP while-loop and ISR running counter. 646 /// If these counters stop longer than a certain period of time in any abnormal condition, DSP reboot will be launched to alive DSP process again. 647 //////////////////////////////////////////////////////////////////////////////// 648 void MApi_Audio_Monitor(void); 649 650 //////////////////////////////////////////////////////////////////////////////// 651 /// @ingroup Audio_System 652 /// @brief \b Function \b Name: MApi_AUDIO_SetOutConnectivity() 653 /// @brief \b Function \b Description: Set the TV output connectivity information from APP layer 654 /// to audio driver . Then audio driver will set the audio output 655 /// port with these information automatically. 656 /////////////////////////////////////////////////////////////////////////////// 657 void MApi_AUDIO_SetOutConnectivity(void); 658 659 //////////////////////////////////////////////////////////////////////////////// 660 /// @ingroup Audio_System 661 /// @brief \b Function \b Name: MApi_AUDIO_SetPathInfo() 662 /// @brief \b Function \b Description: Get audio output path information from APP 663 /// @param path_info \b : path information structure pointer 664 /// for Speaker , Head phone , Monitor out , Scart out and SPDIF out 665 //////////////////////////////////////////////////////////////////////////////// 666 void MApi_AUDIO_SetPathInfo(AUDIO_PATH_INFO *path_info); 667 668 //////////////////////////////////////////////////////////////////////////////// 669 /// @ingroup Audio_System 670 /// @brief \b Function \b Name: MApi_AUDIO_SetOutputInfo() 671 /// @brief \b Function \b Description: Get audio output information from APP 672 /// @param pout_info \b : Audio output path information structure pointer. 673 /// Please refer AUDIO_OUT_INFO in header file 674 //////////////////////////////////////////////////////////////////////////////// 675 void MApi_AUDIO_SetOutputInfo(AUDIO_OUT_INFO *pout_info); 676 677 //////////////////////////////////////////////////////////////////////////////// 678 /// @ingroup Audio_System 679 /// @brief \b Function \b Name: MApi_AUDIO_SetSourceInfo() 680 /// @brief \b Function \b Description: For driver layer to get audio source information from APP 681 /// @param eSourceType \b : information structure pointer ==>AUDIO_SOURCE_INFO_TYPE 682 /// - E_AUDIO_INFO_DTV_IN, 683 /// - E_AUDIO_INFO_ATV_IN, 684 /// - E_AUDIO_INFO_HDMI_IN, 685 /// - E_AUDIO_INFO_ADC_IN, 686 /// - E_AUDIO_INFO_MM_IN, 687 /// - E_AUDIO_INFO_SPDIF_IN, 688 /// - E_AUDIO_INFO_KTV_IN, 689 //////////////////////////////////////////////////////////////////////////////// 690 void MApi_AUDIO_SetSourceInfo(AUDIO_SOURCE_INFO_TYPE eSourceType); 691 692 //////////////////////////////////////////////////////////////////////////////// 693 /// @ingroup Audio_System 694 /// @brief \b Function \b Name: MApi_AUDIO_InputSwitch() 695 /// @brief \b Function \b Description: Set audio Input connectivity (for S7 serious only) 696 /// @param enSource \b : Please refer AUDIO_INPUT_TYPE enum in header file 697 ///@param enGroup \b : Please refer AUDIO_SWITCH_GROUP enum in header file 698 /////////////////////////////////////////////////////////////////////////////// 699 void MApi_AUDIO_InputSwitch(AUDIO_INPUT_TYPE enSource, AUDIO_SWITCH_GROUP enGroup); 700 701 //////////////////////////////////////////////////////////////////////////////// 702 /// @ingroup Audio_ToBeRemove 703 /// @brief \b Function \b Name: MApi_AUDIO_SetDataCaptureSource() 704 /// @brief \b Function \b Description: Select source for data capture 705 /// @param <IN> \b AUDIO_DEVICE_TYPE : select 1st or 2nd data capture 706 /// @param <IN> \b AUDIO_CAPTURE_SOURCE_TYPE : Data Source 707 /// @param <OUT> \b MS_BOOL : return TRUE if success, else return FALSE 708 /// @param <RET> \b NONE : 709 /// @param <GLOBAL> \b NONE : 710 //////////////////////////////////////////////////////////////////////////////// 711 MS_BOOL MApi_AUDIO_SetDataCaptureSource(AUDIO_DEVICE_TYPE eID, AUDIO_CAPTURE_SOURCE_TYPE eSource); 712 713 //////////////////////////////////////////////////////////////////////////////// 714 /// @ingroup Audio_System 715 /// @brief \b Function \b Name: MApi_AUDIO_SetOutputSourceInfo() 716 /// @brief \b Function \b Description: Set audio output source information 717 /// @param path_info \b : output port source information structure pointer 718 /// for Speaker , Head phone , Monitor out , Scart out and SPDIF out 719 //////////////////////////////////////////////////////////////////////////////// 720 void MApi_AUDIO_SetOutputSourceInfo(OUTPUT_SOURCE_INFO *pSourceInfo); 721 722 //////////////////////////////////////////////////////////////////////////////// 723 /// @ingroup Audio_System 724 /// @brief \b Function \b Name: MApi_AUDIO_GetOutputSourceInfo() 725 /// @brief \b Function \b Description: Get audio output path information from APP 726 /// @param pSourceInfo \b : output port source information structure pointer 727 /// for Speaker , Head phone , Monitor out , Scart out and SPDIF out 728 //////////////////////////////////////////////////////////////////////////////// 729 void MApi_AUDIO_GetOutputSourceInfo(OUTPUT_SOURCE_INFO *pSourceInfo); 730 731 //////////////////////////////////////////////////////////////////////////////// 732 /// @ingroup Audio_ToBeRemove 733 /// @brief \b Function \b Name: MApi_AUDIO_ReadMailBox() 734 /// @brief \b Function \b Description: This routine is used to read the DSP mail box value 735 /// @param bDspType \b : Select audio DEC/SE DSP 736 /// @param u8ParamNum \b : Mail box address 737 /// @return MS_U16 \b : Mail Box value 738 //////////////////////////////////////////////////////////////////////////////// 739 MS_U16 MApi_AUDIO_ReadMailBox(MS_BOOL bDspType, MS_U8 u8ParamNum); 740 741 //////////////////////////////////////////////////////////////////////////////// 742 /// @ingroup Audio_ToBeRemove 743 /// @brief \b Function \b Name: MDrv_AUDIO_WriteDecMailBox() 744 /// @brief \b Function \b Description: This routine is used to write DSP mail box 745 /// @param bDspType \b : Select audio DEC/SE DSP 746 /// @param u8ParamNum \b : Mail box address 747 /// @param u16Data \b : value 748 //////////////////////////////////////////////////////////////////////////////// 749 void MApi_AUDIO_WriteMailBox(MS_BOOL bDspType, MS_U8 u8ParamNum, MS_U16 u16Data); 750 751 //////////////////////////////////////////////////////////////////////////////// 752 /// @ingroup Audio_ToBeRemove 753 /// @brief \b Function \b Name: MApi_AUDIO_FwTriggerDSP() 754 /// @brief \b Function \b Description: This routine send a PIO interrupt to DSP with a command . 755 /// @param u16Cmd \b : 0xF0-- for MHEG5 file protocol 756 //////////////////////////////////////////////////////////////////////////////// 757 // void MApi_AUDIO_FwTriggerDSP(MS_U16 u16Cmd); 758 759 //////////////////////////////////////////////////////////////////////////////// 760 /// @ingroup Audio_System 761 /// @brief \b Function \b Name: MApi_AUDIO_SetFwStatus() 762 /// @brief \b Function \b Description: FW set DSP load/reload code from DDR or Flash 763 /// @param bBootOnDDR \b : 764 /// - TRUE==> Boot from DDR; 765 /// - FALSE==> Boot from Flash 766 //////////////////////////////////////////////////////////////////////////////// 767 // void MApi_AUDIO_SetFwStatus(MS_BOOL en); 768 769 //////////////////////////////////////////////////////////////////////////////// 770 /// @ingroup Audio_System 771 /// @brief \b Function \b Name: MApi_AUDIO_ExitAudioSystem() 772 /// @brief \b Function \b Description: This routine is used to exit audio system 773 /// by performing DSP power down setting. 774 //////////////////////////////////////////////////////////////////////////////// 775 void MApi_AUDIO_ExitAudioSystem(void); 776 777 //////////////////////////////////////////////////////////////////////////////// 778 /// @ingroup Audio_System 779 /// @brief \b Function \b Name: MApi_AUDIO_RebootDsp(void) 780 /// @brief \b Function \b Description: This routine reboot DSP. 781 /// @param bDspType \b : 0- DEC DSP; 1- SNDEff DSP 782 //////////////////////////////////////////////////////////////////////////////// 783 // void MApi_AUDIO_RebootDsp(MS_BOOL bDspType); 784 785 //////////////////////////////////////////////////////////////////////////////// 786 /// @ingroup Audio_System 787 /// @brief \b Function \b Name: MApi_AUDIO_SendIntrupt() 788 /// @brief \b Function \b Description: This routine send a PIO8 interrupt to DSP. 789 /// @param bDspType \b : 0- DEC DSP; 1- SNDEff DSP 790 /// @param u8Cmd \b : 0xE0, for MHEG5 file protocol 791 //////////////////////////////////////////////////////////////////////////////// 792 // void MApi_AUDIO_SendIntrupt(MS_BOOL bDspType,MS_U8 u8Cmd); 793 794 //////////////////////////////////////////////////////////////////////////////// 795 /// @ingroup Audio_System 796 /// @brief \b Function \b Name: MApi_AUDIO_I2S_SetMode() 797 /// @brief \b Function \b Description: This routine is used to Set the I2S output mode. 798 /// @param u8Mode \b : I2S mode select 799 /// - AUDIO_I2S_MCLK ==>Set I2S MCLK 800 /// - AUDIO_I2S_WORD_WIDTH, ==>Set I2S Word-width 801 /// - AUDIO_I2S_SOURCE_CH, ==>Set I2S channel Source 802 /// - AUDIO_I2S_FORMAT ==>Set I2S format 803 /// @param u8Val \b : I2S mode value 804 /// - I2S_MCLK_64FS=0x04, ==> MCLK=64 Fs ; 805 /// - I2S_MCLK_128FS=0x05, ==> MCLK=128 Fs ; 806 /// - I2S_MCLK_256FS=0x06, ==> MCLK=256 Fs ; default setting 807 /// - I2S_MCLK_384FS=0x07, ==> MCLK=384 Fs ; 808 /// - I2S_WORD_WIDTH_16BIT=0x4, ==>Word width=16bit; 809 /// - I2S_WORD_WIDTH_24BIT=0x5, ==>Word width=24bit; 810 /// - I2S_WORD_WIDTH_32BIT=0x6, ==>Word width=32bit; default setting 811 /// - I2S_FORMAT_STANDARD=0, ==>I2S in Standard format 812 /// - I2S_FORMAT_LEFT_JUSTIFIED=1 ==> I2S in Left-justify format 813 /////////////////////////////////////////////////////////////////////////////// 814 void MApi_AUDIO_I2S_SetMode(AUDIO_I2S_MODE_TYPE u8Mode, AUDIO_I2S_MODE_VALUE u8Val); 815 816 //////////////////////////////////////////////////////////////////////////////// 817 /// @ingroup Audio_System 818 /// @brief \b Function \b Name: MApi_AUDIO_WritePreInitTable() 819 /// @brief \b Function \b Description: This routine is to set power on DAC sequence before setting init table. 820 //////////////////////////////////////////////////////////////////////////////// 821 void MApi_AUDIO_WritePreInitTable(void); //Refine power on sequence for earphone & DAC pop noise issue 822 823 //////////////////////////////////////////////////////////////////////////////// 824 /// @ingroup Audio_ToBeRemove 825 /// @brief \b Function \b Name: MApi_AUDIO_EnaEarphone_LowPower_Stage() 826 /// @brief \b Function \b Description: This routine is used to enable earphone low power stage. 827 //////////////////////////////////////////////////////////////////////////////// 828 // void MApi_AUDIO_EnaEarphone_LowPower_Stage(void); //Refine power on sequence for earphone & DAC pop noise issue 829 830 //////////////////////////////////////////////////////////////////////////////// 831 /// @ingroup Audio_ToBeRemove 832 /// @brief \b Function \b Name: MApi_AUDIO_EnaEarphone_HighDriving_Stage() 833 /// @brief \b Function \b Description: This routine is used to enable earphone high driving stage. 834 //////////////////////////////////////////////////////////////////////////////// 835 // void MApi_AUDIO_EnaEarphone_HighDriving_Stage(void);//Refine power on sequence for earphone & DAC pop noise issue 836 837 //============================================================= 838 // AUDIO_SOUND RELATIONAL API FUNCTION 839 //============================================================= 840 841 //////////////////////////////////////////////////////////////////////////////// 842 /// @ingroup Audio_BASIC_SOUNDEFFECT 843 /// @brief \b Function \b Name: MApi_SND_ProcessEnable() 844 /// @brief \b Function \b Description: This routine is used for adjust Common Sound parameters 845 //////////////////////////////////////////////////////////////////////////////// 846 MS_BOOL MApi_SND_ProcessEnable(Sound_ENABLE_Type Type, MS_BOOL enable); 847 848 //////////////////////////////////////////////////////////////////////////////// 849 /// @ingroup Audio_ToBeRemove 850 /// @brief \b Function \b Name: MApi_SND_SetParam1() 851 /// @brief \b Function \b Description: This routine is used for adjust Common Sound parameters 852 /// @return MS_BOOL \b : True / False 853 //////////////////////////////////////////////////////////////////////////////// 854 MS_BOOL MApi_SND_SetParam1( Sound_SET_PARAM_Type Type, MS_U16 param1, MS_U16 param2); 855 856 //////////////////////////////////////////////////////////////////////////////// 857 /// @ingroup Audio_ToBeRemove 858 /// @brief \b Function \b Name: HAL_AUDIO_SOUND_SetParam() 859 /// @brief \b Function \b Description: This routine is used for adjust Common Sound parameters 860 /// @return MS_BOOL \b : True / False 861 //////////////////////////////////////////////////////////////////////////////// 862 MS_U16 MApi_SND_GetParam1( Sound_GET_PARAM_Type Type, MS_U16 param1); 863 864 //****************************************************************************** 865 /// @ingroup Audio_BASIC_SOUNDEFFECT 866 /// @brief \b Function \b Name: MApi_AUDIO_SOUND_SetParam() 867 /// @brief \b Function \b Description: This routine is used for adjust Common Sound parameters 868 /// @return MS_BOOL \b : True / False 869 //****************************************************************************** 870 // MS_BOOL MApi_AUDIO_SOUND_SetParam( Sound_SET_Type Type, MS_U32 *p_param ); 871 872 //////////////////////////////////////////////////////////////////////////////// 873 /// @ingroup Audio_BASIC_SOUNDEFFECT 874 /// @brief \b Function \b Name: MDrv_SOUND_AbsoluteVolume() 875 /// @brief \b Function \b Description: This routine is used to set the absolute u8Volume of audio u8Path. 876 /// @param u8Path \b : for audio u8Path0 ~ u8Path6 877 /// @param u8Vol1 \b : MSB 7-bit register value of 10-bit u8Volume 878 /// range from 0x00 to 0x7E , gain: +12db to -114db (-1 db per step) 879 /// @param u8Vol2 \b : LSB 3-bit register value of 10-bit u8Volume 880 /// range from 0x00 to 0x07 , gain: -0db to -0.875db (-0.125 db per step) 881 //////////////////////////////////////////////////////////////////////////////// 882 void MApi_AUDIO_SetAbsoluteVolume( MS_U8 u8Path, MS_U8 u8Vol1, MS_U8 u8Vol2 ); 883 884 //////////////////////////////////////////////////////////////////////////////// 885 /// @ingroup Audio_BASIC_SOUNDEFFECT 886 /// @brief \b Function \b Name: MApi_AUDIO_SetPreScale() 887 /// @brief \b Function \b Description: This routine is used to set the prescale of audio u8Path. 888 /// @param u8Path \b : for audio u8Path0 ~ u8Path5 889 /// @param u8PreScale \b : range from 0x01 to 0xFF , gain: -13.75db to +18db (0.125 db per step) 890 /// - 0x00: disable pre-scale 891 /// - 0x6F: gain = 0db 892 /// - 0xFF: gain = +18db 893 //////////////////////////////////////////////////////////////////////////////// 894 void MApi_AUDIO_SetPreScale ( MS_U8 u8Path, MS_U8 u8PreScale ); 895 896 //////////////////////////////////////////////////////////////////////////////// 897 /// @ingroup Audio_BASIC_SOUNDEFFECT 898 /// @brief \b Function \b Name: MApi_AUDIO_SetMute() 899 /// @brief \b Function \b Description: This routine is used to set audio path S/W mute. 900 /// @param u8Path \b : for audio path0 ~ path6 901 /// @param EnMute \b : TRUE --Mute; 902 /// FALSE--Unmute 903 //////////////////////////////////////////////////////////////////////////////// 904 void MApi_AUDIO_SetMute( MS_U8 u8Path, MS_BOOL EnMute); 905 906 //////////////////////////////////////////////////////////////////////////////// 907 /// @ingroup Audio_BASIC_SOUNDEFFECT 908 /// @brief \b Function \b Name: MApi_AUDIO_SourceConnect() 909 /// @brief \b Function \b Description: This routine is used to set audio mute by processor 910 /// @param u8Path \b : eProcessor: Set Main/Sub processor, 911 /// @param EnMute \b : TRUE --Mute; 912 /// FALSE--Unmute 913 //////////////////////////////////////////////////////////////////////////////// 914 // void MApi_AUDIO_SourceConnect(AUDIO_OUTPORT_SOURCE_TYPE eConnectSourceType, MS_BOOL bIsConnect ); 915 916 //////////////////////////////////////////////////////////////////////////////// 917 /// @ingroup Audio_BASIC_SOUNDEFFECT 918 /// @brief \b Function \b Name: MApi_AUDIO_SetBalance() 919 /// @brief \b Function \b Description: This routine is used to set balance value 920 /// @param u8Balance \b : balance (0~100) 921 /// - 0 : R channel is muted ... 922 /// - 50 : L & R channel output the same level... 923 /// - 100 : L channel is muted . 924 //////////////////////////////////////////////////////////////////////////////// 925 void MApi_AUDIO_SetBalance ( MS_U8 u8Balance ); 926 927 //////////////////////////////////////////////////////////////////////////////// 928 /// @ingroup Audio_BASIC_SOUNDEFFECT 929 /// @brief \b Function \b Name: MApi_AUDIO_EnableEQ() 930 /// @brief \b Function \b Description: This routine is used to enable EQ function. 931 /// @param EnEQ \b : TRUE --Enable EQ; 932 /// FALSE--Disable EQ 933 //////////////////////////////////////////////////////////////////////////////// 934 void MApi_AUDIO_EnableEQ ( MS_BOOL EnEQ ); 935 936 //////////////////////////////////////////////////////////////////////////////// 937 /// @ingroup Audio_BASIC_SOUNDEFFECT 938 /// @brief \b Function \b Name: MApi_AUDIO_EnableTone() 939 /// @brief \b Function \b Description: This routine is used to enable Bass/Treble function. 940 /// @param EnTone \b : TRUE --Enable Bass/Treble; 941 /// FALSE--Disable Bass/Treble 942 //////////////////////////////////////////////////////////////////////////////// 943 void MApi_AUDIO_EnableTone ( MS_BOOL EnTone ); 944 945 //////////////////////////////////////////////////////////////////////////////// 946 /// @ingroup Audio_BASIC_SOUNDEFFECT 947 /// @brief \b Function \b Name: MApi_AUDIO_EnableAutoVolume() 948 /// @brief \b Function \b Description: This routine is used to enable auto volume(AVC) function. 949 /// @param EnAVC \b : TRUE --Enable AVC; 950 /// FALSE--Disable AVC 951 //////////////////////////////////////////////////////////////////////////////// 952 void MApi_AUDIO_EnableAutoVolume ( MS_BOOL EnAVL ); 953 954 //////////////////////////////////////////////////////////////////////////////// 955 /// @ingroup Audio_BASIC_SOUNDEFFECT 956 /// @brief \b Function \b Name: MApi_AUDIO_EnableSurround() 957 /// @brief \b Function \b Description: This routine is used to enable surround function. 958 /// @param EnSurround \b : TRUE --Enable Surround; 959 /// FALSE--Disable Surround 960 //////////////////////////////////////////////////////////////////////////////// 961 void MApi_AUDIO_EnableSurround ( MS_BOOL EnSurround ); 962 963 //////////////////////////////////////////////////////////////////////////////// 964 /// @ingroup Audio_BASIC_SOUNDEFFECT 965 /// @brief \b Function \b Name: MApi_AUDIO_EnableBalance() 966 /// @brief \b Function \b Description: This routine is used to enable Balance function. 967 /// @param EnBalance \b : Balance Enable bits 968 //////////////////////////////////////////////////////////////////////////////// 969 void MApi_AUDIO_EnableBalance( MS_U8 EnBalance ); 970 971 //////////////////////////////////////////////////////////////////////////////// 972 /// @ingroup Audio_BASIC_SOUNDEFFECT 973 /// @brief \b Function \b Name: MApi_AUDIO_SetDynamicBass() 974 /// @brief \b Function \b Description: This routine is used to set DynamicBass level. 975 /// @param u8Bass \b : 976 //////////////////////////////////////////////////////////////////////////////// 977 void MApi_AUDIO_SetDynamicBass( MS_U8 u8DynamicBass ); 978 979 //////////////////////////////////////////////////////////////////////////////// 980 /// @ingroup Audio_BASIC_SOUNDEFFECT 981 /// @brief \b Function \b Name: MApi_AUDIO_SetBass() 982 /// @brief \b Function \b Description: This routine is used to set Bass level. 983 /// @param u8Bass \b :Bass Level (0~100) 984 /// - CHIP_FAMILY_U3 & S4LE==>mapping to -16 ~ +15 dB Gain 985 /// - CHIP_FAMILY_S7 ==>mapping to -12 ~ +12 dB Gain 986 /// - CHIP_FAMILY_S7J ==> mapping to -16 ~ +15 dB Gain 987 //////////////////////////////////////////////////////////////////////////////// 988 void MApi_AUDIO_SetBass( MS_U8 u8Bass ); 989 990 //////////////////////////////////////////////////////////////////////////////// 991 /// @ingroup Audio_BASIC_SOUNDEFFECT 992 /// @brief \b Function \b Name: MApi_AUDIO_AbsoluteBass() 993 /// @brief \b Function \b Description: This routine is used to set abs. Bass value. 994 /// @param u8Bass \b : register value 995 /// - CHIP_FAMILY_U3 & S4LE ==>mapping to -16 ~ +15 dB Gain 996 /// - CHIP_FAMILY_S7 ==>mapping to -12 ~ +12 dB Gain 997 /// - CHIP_FAMILY_S7J ==> mapping to -16 ~ +15 dB Gain 998 //////////////////////////////////////////////////////////////////////////////// 999 void MApi_AUDIO_AbsoluteBass( MS_U8 u8Bass ); 1000 1001 //////////////////////////////////////////////////////////////////////////////// 1002 /// @ingroup Audio_BASIC_SOUNDEFFECT 1003 /// @brief \b Function \b Name: MApi_AUDIO_SetTreble() 1004 /// @brief \b Function \b Description: This routine is used to set Treble level. 1005 /// @param u8Treble \b :Treble Level (0~100) 1006 /// - CHIP_FAMILY_U3 & S4LE ==>mapping to -16 ~ +15 dB Gain 1007 /// - CHIP_FAMILY_S7 ==>mapping to -12 ~ +12 dB Gain 1008 //////////////////////////////////////////////////////////////////////////////// 1009 void MApi_AUDIO_SetTreble( MS_U8 u8Treble ); 1010 1011 //////////////////////////////////////////////////////////////////////////////// 1012 /// @ingroup Audio_BASIC_SOUNDEFFECT 1013 /// @brief \b Function \b Name: MApi_AUDIO_AbsoluteTreble() 1014 /// @brief \b Function \b Description: This routine is used to set abs. Treble value. 1015 /// @param u8Treble \b : register value 1016 /// - CHIP_FAMILY_U3 & S4LE ==> mapping to -16 ~ +15 dB Gain 1017 /// - CHIP_FAMILY_S7 ==> mapping to -12 ~ +12 dB Gain 1018 /// - CHIP_FAMILY_S7J ==> mapping to -16 ~ +15 dB Gain 1019 //////////////////////////////////////////////////////////////////////////////// 1020 void MApi_AUDIO_AbsoluteTreble( MS_U8 u8Treble ); 1021 1022 //////////////////////////////////////////////////////////////////////////////// 1023 /// @ingroup Audio_BASIC_SOUNDEFFECT 1024 /// @brief \b Function \b Name: MApi_AUDIO_SetEq() 1025 /// @brief \b Function \b Description: This routine is used to set the the 5-band EQ level . 1026 /// @param u8band \b : EQ band 0~4 1027 /// @param u8level \b : Absolute EQ register value ; 1028 /// - 0011-0000: +12.00db. (Max) 1029 /// - 0000-0001: +0.25db. 1030 /// - 0000-0000: +0.00db. 1031 /// - 1111-1111: -0.25db. 1032 /// - 1101-0000: -12.00db. (Min) 1033 //////////////////////////////////////////////////////////////////////////////// 1034 void MApi_AUDIO_SetEq(MS_U8 u8band, MS_U8 u8level); 1035 1036 //////////////////////////////////////////////////////////////////////////////// 1037 /// @ingroup Audio_BASIC_SOUNDEFFECT 1038 /// @brief \b Function \b Name: MApi_AUDIO_SetEq_7band() 1039 /// @brief \b Function \b Description: This routine is used to set the the 7-band EQ level . 1040 /// @param u8band \b : EQ band 0~6 1041 /// @param u8level \b : Absolute EQ register value ; 1042 /// 0011-0000: +12.00db. (Max) 1043 /// 0000-0001: +0.25db. 1044 /// 0000-0000: +0.00db. 1045 /// 1111-1111: -0.25db. 1046 /// 1101-0000: -12.00db. (Min) 1047 //////////////////////////////////////////////////////////////////////////////// 1048 // void MApi_AUDIO_SetEq_7band(MS_U8 u8band, MS_U8 u8level); 1049 1050 //////////////////////////////////////////////////////////////////////////////// 1051 /// @ingroup Audio_BASIC_SOUNDEFFECT 1052 /// @brief \b Function \b Name: MApi_AUDIO_SetAvcThreshold() 1053 /// @brief \b Function \b Description: This routine is used to set the AVC threshold level. 1054 /// @param Level \b : AVC threshold level 1055 /// - 0x00-- 0 dBFS 1056 /// - 0x01-- -0.5 dBFS 1057 /// - 0x20-- -16 dBFS 1058 /// - 0x50-- -40 dBFS 1059 //////////////////////////////////////////////////////////////////////////////// 1060 void MApi_AUDIO_SetAvcThreshold(MS_U8 Level); 1061 1062 //////////////////////////////////////////////////////////////////////////////// 1063 /// @ingroup Audio_BASIC_SOUNDEFFECT 1064 /// @brief \b Function \b Name: MApi_AUDIO_SetAvcMode() 1065 /// @brief \b Function \b Description: This routine is used to set the AVC mode. 1066 /// @param <IN> \b u8AvcMode : AVC u8Mode 1067 /// - 0: L mode 1068 /// - 1: S mode 1069 /// - 2: M mode 1070 /// @image html L_mode.JPG "L mode" 1071 /// @image html S_mode.JPG "S mode" 1072 /// @image html M_mode.JPG "M mode" 1073 /// @param <OUT> \b NONE : 1074 /// @param <RET> \b NONE : 1075 /// @param <GLOBAL> \b NONE : 1076 //////////////////////////////////////////////////////////////////////////////// 1077 void MApi_AUDIO_SetAvcMode( MS_U8 AvcMode ); 1078 1079 //////////////////////////////////////////////////////////////////////////////// 1080 /// @ingroup Audio_BASIC_SOUNDEFFECT 1081 /// @brief \b Function \b Name: MApi_AUDIO_SetAvcAT() 1082 /// @brief \b Function \b Description: This routine is used to set the AVC attack time . 1083 /// @param AvcAT \b : AVC attack time 1084 /// - AvcAT = 0 --> 20 ms 1085 /// - AvcAT = 1 --> 100 ms 1086 /// - AvcAT = 2 --> 200 ms 1087 /// - AvcAT = 3 --> 1 sec 1088 //////////////////////////////////////////////////////////////////////////////// 1089 void MApi_AUDIO_SetAvcAT( MS_U8 AvcAT ); 1090 1091 //////////////////////////////////////////////////////////////////////////////// 1092 /// @ingroup Audio_BASIC_SOUNDEFFECT 1093 /// @brief \b Function \b Name: MApi_AUDIO_SetAvcRT() 1094 /// @brief \b Function \b Description: This routine is used to set the AVC release time . 1095 /// @param AvcRT \b : AVC release time 1096 /// - AvcRT = 0 --> 1 sec 1097 /// - AvcRT = 1 --> 2 sec 1098 /// - AvcRT = 2 --> 100 ms 1099 /// - AvcRT = 3 --> 200 ms 1100 //////////////////////////////////////////////////////////////////////////////// 1101 void MApi_AUDIO_SetAvcRT( MS_U8 AvcRT ); 1102 1103 //////////////////////////////////////////////////////////////////////////////// 1104 /// @ingroup Audio_BASIC_SOUNDEFFECT 1105 /// @brief \b Function \b Name: MApi_AUDIO_SetBufferProcess() 1106 /// @brief \b Function \b Description: sets the value of audio delay time (ms).. 1107 /// @param DelayTime \b : 0x00~0xFA(0~250), each step=1 ms , 0~250 ms 1108 //////////////////////////////////////////////////////////////////////////////// 1109 void MApi_AUDIO_SetBufferProcess(MS_U8 DelayTime); 1110 1111 //////////////////////////////////////////////////////////////////////////////// 1112 /// @ingroup Audio_BASIC_SOUNDEFFECT 1113 /// @brief \b Function \b Name: MApi_AUDIO_SetSurroundXA() 1114 /// @brief \b Function \b Description: This routine is used to set the Surround xA echo Gain. 1115 /// @param <IN> \b mode : A Gain : register SURROUND[3:2] 1116 /// - 0 : x0.1 1117 /// - 1 : x0.15 1118 /// - 2 : x0.2 1119 /// - 3 : x0.25 1120 /// @param <OUT> \b NONE : 1121 /// @param <RET> \b NONE : 1122 /// @param <GLOBAL> \b NONE 1123 //////////////////////////////////////////////////////////////////////////////// 1124 void MApi_AUDIO_SetSurroundXA( MS_U8 mode ); 1125 1126 //////////////////////////////////////////////////////////////////////////////// 1127 /// @ingroup Audio_BASIC_SOUNDEFFECT 1128 /// @brief \b Function \b Name: MApi_AUDIO_SetSurroundXB() 1129 /// @brief \b Function \b Description: This routine is used to set the Surround xB echo Gain. 1130 /// @param <IN> \b mode : B Gain : register SURROUND[5:4] 1131 /// - 0 : x0.25 1132 /// - 1 : x0.3 1133 /// - 2 : x0.35 1134 /// - 3 : x0.45 1135 /// @param <OUT> \b NONE : 1136 /// @param <RET> \b NONE : 1137 /// @param <GLOBAL> \b NONE 1138 //////////////////////////////////////////////////////////////////////////////// 1139 void MApi_AUDIO_SetSurroundXB( MS_U8 mode ); 1140 1141 //////////////////////////////////////////////////////////////////////////////// 1142 /// @ingroup Audio_BASIC_SOUNDEFFECT 1143 /// @brief \b Function \b Name: MApi_AUDIO_SetSurroundXK() 1144 /// @brief \b Function \b Description: This routine is used to set the Surround xK feedback Gain. 1145 /// @param <IN> \b mode : K Gain : register SURROUND[10:8] 1146 /// - 0 : x0.1 1147 /// - 1 : x0.2 1148 /// - 2 : x0.3 1149 /// - 3 : x0.4 1150 /// - 4 : x0.5 1151 /// - 5 : x0.6 1152 /// - 6 : x0.7 1153 /// - 7 : x0.8 1154 /// @param <OUT> \b NONE : 1155 /// @param <RET> \b NONE : 1156 /// @param <GLOBAL> \b NONE 1157 //////////////////////////////////////////////////////////////////////////////// 1158 void MApi_AUDIO_SetSurroundXK( MS_U8 mode ); 1159 1160 //////////////////////////////////////////////////////////////////////////////// 1161 /// @ingroup Audio_BASIC_SOUNDEFFECT 1162 /// @brief \b Function \b Name: MApi_AUDIO_SetSurroundLPFGain() 1163 /// @brief \b Function \b Description: This routine is used to set the Surround LPF Gain. 1164 /// @image html surround.JPG "Surround block diagram" 1165 /// @param <IN> \b mode : LPF Gain : register SURROUND[7:6] 1166 /// - 0 : 0 dB 1167 /// - 1 : 2 dB 1168 /// - 2 : 4 dB 1169 /// - 3 : un-support 1170 /// @param <OUT> \b NONE : 1171 /// @param <RET> \b NONE : 1172 /// @param <GLOBAL> \b NONE 1173 //////////////////////////////////////////////////////////////////////////////// 1174 void MApi_AUDIO_SetSurroundLPFGain( MS_U8 mode ); 1175 1176 ///////////////////////////////////////////////////////////////////////////////// 1177 /// @ingroup Audio_ToBeRemove 1178 /// @brief \b Function \b Name: MApi_AUDIO_ConvertVolumeUnit() 1179 /// @brief \b Function \b Description: Convert UI Volume to Absolute Volume. 1180 /// valid value of UiVolume is between 0 and 100 1181 /// @param UiVolume \b : UI Volume 0 -> 62, 50 -> 12, 100 -> 7 1182 /// @param MS_U8 \b : register value 1183 //////////////////////////////////////////////////////////////////////////////// 1184 MS_U8 MApi_AUDIO_ConvertVolumeUnit(MS_U8 UiVolume); 1185 1186 // void MApi_AUDIO_SetMaxClipping( MS_U8 MaxClippingValue, MS_U16 Volume ); 1187 1188 //////////////////////////////////////////////////////////////////////////////// 1189 /// @ingroup Audio_BASIC_SOUNDEFFECT 1190 /// @brief \b Function \b Name: MApi_AUDIO_SetPEQCoef() 1191 /// @brief \b Function \b Description: This routine is used to set PEQ Coefficient. 1192 /// @param <IN> \b peq_coef 1193 /// @param <OUT> \b NONE : 1194 /// @param <RET> \b NONE : 1195 /// @param <GLOBAL> \b NONE 1196 //////////////////////////////////////////////////////////////////////////////// 1197 void MApi_AUDIO_SetPEQCoef(AUDIO_PEQ_COEF *peq_coef); 1198 1199 //////////////////////////////////////////////////////////////////////////////// 1200 /// @ingroup Audio_BASIC_SOUNDEFFECT 1201 /// @brief \b Function \b Name: MApi_AUDIO_EnablePEQ() 1202 /// @brief \b Function \b Description: This routine is used to eable PEQ. 1203 /// @param <IN> \b Enpeq 1204 /// @param <OUT> \b NONE : 1205 /// @param <RET> \b NONE : 1206 /// @param <GLOBAL> \b NONE 1207 //////////////////////////////////////////////////////////////////////////////// 1208 void MApi_AUDIO_EnablePEQ(MS_BOOL Enpeq); 1209 1210 //////////////////////////////////////////////////////////////////////////////// 1211 /// @ingroup Audio_BASIC_SOUNDEFFECT 1212 /// @brief \b Function \b Name: MApi_AUDIO_EnableDcRemove() 1213 /// @brief \b Function \b Description: This routine is used to eable PEQ. 1214 /// @param <IN> \b EnDcRemove 1215 /// @param <OUT> \b True / False 1216 /// @param <RET> \b NONE : 1217 /// @param <GLOBAL> \b NONE 1218 //////////////////////////////////////////////////////////////////////////////// 1219 // MS_BOOL MApi_AUDIO_EnableDcRemove(MS_BOOL EnDcRemove); 1220 1221 //============================================================ 1222 // AUDIO_DTV RELATIONAL API FUNCTION 1223 //============================================================ 1224 1225 //////////////////////////////////////////////////////////////////////////////// 1226 /// @ingroup Audio_System 1227 /// @brief \b Function \b Name: MApi_AUDIO_ReleaseDecodeSystem() 1228 /// @brief \b Function \b Description: This function will release/close decode system 1229 /// @param DecId \b : Decoder ID to be released 1230 /// @return\b MS_BOOL \b : set decoder system process status FALSE-> fail TRUE-> Success 1231 //////////////////////////////////////////////////////////////////////////////// 1232 MS_BOOL MApi_AUDIO_ReleaseDecodeSystem(AUDIO_DEC_ID DecId); 1233 1234 //////////////////////////////////////////////////////////////////////////////// 1235 /// @ingroup Audio_System 1236 /// @brief \b Function \b Name: MApi_AUDIO_SetDecodeSystem() 1237 /// @brief \b Function \b Description: This function will set DecId decoder as structure p_AudioDecStatus 1238 /// @param\b DecId \b : Decoder ID to be controled 1239 /// @param\b p_AudioDecStatus \b : decoder status structure pointer 1240 /// @return\b MS_BOOL \b : set decoder system process status FALSE-> fail TRUE-> Success 1241 //////////////////////////////////////////////////////////////////////////////// 1242 MS_BOOL MApi_AUDIO_SetDecodeSystem(AUDIO_DEC_ID DecId, AudioDecStatus_t * p_AudioDecStatus); 1243 1244 //////////////////////////////////////////////////////////////////////////////// 1245 /// @ingroup Audio_System 1246 /// @brief \b Function \b Name: MApi_AUDIO_GetDecodeSystem() 1247 /// @brief \b Function \b Description: This function will get DecId decoder status 1248 /// @param DecId \b : Decoder ID to get status 1249 /// @param p_AudioDecStatus \b : return status to p_AudioDecStatus pointer 1250 /// @return\b MS_BOOL \b : set decoder system process status FALSE-> fail TRUE-> Success 1251 //////////////////////////////////////////////////////////////////////////////// 1252 MS_BOOL MApi_AUDIO_GetDecodeSystem(AUDIO_DEC_ID DecId, AudioDecStatus_t * p_AudioDecStatus); 1253 1254 //////////////////////////////////////////////////////////////////////////////// 1255 /// @ingroup Audio_System 1256 /// @brief \b Function \b Name: MApi_AUDIO_SetDecodeCmd() 1257 /// @brief \b Function \b Description: This function will send decode command to DecId decoder 1258 /// @param DecId \b : Decoder ID to be controled 1259 /// @param enDecComamnd \b : decoder command 1260 /// @return\b MS_BOOL \b : set decoder system process status FALSE-> fail TRUE-> Success 1261 //////////////////////////////////////////////////////////////////////////////// 1262 MS_BOOL MApi_AUDIO_SetDecodeCmd(AUDIO_DEC_ID DecId, En_DVB_decCmdType enDecComamnd); 1263 1264 //////////////////////////////////////////////////////////////////////////////// 1265 /// @ingroup Audio_System 1266 /// @brief \b Function \b Name: MApi_AUDIO_OpenDecodeSystem() 1267 /// @brief \b Function \b Description: This function will open decode system according audio dec status 1268 /// @param p_AudioDecStatus \b : decoder status stucture 1269 /// @return\b AUDIO_DEC_ID \b : return available decoder ID 1270 //////////////////////////////////////////////////////////////////////////////// 1271 AUDIO_DEC_ID MApi_AUDIO_OpenDecodeSystem(AudioDecStatus_t * p_AudioDecStatus); 1272 1273 //////////////////////////////////////////////////////////////////////////////// 1274 /// @ingroup Audio_ToBeRemove 1275 /// @brief \b Function \b Name: MApi_AUDIO_SetSystem() 1276 /// @brief \b Function \b Description: This function will load 1277 /// different audio decoder to audio system. 1278 /// 1279 /// In Mstar audio system, we can support 1 or 2 decoders. 1280 /// One is for main DTV audio or Multimedia audio player. 1281 /// Another is for second audio decode (ex: used for Audio Description purpose) 1282 /// 1283 /// @param enDecSystem \b : (En_DVB_decSystemType) decoder type 1284 /// - parameter type "MSAPI_AUD_DVB_XXXX" is decoder type for main audio decoder 1285 /// - parameter type "MSAPI_AUD_DVB2_XXXX" is decoder type for second audio decoder 1286 //////////////////////////////////////////////////////////////////////////////// 1287 MS_BOOL MApi_AUDIO_SetSystem(En_DVB_decSystemType enDecSystem); 1288 1289 //////////////////////////////////////////////////////////////////////////////// 1290 /// @ingroup Audio_System 1291 /// @brief \b Function \b Name: MApi_AUDIO_GetDecSysSupportStatus() 1292 /// @brief \b Function \b Description: This function will report Audio Decoder support feature status when giving DecSystem type 1293 /// @param <IN> \b enDecSystem : Decoder type 1294 /// @param <RET> \b BOOL : True or False 1295 //////////////////////////////////////////////////////////////////////////////// 1296 // MS_BOOL MApi_AUDIO_GetDecSysSupportStatus(En_DVB_decSystemType enDecSystem); 1297 1298 //////////////////////////////////////////////////////////////////////////////// 1299 /// @ingroup Audio_ToBeRemove 1300 /// @brief \b Function \b Name: MApi_AUDIO_SetH264StreamID_Mod() 1301 /// @brief \b Function \b Description: This routine is used to AC3 Stream ID mod. 1302 /// @param stream_id_mod \b : DTV stream ID 1303 /// - stream_id_mod = 0, video MPEG mode; 1304 /// - stream_id_mod = 1, video H264 mode 1305 //////////////////////////////////////////////////////////////////////////////// 1306 // void MApi_AUDIO_SetH264StreamID_Mod(MS_U8 stream_id_mod); 1307 1308 //////////////////////////////////////////////////////////////////////////////// 1309 /// @ingroup Audio_System 1310 /// @brief \b Function \b Name: MApi_AUDIO_IsMadLock() 1311 /// @brief \b Function \b Description: This function show DTV Audio stream lock status 1312 /// @return MS_BOOL \b : 1 : lock ; 0 : unlock 1313 //////////////////////////////////////////////////////////////////////////////// 1314 MS_BOOL MApi_AUDIO_IsMadLock(void); 1315 1316 //////////////////////////////////////////////////////////////////////////////// 1317 /// @ingroup Audio_ToBeRemove 1318 /// @brief \b Function \b Name: MApi_AUDIO_GetDecStatus() 1319 /// @brief \b Function \b Description: This routine is used to get the decoder's status (paly or stop) 1320 /// @return En_DVB_decCmdType \b : Decoder status (paly or stop) 1321 //////////////////////////////////////////////////////////////////////////////// 1322 En_DVB_decCmdType MApi_AUDIO_GetDecStatus ( void ); 1323 1324 /////////////////////////////////////////////////////////////////////////////////////// 1325 /// @ingroup Audio_System 1326 /// @brief \b Function \b Name: MApi_AUDIO_GetCommand() 1327 /// @brief \b Function \b Description: This routine is to get the DVB1 decode command. 1328 /// @return AU_DVB_DECCMD \b : 1329 /// - AU_DVB_DECCMD_STOP, //0 1330 /// - AU_DVB_DECCMD_PLAY, //1 1331 /// - AU_DVB_DECCMD_PLAYFILETSP, //2 1332 /// - AU_DVB_DECCMD_RESYNC, 1333 /// ....etc 1334 /////////////////////////////////////////////////////////////////////////////////////// 1335 AU_DVB_DECCMD MApi_AUDIO_GetCommand(En_DVB_AudioDecoder AdoDecoderNo); 1336 1337 //////////////////////////////////////////////////////////////////////////////// 1338 /// @ingroup Audio_System 1339 /// @brief \b Function \b Name: MApi_AUDIO_SetCommand() 1340 /// @brief \b Function \b Description: Set decoder Command for Digital Audio module 1341 /// @param enDecComamnd \b : deccoder command for DVB Audio 1342 //////////////////////////////////////////////////////////////////////////////// 1343 void MApi_AUDIO_SetCommand(En_DVB_decCmdType enDecComamnd); 1344 1345 //////////////////////////////////////////////////////////////////////////////// 1346 /// @ingroup Audio_System 1347 /// @brief \b Function \b Name: MApi_AUDIO_GetMAD_LOCK() 1348 /// @brief \b Function \b Description: This routine is used to report decoder lock information. 1349 /// @retun MS_U8 \b the decoder status 1350 /////////////////////////////////////////////////////////////////////////////// 1351 MS_BOOL MApi_AUDIO_GetMAD_LOCK(void); 1352 1353 //////////////////////////////////////////////////////////////////////////////// 1354 /// @ingroup Audio_System 1355 /// @brief \b Function \b Name: MApi_AUDIO_SetADOutputMode() 1356 /// @brief \b Function \b Description: Set AD output mode 1357 /// @param out_mode \b : out_mode: 1358 /// - AD_OUT_SPEAKER 1359 /// - AD_OUT_HP 1360 /// - AD_OUT_BOTH 1361 //////////////////////////////////////////////////////////////////////////////// 1362 void MApi_AUDIO_SetADOutputMode (MS_U8 out_mode); 1363 1364 //////////////////////////////////////////////////////////////////////////////// 1365 /// @ingroup Audio_System 1366 /// @brief \b Function \b Name: MApi_AUDIO_SetADAbsoluteVolume() 1367 /// @brief \b Function \b Description: This routine is used to set the absolute u8Volume of AD. 1368 /// @param AbsVolume \b : MSB 7-bit register value of 10-bit u8Volume 1369 /// range from 0x00 to 0x7E , gain: +12db to -114db (-1 db per step) 1370 //////////////////////////////////////////////////////////////////////////////// 1371 void MApi_AUDIO_SetADAbsoluteVolume (MS_U8 AbsVolume); 1372 1373 //////////////////////////////////////////////////////////////////////////////// 1374 /// @ingroup Audio_System 1375 /// @brief \b Function \b Name: MApi_AUDIO_ADSetMute() 1376 /// @brief \b Function \b Description: This routine is used to set AD mute. 1377 /// @param EnMute \b : TRUE --Mute AD; 1378 /// FALSE--Unmute AD 1379 //////////////////////////////////////////////////////////////////////////////// 1380 void MApi_AUDIO_ADSetMute(MS_BOOL EnMute); 1381 1382 //============================================================ 1383 // AUDIO_PVR RELATED FUNCTIONS 1384 //============================================================ 1385 1386 //////////////////////////////////////////////////////////////////////////////// 1387 /// @ingroup Audio_ToBeRemove 1388 /// @brief \b Function \b Name: MDrv_AUDIO_SetEncodeInit() 1389 /// @brief \b Function \b Description: This function is used to set Encod init 1390 /// @param BitRate \b : Encode Output Bitrate 1391 /// - AU_DVB_ENCBR_192K, // 0 1392 /// - AU_DVB_ENCBR_384K, // 1 1393 /// - AU_DVB_ENCBR_128K, // 2 1394 /// - AU_DVB_ENCBR_64K // 3 1395 /// @param EncFrameNum \b : Frame number per interrupt 1396 //////////////////////////////////////////////////////////////////////////////// 1397 // void MApi_AUDIO_SetEncInit(AU_DVB_ENCBR BitRate, MS_U8 u8EncFrameNum); 1398 1399 //////////////////////////////////////////////////////////////////////////////// 1400 /// @ingroup Audio_ToBeRemove 1401 /// @brief \b Function \b Name: MApi_AUDIO_SetEncCommand() 1402 /// @brief \b Function \b Description: Set Encoder Command for Digital Audio module 1403 /// @param enEnccComamnd \b : Encoder command for DVB Audio 1404 /// - AU_DVB_ENCCMD_STOP, //0 1405 /// - AU_DVB_ENCCMD_START // 1 1406 //////////////////////////////////////////////////////////////////////////////// 1407 // void MApi_AUDIO_SetEncCommand(AU_DVB_ENCCMD enEncComamnd); 1408 1409 //////////////////////////////////////////////////////////////////////////////// 1410 /// @ingroup Audio_ToBeRemove 1411 /// @brief \b Function \b Name: MDrv_AUDIO_GetEncodeFrameInfo() 1412 /// @brief \b Function \b Description: This function is used to get the Encoded frame info 1413 /// @param input \b EncFrameInfo: structure to store encoded frame info 1414 //////////////////////////////////////////////////////////////////////////////// 1415 // void MApi_AUDIO_GetEncodeFrameInfo(AU_DVB_ENC_FRAME_INFO *EncFrameInfo); 1416 1417 //////////////////////////////////////////////////////////////////////////////// 1418 /// @ingroup Audio_ToBeRemove 1419 /// @brief \b Function \b Name: MApi_AUDIO_GetEncodeDoneFlag() 1420 /// @brief \b Function \b Description: This function is used to get check encode done flag 1421 /// @param input \b None 1422 /// @param output \b BOOL TRUE/FALSE 1423 //////////////////////////////////////////////////////////////////////////////// 1424 MS_BOOL MApi_AUDIO_GetEncodeDoneFlag(void); 1425 1426 //============================================================ 1427 // AUDIO_ATV RELATIONAL API FUNCTION 1428 //============================================================ 1429 1430 //////////////////////////////////////////////////////////////////////////////// 1431 /// @ingroup Audio_ATV_SPDIF_HDMI 1432 /// @brief \b Function \b Name: MApi_AUDIO_SIF_SetStandard() 1433 /// @brief \b Function \b Description: Set SIF standard 1434 /// @param system_type \b : standard type 1435 //////////////////////////////////////////////////////////////////////////////// 1436 void MApi_AUDIO_SIF_SetStandard(AUDIOSTANDARD_TYPE standard_type); 1437 1438 //////////////////////////////////////////////////////////////////////////////// 1439 /// @ingroup Audio_ATV_SPDIF_HDMI 1440 /// @brief \b Function \b Name: MApi_AUDIO_SIF_GetSoundMode() 1441 /// @brief \b Function \b Description: Get SIF BTSC sound mode type 1442 /// @return MS_U8 \b : Sound mode type 1443 /// - MS_U8 = 0x0 : Mute 1444 /// - bit 0 : Mono 1445 /// - bit 1 : Stereo 1446 /// - bit 2 : SAP 1447 //////////////////////////////////////////////////////////////////////////////// 1448 MS_U8 MApi_AUDIO_SIF_GetSoundMode(void); 1449 1450 //////////////////////////////////////////////////////////////////////////////// 1451 /// @ingroup Audio_ATV_SPDIF_HDMI 1452 /// @brief \b Function \b Name: MApi_AUDIO_SIF_SetSoundMode() 1453 /// @brief \b Function \b Description: Set sound mode for ATV source. 1454 /// @param u8SifSoundMode \b : sound mode type 1455 /// - AU_MODE_MONO 1456 /// - AU_MODE_STEREO 1457 /// - AU_MODE_SAP 1458 /// - AU_MODE_LANG_A 1459 /// - AU_MODE_LANG_B 1460 /// - AU_MODE_NICAM_MONO, ...etc 1461 /// @return MS_BOOL \b : success / fail 1462 //////////////////////////////////////////////////////////////////////////////// 1463 MS_BOOL MApi_AUDIO_SIF_SetSoundMode(MS_U8 u8SifSoundMode); 1464 1465 //////////////////////////////////////////////////////////////////////////////// 1466 /// @ingroup Audio_ATV_SPDIF_HDMI 1467 /// @brief \b Function \b Name: MApi_AUDIO_SIF_GetAudioStatus() 1468 /// @brief \b Function \b Description: Get the current audio status. 1469 /// It can be used for getting available sound modes and real-time audio standard monitor. 1470 /// @param eAudioStatus \b : audio status pointer 1471 /// @return MS_BOOL \b : TRUE/FALSE 1472 //////////////////////////////////////////////////////////////////////////////// 1473 MS_BOOL MApi_AUDIO_SIF_GetAudioStatus(AUDIOSTATUS * eAudioStatus); 1474 1475 //////////////////////////////////////////////////////////////////////////////// 1476 /// @ingroup Audio_ATV_SPDIF_HDMI 1477 /// @brief \b Function \b Name: MApi_AUDIO_SIF_StartAutoStandardDetection() 1478 /// @brief \b Function \b Description: To start automatic detection about input audio standard 1479 //////////////////////////////////////////////////////////////////////////////// 1480 void MApi_AUDIO_SIF_StartAutoStandardDetection(void); 1481 1482 //////////////////////////////////////////////////////////////////////////////// 1483 /// @ingroup Audio_ATV_SPDIF_HDMI 1484 /// @brief \b Function \b Name: MApi_AUDIO_SIF_GetResultOfAutoStandardDetection() 1485 /// @brief \b Function \b Description: To get result of audio standard after automatic detection called by MDrv_ASP_StartAutoStandardDetection. 1486 /// @return AUDIOSTANDARD_TYPE \b : 1487 //////////////////////////////////////////////////////////////////////////////// 1488 AUDIOSTANDARD_TYPE MApi_AUDIO_SIF_GetResultOfAutoStandardDetection(void); 1489 1490 //////////////////////////////////////////////////////////////////////////////// 1491 /// @ingroup Audio_ATV_SPDIF_HDMI 1492 /// @brief \b Function \b Name: MApi_AUDIO_SIF_ConvertToBasicAudioStandard() 1493 /// @brief \b Function \b Description: Convert the audio standard to the basic standard 1494 /// @param eStandard \b : Please refer AUDIOSTANDARD_TYPE enum in header file 1495 /// @return AUDIOSTANDARD_TYPE \b : basic standard 1496 /// - E_AUDIOSTANDARD_BG 1497 /// - E_AUDIOSTANDARD_I 1498 /// - E_AUDIOSTANDARD_DK 1499 /// - E_AUDIOSTANDARD_L 1500 /// - E_AUDIOSTANDARD_M 1501 /// - E_AUDIOSTANDARD_NOTSTANDARD 1502 //////////////////////////////////////////////////////////////////////////////// 1503 AUDIOSTANDARD_TYPE MApi_AUDIO_SIF_ConvertToBasicAudioStandard(AUDIOSTANDARD_TYPE eStandard); 1504 1505 //////////////////////////////////////////////////////////////////////////////// 1506 /// @ingroup Audio_ATV_SPDIF_HDMI 1507 /// @brief \b Function \b Name: MApi_AUDIO_SIF_SetThreshold() 1508 /// @brief \b Function \b Description: This routine is used to set SIF threshold 1509 /// @param ThrTbl \b : SIF thresholds Table 1510 //////////////////////////////////////////////////////////////////////////////// 1511 void MApi_AUDIO_SIF_SetThreshold(THR_TBL_TYPE code *ThrTbl); 1512 //////////////////////////////////////////////////////////////////////////////// 1513 /// @ingroup Audio_ATV_SPDIF_HDMI 1514 /// @brief \b Function \b Name: MApi_AUDIO_SIF_SetPrescale() 1515 /// @brief \b Function \b Description: SIF output level = (original level add db_value gain) 1516 //////////////////////////////////////////////////////////////////////////////// 1517 void MApi_AUDIO_SIF_SetPrescale(MS_U8, MS_S32); 1518 //////////////////////////////////////////////////////////////////////////////// 1519 /// @ingroup Audio_ATV_SPDIF_HDMI 1520 /// @brief \b Function \b Name: MApi_AUDIO_SIF_IsPALType() 1521 /// @brief \b Function \b Description: Check the DSP type is pal_type or not 1522 /// @return MS_BOOL \b : TRUE/FALSE 1523 //////////////////////////////////////////////////////////////////////////////// 1524 MS_BOOL MApi_AUDIO_SIF_IsPALType(AUDIO_SIF_PAL_TYPE pal_type); 1525 1526 //////////////////////////////////////////////////////////////////////////////// 1527 /// @ingroup Audio_ATV_SPDIF_HDMI 1528 /// @brief \b Function \b Name: MApi_AUDIO_SIF_SetPALType() 1529 /// @brief \b Function \b Description: Set DSP type to pal_type 1530 //////////////////////////////////////////////////////////////////////////////// 1531 void MApi_AUDIO_SIF_SetPALType(AUDIO_SIF_PAL_TYPE pal_type); 1532 1533 //////////////////////////////////////////////////////////////////////////////// 1534 /// @ingroup Audio_ATV_SPDIF_HDMI 1535 /// @brief \b Function \b Name: MApi_AUDIO_SIF_SetCommand() 1536 /// @brief \b Function \b Description: Set decoder Command for ATV module 1537 /// @param enDecComamnd \b : deccoder command for ATV AUDIO 1538 //////////////////////////////////////////////////////////////////////////////// 1539 void MApi_AUDIO_SIF_SendCmd(En_AUD_SIF_CmdType enAudSifCommand, MS_U8 comm_arg1, MS_U8 comm_arg2); 1540 1541 //////////////////////////////////////////////////////////////////////////////// 1542 /// @ingroup Audio_ATV_SPDIF_HDMI 1543 /// @brief \b Function \b Name: MApi_AUDIO_SIF_Shift() 1544 /// @brief \b Function \b Description: This function is used to provide a API for application to choose what kind of VIF mdoe. 1545 /// 1546 //////////////////////////////////////////////////////////////////////////////// 1547 void MApi_AUDIO_SIF_Shift(En_AUD_VIF_Type type); 1548 1549 //============================================================ 1550 // AUDIO_FM_RADIO RELATIONAL API FUNCTION 1551 //============================================================ 1552 1553 //////////////////////////////////////////////////////////////////////////////// 1554 /// @ingroup Audio_ATV_SPDIF_HDMI 1555 /// @brief \b Function \b Name: MApi_AUDIO_FM_RADIO_GetSoundMode() 1556 /// @brief \b Function \b Description: Getting FM Radio Sound Mode 1557 /// @param <IN> \b NONE : 1558 /// @param <OUT> \b MS_U8 : return E_AUDIOMODE_MONO, E_AUDIOMODE_K_STEREO or E_AUDIOMODE_INVALID 1559 //////////////////////////////////////////////////////////////////////////////// 1560 // MS_U8 MApi_AUDIO_FM_RADIO_GetSoundMode(void); 1561 1562 //////////////////////////////////////////////////////////////////////////////// 1563 /// @ingroup Audio_ATV_SPDIF_HDMI 1564 /// @brief \b Function \b Name: MApi_AUDIO_FM_RADIO_SetSoundMode() 1565 /// @brief \b Function \b Description: Setting FM Radio Sound Mode 1566 /// @param <IN> \b MS_U8 : u8FMRadioSoundMode 1567 /// @param <OUT> \b NONE : 1568 //////////////////////////////////////////////////////////////////////////////// 1569 // void MApi_AUDIO_FM_RADIO_SetSoundMode(MS_U8 u8FMRadioSoundMode); 1570 1571 //////////////////////////////////////////////////////////////////////////////// 1572 /// @ingroup Audio_ATV_SPDIF_HDMI 1573 /// @brief \b Function \b Name: MApi_AUDIO_FM_RADIO_DeEmphassisOption() 1574 /// @brief \b Function \b Description: FM Radio De-emphassis Option 1575 /// @param <IN> \b MS_BOOL : Is_Europe 1576 /// @param <OUT> \b NONE : 1577 //////////////////////////////////////////////////////////////////////////////// 1578 // void MApi_AUDIO_FM_RADIO_DeEmphassisOption(MS_BOOL Is_Europe); 1579 1580 //////////////////////////////////////////////////////////////////////////////// 1581 /// @ingroup Audio_ATV_SPDIF_HDMI 1582 /// @brief \b Function \b Name: MApi_AUDIO_FM_RADIO_GET_DC_AMP() 1583 /// @brief \b Function \b Description: FM Radio get DC amp 1584 /// @param <IN> \b NONE 1585 /// @param <OUT> \b MS_S8 DC amp 1586 //////////////////////////////////////////////////////////////////////////////// 1587 // MS_S8 MApi_AUDIO_FM_RADIO_GET_DC_AMP(void); 1588 1589 //////////////////////////////////////////////////////////////////////////////// 1590 /// @ingroup Audio_ATV_SPDIF_HDMI 1591 /// @brief \b Function \b Name: MApi_AUDIO_FM_RADIO_GET_NSR() 1592 /// @brief \b Function \b Description: FM Radio get NSR 1593 /// @param <IN> \b NONE 1594 /// @param <OUT> \b MS_U8 NSR 1595 //////////////////////////////////////////////////////////////////////////////// 1596 // MS_U8 MApi_AUDIO_FM_RADIO_GET_NSR(void); 1597 1598 //////////////////////////////////////////////////////////////////////////////// 1599 /// @ingroup Audio_ATV_SPDIF_HDMI 1600 /// @brief \b Function \b Name: MApi_AUDIO_FM_RADIO_RESET() 1601 /// @brief \b Function \b Description: FM Radio reset 1602 /// @param <IN> \b NONE 1603 /// @param <OUT> \b NONE 1604 //////////////////////////////////////////////////////////////////////////////// 1605 // void MApi_AUDIO_FM_RADIO_RESET(void); 1606 1607 //============================================================= 1608 // AUDIO_SPDIF RELATIONAL API FUNCTION 1609 //============================================================= 1610 1611 //////////////////////////////////////////////////////////////////////////////// 1612 /// @ingroup Audio_ATV_SPDIF_HDMI 1613 /// @brief \b Function \b Name: MApi_AUDIO_SPDIF_HWEN() 1614 /// @brief \b Function \b Description: This routine is used to enable S/PDIF output (Hardware) 1615 /// @param spdif_en \b : 0--Disable S/PDIF out; 1616 /// 1--Enable S/PDIF out 1617 //////////////////////////////////////////////////////////////////////////////// 1618 void MApi_AUDIO_SPDIF_HWEN(MS_BOOL spdif_hwen); 1619 1620 //////////////////////////////////////////////////////////////////////////////// 1621 /// @ingroup Audio_ATV_SPDIF_HDMI 1622 /// @brief \b Function \b Name: MApi_AUDIO_SPDIF_SetMute() 1623 /// @brief \b Function \b Description: This routine is used to enable S/PDIF output (Hardware) 1624 /// @param mute_en \b : 0--Disable mute; 1625 /// 1--Enable mute 1626 //////////////////////////////////////////////////////////////////////////////// 1627 void MApi_AUDIO_SPDIF_SetMute(MS_BOOL mute_en); 1628 1629 //////////////////////////////////////////////////////////////////////////////// 1630 /// @ingroup Audio_ATV_SPDIF_HDMI 1631 /// @brief \b Function \b Name: MApi_AUDIO_SPDIF_SetMode() 1632 /// @brief \b Function \b Description: This routine is used to set S/PDIF mode. 1633 /// @param spdif_mode \b : PCM or Non-PCM mode 1634 /// - spdif_mode = 0x0 : SPDIF enable, PCM mode 1635 /// - spdif_mode = 0x1 : SPDIF off 1636 /// - spdif_mode = 0x2 : SPDIF enable, nonPCM mode 1637 //////////////////////////////////////////////////////////////////////////////// 1638 void MApi_AUDIO_SPDIF_SetMode(MS_U8 spdif_mode); 1639 1640 //////////////////////////////////////////////////////////////////////////////// 1641 /// @ingroup Audio_ATV_SPDIF_HDMI 1642 /// @brief \b Function \b Name: MApi_AUDIO_SPDIF_GetMode() 1643 /// @brief \b Function \b Description: This routine is used to get S/PDIF mode. 1644 /// @return MS_U8 \b : register SPDIF_CTRL value 1645 /// - 0x0 : SPDIF enable, PCM mode 1646 /// - 0x1 : SPDIF OFF 1647 /// - 0x2 : SPDIF enable, non-PCM mode 1648 //////////////////////////////////////////////////////////////////////////////// 1649 // MS_U8 MApi_AUDIO_SPDIF_GetMode(void); 1650 1651 //////////////////////////////////////////////////////////////////////////////// 1652 /// @ingroup Audio_ATV_SPDIF_HDMI 1653 /// @brief \b Function \b Name: MApi_AUDIO_SPDIF_SetSCMS() 1654 /// @brief \b Function \b Description: This routine is used to set SPDIF SCMS. 1655 /// @param C_bit_en \b : copy right control bit 1656 /// @param L_bit_en \b : generation bit 1657 //////////////////////////////////////////////////////////////////////////////// 1658 void MApi_AUDIO_SPDIF_SetSCMS(MS_U8 C_bit_en, MS_U8 L_bit_en); 1659 1660 //////////////////////////////////////////////////////////////////////////////// 1661 /// @ingroup Audio_ATV_SPDIF_HDMI 1662 /// @brief \b Function \b Name: MApi_AUDIO_SPDIF_GetSCMS() 1663 /// @brief \b Function \b Description: This routine is used to get SPDIF SCMS. 1664 /// @return MS_U8 \b : SCMS[0] = C bit status, SCMS[1] = L bit status 1665 //////////////////////////////////////////////////////////////////////////////// 1666 MS_U8 MApi_AUDIO_SPDIF_GetSCMS(void); 1667 // void MApi_AUDIO_SPDIF_SetOutputType(AUDIO_SPDIF_OUTPUT_TYPE eType); // New API for S/PDIF output auto/PCM mode switching 1668 1669 //////////////////////////////////////////////////////////////////////////////// 1670 /// @ingroup Audio_ATV_SPDIF_HDMI 1671 /// @brief \b Function \b Name: MApi_Audio_SPDIF_Monitor() 1672 /// @brief \b Function \b Description: 1673 /// @param pau_info \b : AUDIO INIT STRUCTURE 1674 //////////////////////////////////////////////////////////////////////////////// 1675 void MApi_Audio_SPDIF_Monitor(void); 1676 // void MApi_Audio_Monitor_SPDIF_NONPCM_SmpRate(void); 1677 1678 //////////////////////////////////////////////////////////////////////////////// 1679 /// @ingroup Audio_ATV_SPDIF_HDMI 1680 /// @brief \b Function \b Name: MApi_AUDIO_SPDIF_ChannelStatus_CTRL() 1681 /// @brief \b Function \b Description: 1682 /// @param pau_info \b : AUDIO INIT STRUCTURE 1683 //////////////////////////////////////////////////////////////////////////////// 1684 MS_BOOL MApi_AUDIO_SPDIF_ChannelStatus_CTRL(AUDIO_SPDIF_CS_TYPE cs_mode, AUDIO_SPDIF_CS_TYPE_STATUS status); 1685 1686 //////////////////////////////////////////////////////////////////////////////// 1687 /// @ingroup Audio_ATV_SPDIF_HDMI 1688 /// @brief \b Function \b Name: HAL_AUDIO_Digital_Out_SetChannelStatus() 1689 /// @brief \b Function \b Description: This routine is used to set SPDIF/HDMI/ARC channel status. 1690 /// @param <IN> \b eType : 1691 /// @param <OUT> \b NONE : 1692 /// @param <RET> \b NONE : 1693 //////////////////////////////////////////////////////////////////////////////// 1694 // MS_BOOL MApi_AUDIO_DigitalOut_SetChannelStatus(DIGITAL_OUTPUT_TYPE ePath, Digital_Out_Channel_Status_t *stChannelStatus); 1695 1696 1697 //////////////////////////////////////////////////////////////////////////////// 1698 /// @ingroup Audio_ATV_SPDIF_HDMI 1699 /// @brief \b Function \b Name: MApi_AUDIO_DigitalOut_SetDeviceCapability() 1700 /// @brief \b Function \b Description: This routine is used to set output device capability. 1701 /// @param <IN> \b eoutType: output type (ARC_OUTPUT or HDMI_OUTPUT) 1702 /// @param <IN> \b ecodecType: kind of codec 1703 /// @param <IN> \b *p_codecCapability: codec support capability structure 1704 /// @param <RET> \b bRet: return api setting success or fail 1705 //////////////////////////////////////////////////////////////////////////////// 1706 MS_BOOL MApi_AUDIO_DigitalOut_SetDeviceCapability(DIGITAL_OUTPUT_TYPE eoutType, AUDIO_FORMAT_CODE ecodecType, Digital_Out_Device_Capability_t *p_codecCapability); 1707 1708 //============================================================= 1709 // AUDIO_HDMI RELATIONAL API FUNCTION 1710 //============================================================= 1711 1712 //////////////////////////////////////////////////////////////////////////////// 1713 /// @ingroup Audio_ATV_SPDIF_HDMI 1714 /// @brief \b Function \b Name: MApi_AUDIO_HDMI_Tx_SetMute() 1715 /// @brief \b Function \b Description: This routine is used to enable HDMI Tx output (Software) 1716 /// @param mute_en \b : 0--Disable mute; 1717 /// 1--Enable mute 1718 //////////////////////////////////////////////////////////////////////////////// 1719 void MApi_AUDIO_HDMI_Tx_SetMute(MS_BOOL mute_en); 1720 1721 //////////////////////////////////////////////////////////////////////////////// 1722 /// @ingroup Audio_ATV_SPDIF_HDMI 1723 /// @brief \b Function \b Name: MApi_AUDIO_HDMI_Tx_GetStatus() 1724 /// @brief \b Function \b Description: This routine is used to get HDMI Tx status 1725 /// @param onOff \b : HDMI tx function is availible in this chip ? 1726 /// @param hdmi_SmpFreq \b : Audio current sample freq for tx 1727 /// @param outType \b : PCM mode or nonPCM mode 1728 //////////////////////////////////////////////////////////////////////////////// 1729 void MApi_AUDIO_HDMI_Tx_GetStatus(MS_BOOL *onOff, AUDIO_FS_TYPE *hdmi_SmpFreq, HDMI_TX_OUTPUT_TYPE *outType ); 1730 1731 //////////////////////////////////////////////////////////////////////////////// 1732 /// @ingroup Audio_ATV_SPDIF_HDMI 1733 /// @brief \b Function \b Name: MApi_AUDIO_HDMI_Monitor() 1734 /// @brief \b Function \b Description: This function report HDMI non-PCM or PCM format (register STATUS_INPUT) 1735 /// @return MS_U8 \b : 1736 /// - non-PCM --> register STATUS_INPUT[7:6]= 0x1; 1737 /// - PCM --> register STATUS_INPUT[7:6]= 0x0 1738 //////////////////////////////////////////////////////////////////////////////// 1739 // MS_U8 MApi_AUDIO_HDMI_Monitor(void); 1740 1741 //////////////////////////////////////////////////////////////////////////////// 1742 /// @ingroup Audio_ATV_SPDIF_HDMI 1743 /// @brief \b Function \b Name: MApi_AUDIO_HDMI_GetNonpcmFlag() 1744 /// @brief \b Function \b Description: This function report HDMI non-PCM or PCM format (register STATUS_INPUT) 1745 /// @return MS_BOOL \b : 1746 /// - TRUE : non-PCM --> register STATUS_INPUT[7:6]= 0x1 ; 1747 /// - FALSE : PCM --> register STATUS_INPUT[7:6]= 0x0 1748 //////////////////////////////////////////////////////////////////////////////// 1749 MS_BOOL MApi_AUDIO_HDMI_GetNonpcmFlag(void); 1750 1751 //////////////////////////////////////////////////////////////////////////////// 1752 /// @ingroup Audio_ATV_SPDIF_HDMI 1753 /// @brief \b Function \b Name: MApi_AUDIO_HDMI_SetNonpcm() 1754 /// @brief \b Function \b Description: This function setting HDMI non-PCM or PCM relational register 1755 /// @param nonPCM_en \b : 1: nonPCM; 0: PCM 1756 //////////////////////////////////////////////////////////////////////////////// 1757 void MApi_AUDIO_HDMI_SetNonpcm(MS_U8 nonPCM_en); 1758 1759 //////////////////////////////////////////////////////////////////////////////// 1760 /// @ingroup Audio_ATV_SPDIF_HDMI 1761 /// @brief \b Function \b Name: MApi_AUDIO_HDMI_RX_SetNonpcm() 1762 /// @brief \b Function \b Description: This function setting HDMI non-PCM or PCM relational register 1763 /// @param nonPCM_en \b : 1: nonPCM; 0: PCM 1764 /// @return AUDIO_HDMI_RX_TYPE \b : Return HDMI RX Type 1765 //////////////////////////////////////////////////////////////////////////////// 1766 AUDIO_HDMI_RX_TYPE MApi_AUDIO_HDMI_RX_SetNonpcm(MS_U8 nonPCM_en); 1767 1768 //////////////////////////////////////////////////////////////////////////////// 1769 /// @ingroup Audio_ATV_SPDIF_HDMI 1770 /// @brief \b Function \b Name: MApi_AUDIO_HDMI_RX_SetNonpcm() 1771 /// @brief \b Function \b Description: This function setting HDMI non-PCM or PCM relational register 1772 /// @param nonPCM_en \b : 1: nonPCM; 0: PCM 1773 /// @return AUDIO_HDMI_RX_TYPE \b : Return HDMI RX Type 1774 //////////////////////////////////////////////////////////////////////////////// 1775 AUDIO_HDMI_RX_TYPE MApi_AUDIO_HDMI_RX_GetNonPCM(void); 1776 1777 //////////////////////////////////////////////////////////////////////////////// 1778 /// @ingroup Audio_ATV_SPDIF_HDMI 1779 /// @brief \b Function \b Name: MApi_AUDIO_DTV_HDMI_CFG() 1780 /// @brief \b Function \b Description: Set DVB/HDMI AC3 path configure 1781 /// @param ctrl \b : 0: DVB2_AD path; 1782 /// 1: HDMI path 1783 //////////////////////////////////////////////////////////////////////////////// 1784 void MApi_AUDIO_DTV_HDMI_CFG(MS_U8 ctrl); 1785 1786 //////////////////////////////////////////////////////////////////////////////// 1787 /// @ingroup Audio_ATV_SPDIF_HDMI 1788 /// @brief \b Function \b Name: MApi_AUDIO_HDMI_GetSynthFreq() 1789 /// @brief \b Function \b Description: Audio HDMI CTS-N synthesizer input signal detect. 1790 /// @return MS_U16 \b : return freq. If no signal, return 0 1791 //////////////////////////////////////////////////////////////////////////////// 1792 MS_U16 MApi_AUDIO_HDMI_GetSynthFreq(void); 1793 1794 //////////////////////////////////////////////////////////////////////////////// 1795 /// @ingroup Audio_ATV_SPDIF_HDMI 1796 /// @brief \b Function \b Name: MApi_AUDIO_HDMI_SetDownSample() 1797 /// @brief \b Function \b Description: set HDMI downsample rate 1798 /// @param ratio \b : donwsample ratio 1799 /// - 00: Normal (from 1x to 1x). 1800 /// - 01: Down sample from 2x to 1x. 1801 //////////////////////////////////////////////////////////////////////////////// 1802 void MApi_AUDIO_HDMI_SetDownSample(MS_U8 ratio); 1803 1804 //////////////////////////////////////////////////////////////////////////////// 1805 /// @ingroup Audio_ATV_SPDIF_HDMI 1806 /// @brief \b Function \b Name: MApi_AUDIO_HDMI_SetOutputType() 1807 /// @brief \b Function \b Description: To set HDMI output type independently 1808 //////////////////////////////////////////////////////////////////////////////// 1809 void MApi_AUDIO_HDMI_TX_SetMode(HDMI_TX_OUTPUT_TYPE outType); 1810 1811 //////////////////////////////////////////////////////////////////////////////// 1812 /// @ingroup Audio_System 1813 /// @brief \b Function \b Name: MApi_AUDIO_HDMI_RX_GetHdmiInAudioStatus() 1814 /// @brief \b Function \b Description: Return audio status. 1815 /// @return MS_U16 \b : return structure which include pcm, non pcm, sampling rate. 1816 //////////////////////////////////////////////////////////////////////////////// 1817 // MS_BOOL MApi_AUDIO_HDMI_RX_GetHdmiInAudioStatus( ST_HDMI_AUDIO_STATUS *p_hdmiAudioSts); 1818 1819 //============================================================= 1820 // AUDIO_ADVANCE_SOUND RELATIONAL API FUNCTION 1821 //============================================================= 1822 1823 //////////////////////////////////////////////////////////////////////////////// 1824 /// @ingroup Audio_ADVANCED_SOUNDEFFECT 1825 /// @brief \b Function \b Name: MApi_AUDIO_ADVSOUND_ProcessEnable 1826 /// @brief \b Function \b Description: This routine is used to enable process of advanced sound effect. 1827 /// @param <IN> \b ADVSND_TYPE type 1828 /// @param <OUT> \b NONE : 1829 /// @param <RET> \b NONE : 1830 /// @param <GLOBAL> \b NONE 1831 //////////////////////////////////////////////////////////////////////////////// 1832 MS_BOOL MApi_AUDIO_ADVSOUND_ProcessEnable(ADVSND_TYPE type); 1833 1834 //////////////////////////////////////////////////////////////////////////////// 1835 /// @ingroup Audio_ADVANCED_SOUNDEFFECT 1836 /// @brief \b Function \b Name: MApi_AUDIO_ADVSOUND_SubProcessEnable(ADVFUNC proc, BOOL enable) 1837 /// @brief \b Function \b Description: This routine is used to enable subprocess of advanced sound effect. 1838 /// @param <IN> \b proc, enable 1839 /// @param <OUT> \b NONE : 1840 /// @param <RET> \b NONE : 1841 /// @param <GLOBAL> \b NONE 1842 //////////////////////////////////////////////////////////////////////////////// 1843 MS_BOOL MApi_AUDIO_ADVSOUND_SubProcessEnable(ADVFUNC proc, MS_BOOL enable); 1844 1845 //////////////////////////////////////////////////////////////////////////////// 1846 /// @ingroup Audio_ADVANCED_SOUNDEFFECT 1847 /// @brief \b Function \b Name: MApi_AUDIO_ADVSOUND_SetParam(ADVSND_PARAM param, U16 value1, U16 value2) 1848 /// @brief \b Function \b Description: This routine is used to set paramters advanced sound effect. 1849 /// @param <IN> \b param, value1, value2 1850 /// @param <OUT> \b NONE : 1851 /// @param <RET> \b NONE : 1852 /// @param <GLOBAL> \b NONE 1853 //////////////////////////////////////////////////////////////////////////////// 1854 MS_BOOL MApi_AUDIO_ADVSOUND_SetParam(ADVSND_PARAM param, MS_U16 u16value1, MS_U16 u16value2); 1855 1856 //////////////////////////////////////////////////////////////////////////////// 1857 /// @ingroup Audio_ToBeRemove 1858 /// @brief \b Function \b Name: MApi_AUDIO_ADVSOUND_SetParam(ADVSND_PARAM param, U32 value1, U16 value2) 1859 /// @brief \b Function \b Description: This routine is used to set paramters advanced sound effect. 1860 /// @param <IN> \b param, u32value1, u16value2 1861 /// \b Parameter u32value1: range 0~0x7FFFFF 1862 /// \b Parameter u16value2: 0/1, 1863 /// - 0 : if u32value1 is u16, none fix point 24 bit parameter 1864 /// - 1 : if u32value1 is u32, fix point 24 bit parameter 1865 /// @param <OUT> \b NONE : 1866 /// @return <OUT> \b FALSE : Setting Fail 1867 /// \b TRUE : Setting OK 1868 /// @param <GLOBAL> \b NONE 1869 //////////////////////////////////////////////////////////////////////////////// 1870 MS_BOOL MApi_AUDIO_ADVSND_SetParam(ADVSND_PARAM param, MS_U32 u32value1, MS_U16 u16value2); 1871 1872 //////////////////////////////////////////////////////////////////////////////// 1873 /// @ingroup Audio_ADVANCED_SOUNDEFFECT 1874 /// @brief \b Function \b Name: MApi_AUDIO_ADVSOUND_GetInfo() 1875 /// @brief \b Function \b Description: This routine is used for Get ADV Sound info 1876 /// @return MS_BOOL \b : True / False 1877 //////////////////////////////////////////////////////////////////////////////// 1878 MS_U32 MApi_AUDIO_ADVSOUND_GetInfo( AdvSound_GET_Type Type); 1879 1880 //////////////////////////////////////////////////////////////////////////////// 1881 /// @ingroup Audio_ToBeRemove 1882 /// @brief \b Function \b Name: MApi_DBXTV_SetMode(DBXTV_TotSonMode TotSonMode, DBXTV_TotVolMode TotVolMode, DBXTV_TotSurMode TotSurMode) 1883 /// @brief \b Function \b Description: This routine is used to set dbx TV mode 1884 /// @param <IN> \b param, TotSonMode, TotVolMode, TotSurMode 1885 /// @param <OUT> \b NONE : 1886 /// @param <RET> \b NONE : 1887 /// @param <GLOBAL> \b NONE 1888 //////////////////////////////////////////////////////////////////////////////// 1889 void MApi_DBXTV_SetMode(EN_DBXTV_TotSonMode totsonmode, EN_DBXTV_TotVolMode totvolmode, EN_DBXTV_TotSurMode totsurmode,MS_U32 enable); 1890 1891 //////////////////////////////////////////////////////////////////////////////// 1892 /// @ingroup Audio_BASIC_SOUNDEFFECT 1893 /// @brief \b Function \b Name: MApi_AUDIO_SeInit() 1894 /// @brief \b Function \b Description: This routine is the initialization for Audio sound effect module. 1895 //////////////////////////////////////////////////////////////////////////////// 1896 // void MApi_AUDIO_SeInit(void); 1897 1898 //////////////////////////////////////////////////////////////////////////////// 1899 /// @ingroup Audio_ToBeMerged 1900 /// @brief \b Function \b Name: MApi_AUDIO_SetAdvSndSys() 1901 /// @brief \b Function \b Description: Check Advance sound mod and reload code 1902 /// @param u8AdvSurrMod \b : Audio Advance Sound system mod 1903 //////////////////////////////////////////////////////////////////////////////// 1904 void MApi_AUDIO_SetAdvSndSys(MS_U8 u8AdvSurrMod); 1905 1906 //////////////////////////////////////////////////////////////////////////////// 1907 /// @ingroup Audio_ToBeMerged 1908 /// @brief \b Function \b Name: MApi_AUDIO_VDS() 1909 /// @brief \b Function \b Description: Dolby Virtual Surround 1910 /// @param u8enVDS \b : 1: enable; 0: disable 1911 //////////////////////////////////////////////////////////////////////////////// 1912 // void MApi_AUDIO_SetVDS(MS_U8 u8enVDS); 1913 1914 //////////////////////////////////////////////////////////////////////////////// 1915 /// @ingroup Audio_ToBeMerged 1916 /// @brief \b Function \b Name: MApi_AUDIO_SetVSPK() 1917 /// @brief \b Function \b Description: Dolby Virtual Speaker 1918 /// @param u8enVSPK \b : 1: enable; 0: disable 1919 //////////////////////////////////////////////////////////////////////////////// 1920 // void MApi_AUDIO_SetVSPK(MS_U8 u8enVSPK); 1921 1922 //////////////////////////////////////////////////////////////////////////////// 1923 /// @ingroup Audio_ToBeMerged 1924 /// @brief \b Function \b Name: MApi_AUDIO_SetSRS() 1925 /// @brief \b Function \b Description: SRS TruSurr 1926 /// @param u8enSRS \b : 1: enable; 0: disable 1927 //////////////////////////////////////////////////////////////////////////////// 1928 void MApi_AUDIO_SetSRS(MS_U8 u8enSRS); 1929 1930 //////////////////////////////////////////////////////////////////////////////// 1931 /// @ingroup Audio_ToBeMerged 1932 /// @brief \b Function \b Name: MApi_AUDIO_SetBBE() 1933 /// @brief \b Function \b Description: BBE Surround 1934 /// @param u8enBBE \b : 1: enable; 0: disable 1935 /// @param u8BBEMode \b : 1936 //////////////////////////////////////////////////////////////////////////////// 1937 // void MApi_AUDIO_SetBBE(MS_U8 u8enBBE,MS_U8 u8BBEMode); 1938 1939 //////////////////////////////////////////////////////////////////////////////// 1940 /// @ingroup Audio_ToBeMerged 1941 /// @brief \b Function \b Name: MApi_AUDIO_VSPK_WMod() 1942 /// @brief \b Function \b Description: Dolby Virtual Speaker Wide Mod 1943 /// @param u8VSPK_WMode \b : 0: reference mod; 1: wide mod 1944 //////////////////////////////////////////////////////////////////////////////// 1945 // void MApi_AUDIO_VSPK_WMod(MS_U8 u8VSPK_WMode); 1946 1947 //////////////////////////////////////////////////////////////////////////////// 1948 /// @ingroup Audio_ToBeMerged 1949 /// @brief \b Function \b Name: MApi_AUDIO_VSPK_SMod() 1950 /// @brief \b Function \b Description: Dolby Virtual Speaker Surround Mod 1951 /// @param u8VSPK_SMode \b : 0: movie mod; 1: music mod 1952 //////////////////////////////////////////////////////////////////////////////// 1953 // void MApi_AUDIO_VSPK_SMod(MS_U8 u8VSPK_SMode); 1954 1955 //////////////////////////////////////////////////////////////////////////////// 1956 /// @ingroup Audio_ToBeMerged 1957 /// @brief \b Function \b Name: MApi_AUDIO_SRS_DC() 1958 /// @brief \b Function \b Description: SRS Dialog Clarity 1959 /// @param u8SRSenDC \b : 1: enable; 0: disable 1960 //////////////////////////////////////////////////////////////////////////////// 1961 // void MApi_AUDIO_SRS_DC(MS_U8 u8SRSenDC); 1962 1963 //////////////////////////////////////////////////////////////////////////////// 1964 /// @ingroup Audio_ToBeMerged 1965 /// @brief \b Function \b Name: MApi_AUDIO_SRS_TruBass() 1966 /// @brief \b Function \b Description: SRS TruBass 1967 /// @param u8SRSenTruBass \b : 1: enable; 0: disable 1968 //////////////////////////////////////////////////////////////////////////////// 1969 // void MApi_AUDIO_SRS_TruBass(MS_U8 u8SRSenTruBass); 1970 1971 //////////////////////////////////////////////////////////////////////////////// 1972 /// @ingroup Audio_ToBeMerged 1973 /// @brief \b Function \b Name: MApi_SOUND_SRS_SetTsxtPara() 1974 /// @brief \b Function \b Description: This function is used to set paramters of SRS-TSXT 1975 /// @param u8mode \b : parameter mode 1976 /// @param u8value \b : parameter value 1977 //////////////////////////////////////////////////////////////////////////////// 1978 void MApi_AUDIO_SRS_SetTsxtPara(MS_U8 u8mode, MS_U8 u8value); 1979 1980 //////////////////////////////////////////////////////////////////////////////// 1981 /// @ingroup Audio_ToBeMerged 1982 /// @brief \b Function \b Name: MApi_AUDIO_SetSRSTSHD() 1983 /// @brief \b Function \b Description: SRS TruSurround HD 1984 /// @param u8enSRS \b : 1: enable; 0: disable 1985 //////////////////////////////////////////////////////////////////////////////// 1986 void MApi_AUDIO_SetSRSTSHD(MS_U8 u8enTSHD); 1987 1988 //////////////////////////////////////////////////////////////////////////////// 1989 /// @ingroup Audio_ToBeRemove 1990 /// @brief \b Function \b Name: Mapi_SOUND_TSHD_TruBass() 1991 /// @brief \b Function \b Description: TSHD TruBass 1992 /// @param u8SRSenTruBass \b : 1: enable; 0: disable 1993 //////////////////////////////////////////////////////////////////////////////// 1994 // void Mapi_SOUND_TSHD_TruBass(MS_U8 u8TSHDenTruBass); 1995 1996 //////////////////////////////////////////////////////////////////////////////// 1997 /// @ingroup Audio_ToBeMerged 1998 /// @brief \b Function \b Name: MApi_AUDIO_TSHD_Definition() 1999 /// @brief \b Function \b Description: This function is used to enable/disable SRS-HD Definition 2000 /// @param u8TSHDenDefinition \b : 1: enable, 0: disable 2001 //////////////////////////////////////////////////////////////////////////////// 2002 // void MApi_AUDIO_TSHD_Definition(MS_U8 u8TSHDenDefinition); 2003 2004 //////////////////////////////////////////////////////////////////////////////// 2005 /// @ingroup Audio_ToBeRemove 2006 /// @brief \b Function \b Name: Mapi_SOUND_TSHD_Definition() 2007 /// @brief \b Function \b Description: This function is used to enable/disable SRS-HD Definition 2008 /// @param u8TSHDenDefinition \b : 1: enable, 0: disable 2009 //////////////////////////////////////////////////////////////////////////////// 2010 // void Mapi_SOUND_TSHD_Definition(MS_U8 u8TSHDenDefinition); 2011 2012 //////////////////////////////////////////////////////////////////////////////// 2013 /// @ingroup Audio_ToBeMerged 2014 /// @brief \b Function \b Name: MApi_SOUND_SRS_SetTshdPara() 2015 /// @brief \b Function \b Description: This function is used to set paramters of SRS-TSHD 2016 /// @param u8mode \b : parameter mode 2017 /// @param u8value \b : parameter value 2018 //////////////////////////////////////////////////////////////////////////////// 2019 // void MApi_AUDIO_SRS_SetTshdPara(MS_U8 u8mode, MS_U8 u8value); 2020 2021 //////////////////////////////////////////////////////////////////////////////// 2022 /// @ingroup Audio_BASIC_SOUNDEFFECT 2023 /// @brief \b Function \b Name: MApi_AUDIO_COPY_Parameter() 2024 /// @brief \b Function \b Description: Copy parameter from APP level 2025 /// @param u8enVSPK \b : 2026 //////////////////////////////////////////////////////////////////////////////// 2027 void MApi_AUDIO_COPY_Parameter(ADVSND_PARAM type, MS_U32 *Parameter_ptr,MS_U32 size); 2028 2029 //============================================================= 2030 // AUDIO_KTV RELATIONAL API FUNCTION 2031 //============================================================= 2032 2033 //////////////////////////////////////////////////////////////////////////////// 2034 /// @ingroup Audio_BASIC_SOUNDEFFECT 2035 /// @brief \b Function \b Name: MApi_AUDIO_SetKTVInfo() 2036 /// @brief \b Function \b Description: Set KTV parameter 2037 /// @param modelType \b : KTV model type 2038 /// @param infoType \b : KTV infomation type 2039 /// @param param1 \b : 2040 /// @param param2 \b : 2041 //////////////////////////////////////////////////////////////////////////////// 2042 MS_BOOL MApi_AUDIO_SetKTVInfo (AUDIO_KTV_MODEL modelType, AUDIO_KTV_PARAMTYPE paramType, MS_U32 param1, MS_U32 param2); 2043 2044 //////////////////////////////////////////////////////////////////////////////// 2045 /// @ingroup Audio_BASIC_SOUNDEFFECT 2046 /// @brief \b Function \b Name: MApi_AUDIO_GetKTVInfo() 2047 /// @brief \b Function \b Description: Get KTV parameter 2048 /// @param modelType \b : KTV model type 2049 /// @param infoType \b : KTV infomation type 2050 /// @return MS_U32 \b : return KTV value 2051 //////////////////////////////////////////////////////////////////////////////// 2052 MS_U32 MApi_AUDIO_GetKTVInfo (AUDIO_KTV_MODEL modelType, AUDIO_KTV_INFOTYPE infoType); 2053 2054 //////////////////////////////////////////////////////////////////////////////// 2055 /// @ingroup Audio_BASIC_SOUNDEFFECT 2056 /// @brief \b Function \b Name: MApi_AUDIO_SetMixModeVolume() 2057 /// @brief \b Function \b Description: This routine is used to set the absolute u8Volume of mix mode. 2058 /// @param eSourceType \b : for audio source 2059 /// @param VolType \b : for audio vol type 2060 /// @param u8Vol1 \b : MSB 7-bit register value of 10-bit u8Volume 2061 /// range from 0x00 to 0x7E , gain: +12db to -114db (-1 db per step) 2062 /// @param u8Vol2 \b : LSB 3-bit register value of 10-bit u8Volume 2063 /// range from 0x00 to 0x07 , gain: -0db to -0.875db (-0.125 db per step) 2064 //////////////////////////////////////////////////////////////////////////////// 2065 void MApi_AUDIO_SetMixModeVolume(AUDIO_SOURCE_INFO_TYPE eSourceType, AUDIO_MIX_VOL_TYPE VolType, MS_U8 u8Vol1, MS_U8 u8Vol2); 2066 2067 //////////////////////////////////////////////////////////////////////////////// 2068 /// @ingroup Audio_BASIC_SOUNDEFFECT 2069 /// @brief \b Function \b Name: MApi_AUDIO_SetMixModeMute() 2070 /// @brief \b Function \b Description: This routine is used to set audio mix mode mute 2071 /// @param eSourceType \b : for audio source 2072 /// @param VolType \b : for audio vol type 2073 /// @param EnMute \b : TRUE --Mute; 2074 /// FALSE--Unmute 2075 //////////////////////////////////////////////////////////////////////////////// 2076 void MApi_AUDIO_SetMixModeMute(AUDIO_SOURCE_INFO_TYPE eSourceType, AUDIO_MIX_VOL_TYPE VolType, MS_BOOL EnMute); 2077 2078 //////////////////////////////////////////////////////////////////////////////// 2079 /// @ingroup Audio_ToBeRemove 2080 /// @brief \b Function \b Name: MApi_AUDIO_PlayMenuSound() 2081 /// @brief \b Function \b Description: This routine is used to Play Menu Sound. 2082 //////////////////////////////////////////////////////////////////////////////// 2083 void MApi_AUDIO_PlayMenuSound(void); 2084 2085 //============================================================= 2086 // AUDIO_OTHERS FUNCTION 2087 //============================================================= 2088 //Cathy0511 void MApi_AUDIO_SetAudioSource(AUDIOSOURCE_TYPE eSource); 2089 //Certification 2090 2091 //////////////////////////////////////////////////////////////////////////////// 2092 /// @ingroup Audio_ToBeRemove 2093 /// @brief \b Function \b Name: MApi_AUDIO_SetCertMode() 2094 /// @brief \b Function \b Description: 2095 /// @param CertType \b : 2096 /// @param enable \b : 2097 /// 2098 //////////////////////////////////////////////////////////////////////////////// 2099 // MS_BOOL MApi_AUDIO_SetCertMode( Audio_CertMode CertType,Audio_CertEnable enable); 2100 2101 //============================================================= 2102 // AUDIO_MM RELATIONAL API FUNCTION 2103 //============================================================= 2104 // Each Decoder functions 2105 // Set Info 2106 2107 //****************************************************************************** 2108 /// @ingroup Audio_Decoder 2109 /// @brief \b Function \b Name: MApi_AUDIO_SetCommAudioInfo() 2110 /// @brief \b Function \b Description: This routine is used for adjust Common Audio decoder parameters 2111 /// @return MS_BOOL \b : True / False 2112 //****************************************************************************** 2113 MS_BOOL MApi_AUDIO_SetCommAudioInfo( Audio_COMM_infoType infoType, MS_VIRT param1, MS_VIRT param2 ); 2114 //****************************************************************************** 2115 /// @ingroup Audio_ToBeRemove 2116 /// @brief \b Function \b Name: MApi_AUDIO_SetMpegInfo() 2117 /// @brief \b Function \b Description: This routine is used for adjust MPEG Audio decoder parameters 2118 /// @return MS_BOOL \b : True / False 2119 //****************************************************************************** 2120 MS_BOOL MApi_AUDIO_SetMpegInfo( Audio_MPEG_infoType infoType, MS_VIRT param1, MS_VIRT param2 ); 2121 //****************************************************************************** 2122 /// @ingroup Audio_ToBeRemove 2123 /// @brief \b Function \b Name: MApi_AUDIO_SetAC3Info() 2124 /// @brief \b Function \b Description: This routine is used for adjust AC3 Audio decoder parameters 2125 /// @return MS_BOOL \b : True / False 2126 //****************************************************************************** 2127 MS_BOOL MApi_AUDIO_SetAC3Info( Audio_AC3_infoType infoType, MS_VIRT param1, MS_VIRT param2 ); 2128 2129 //****************************************************************************** 2130 /// @ingroup Audio_ToBeRemove 2131 /// @brief \b Function \b Name: MApi_AUDIO_SetAC3PInfo() 2132 /// @brief \b Function \b Description: This routine is used for adjust AC3+ Audio decoder parameters 2133 /// @return MS_BOOL \b : True / False 2134 //****************************************************************************** 2135 MS_BOOL MApi_AUDIO_SetAC3PInfo( Audio_AC3P_infoType infoType, MS_VIRT param1, MS_VIRT param2 ); 2136 //****************************************************************************** 2137 /// @ingroup Audio_ToBeRemove 2138 /// @brief \b Function \b Name: MApi_AUDIO_SetAACInfo() 2139 /// @brief \b Function \b Description: This routine is used for adjust AAC Audio decoder parameters 2140 /// @return MS_BOOL \b : True / False 2141 //****************************************************************************** 2142 MS_BOOL MApi_AUDIO_SetAACInfo( Audio_AAC_infoType infoType, MS_VIRT param1, MS_VIRT param2 ); 2143 //****************************************************************************** 2144 /// @ingroup Audio_ToBeRemove 2145 /// @brief \b Function \b Name: MApi_AUDIO_SetWmaInfo() 2146 /// @brief \b Function \b Description: This routine is used for adjust WMA Audio decoder parameters 2147 /// @return MS_BOOL \b : True / False 2148 //****************************************************************************** 2149 MS_BOOL MApi_AUDIO_SetWmaInfo( Audio_WMA_infoType infoType, MS_VIRT param1, MS_VIRT param2 ); 2150 //****************************************************************************** 2151 /// @ingroup Audio_ToBeRemove 2152 /// @brief \b Function \b Name: MApi_AUDIO_SetDTSCommonCtrl() 2153 /// @brief \b Function \b Description: This routine is used for adjust DTS Audio decoder control 2154 /// @return MS_BOOL \b : True / False 2155 //****************************************************************************** 2156 MS_BOOL MApi_AUDIO_SetDTSCommonCtrl( Audio_DTS_infoType infoType, Audio_DTS_CtrlType ctrl_type ); 2157 2158 //****************************************************************************** 2159 /// @ingroup Audio_Decoder 2160 /// @brief \b Function \b Name: MApi_AUDIO_GetCommAudioInfo() 2161 /// @brief \b Function \b Description: This routine will return the 64bit Common info according to info type 2162 /// @return long long \b : 64bit info 2163 //****************************************************************************** 2164 MS_U64 MApi_AUDIO_GetCommAudioInfo( Audio_COMM_infoType infoType ); 2165 2166 //****************************************************************************** 2167 /// @ingroup Audio_ToBeRemove 2168 /// @brief \b Function \b Name: MApi_AUDIO_GetMpegInfo() 2169 /// @brief \b Function \b Description: This routine will return the 32bit mpeg info according to info type 2170 /// @return MS_U32 \b : 32bit info 2171 //****************************************************************************** 2172 MS_U32 MApi_AUDIO_GetMpegInfo( Audio_MPEG_infoType infoType ); 2173 2174 //****************************************************************************** 2175 /// @ingroup Audio_ToBeRemove 2176 /// @brief \b Function \b Name: MApi_AUDIO_GetAC3Info() 2177 /// @brief \b Function \b Description: This routine will return the 32bit ac3 info according to info type 2178 /// @return MS_U32 \b : 32bit info 2179 //****************************************************************************** 2180 MS_U32 MApi_AUDIO_GetAC3Info( Audio_AC3_infoType infoType ); 2181 2182 //****************************************************************************** 2183 /// @ingroup Audio_ToBeRemove 2184 /// @brief \b Function \b Name: MApi_AUDIO_GetAC3PInfo() 2185 /// @brief \b Function \b Description: This routine will return the 32bit ac3+ info according to info type 2186 /// @return MS_U32 \b : 32bit info 2187 //****************************************************************************** 2188 MS_U32 MApi_AUDIO_GetAC3PInfo( Audio_AC3P_infoType infoType ); 2189 2190 //****************************************************************************** 2191 /// @ingroup Audio_ToBeRemove 2192 /// @brief \b Function \b Name: MApi_AUDIO_GetAACInfo() 2193 /// @brief \b Function \b Description: This routine will return the 32bit AAC info according to info type 2194 /// @return MS_U32 \b : 32bit info 2195 //****************************************************************************** 2196 MS_U32 MApi_AUDIO_GetAACInfo( Audio_AAC_infoType infoType ); 2197 2198 //****************************************************************************** 2199 /// @ingroup Audio_ToBeRemove 2200 /// @brief \b Function \b Name: MApi_AUDIO_GetWmaInfo() 2201 /// @brief \b Function \b Description: This routine will return the 32bit wma info according to info type 2202 /// @return MS_U32 \b : 32bit info 2203 //****************************************************************************** 2204 MS_U32 MApi_AUDIO_GetWmaInfo( Audio_WMA_infoType infoType ); 2205 2206 //****************************************************************************** 2207 /// @ingroup Audio_ToBeRemove 2208 /// @brief \b Function \b Name: MApi_AUDIO_GetDTSInfo() 2209 /// @brief \b Function \b Description: This routine will return the 32bit DTS info according to info type 2210 /// @return MS_U32 \b : 32bit info 2211 //****************************************************************************** 2212 // MS_U32 MApi_AUDIO_GetDTSInfo( Audio_DTS_infoType infoType ); 2213 2214 //////////////////////////////////////////////////////////////////////////////// 2215 /// @ingroup Audio_ToBeRemove 2216 /// @brief \b Function \b Name: MApi_AUDIO_XPCM_Param() 2217 /// @brief \b Function \b Description: This routine configures necessary parameters when playing XPCM data 2218 /// @param audioType \b : 1--lpcm; 2219 /// 2--MS-ADPCM; 2220 /// 17--IMA-ADPCM 2221 /// @param channels \b : 0-- mono; 2222 /// 1-- stereo 2223 /// @param sampleRate \b : 8, 11.025, 16, 22.05, 44.1 and 48 (KHz) 2224 /// @param bitsPerSample \b : 8--8 bits; 2225 /// 16--16 bits 2226 /// @param blockSize \b : block size 2227 /// @param samplePerBlock \b : samples per block 2228 /// @return MS_U8 \b : TRUE--parameters are correct; 2229 /// FALSE--parameters are incorrect 2230 //////////////////////////////////////////////////////////////////////////////// 2231 MS_U8 MApi_AUDIO_XPCM_Param(XPCM_TYPE audioType, MS_U8 channels, MS_U16 sampleRate, 2232 MS_U8 bitsPerSample, MS_U16 blockSize, MS_U16 samplePerBlock); 2233 2234 //////////////////////////////////////////////////////////////////////////////// 2235 /// @ingroup Audio_ToBeRemove 2236 /// @brief \b Function \b Name: MApi_AUDIO_XPCM2_Param() 2237 /// @brief \b Function \b Description: This routine configures necessary parameters when playing XPCM data 2238 /// @param audioType \b : 1--lpcm; 2239 /// 2--MS-ADPCM; 2240 /// 17--IMA-ADPCM 2241 /// @param channels \b : 0-- mono; 2242 /// 1-- stereo 2243 /// @param sampleRate \b : 8, 11.025, 16, 22.05, 44.1 and 48 (KHz) 2244 /// @param bitsPerSample \b : 8--8 bits; 2245 /// 16--16 bits 2246 /// @param blockSize \b : block size 2247 /// @param samplePerBlock \b : samples per block 2248 /// @return MS_U8 \b : TRUE--parameters are correct; 2249 /// FALSE--parameters are incorrect 2250 //////////////////////////////////////////////////////////////////////////////// 2251 void MApi_AUDIO_XPCM2_Param(XPCM_TYPE audioType, MS_U8 channels, MS_U16 sampleRate, 2252 MS_U8 bitsPerSample, MS_U16 blockSize, MS_U16 samplePerBlock); 2253 2254 //////////////////////////////////////////////////////////////////////////////// 2255 /// @ingroup Audio_ToBeRemove 2256 /// @brief \b Function \b Name: MApi_AUDIO_XPCM2_CheckIntStatus() 2257 /// @brief \b Function \b Description: This routine is used to Read DSP internal sram value for int status by IDMA 2258 /// @param <OUT> \b NONE : 2259 /// @param <RET> \b MS_U16 : sram value for interrupt status 2260 /// @param <GLOBAL> \b NONE : 2261 //////////////////////////////////////////////////////////////////////////////// 2262 // MS_U16 MApi_AUDIO_XPCM2_CheckIntStatus(void); 2263 2264 //////////////////////////////////////////////////////////////////////////////// 2265 /// @ingroup Audio_ToBeRemove 2266 /// @brief \b Function \b Name: MApi_AUDIO_RA8_Param() 2267 /// @brief \b Function \b Description: This routine configures necessary parameters when playing RA8 LBR data 2268 /// @param mNumCodecs \b : 1--stereo or mono 2269 /// 2~5-- multi channels 2270 /// @param mSamples \b : output samples--256, 512, 1024 2271 /// @param mSampleRate \b : 8, 11.025, 16, 22.05, 44.1 (KHz) 2272 /// @param Channels \b : 1-- mono 2273 /// 2-- stereo 2274 /// @param cplStart \b : 0 ~ 51 2275 /// @param Regions \b : 0 ~ 31 2276 /// @param cplQbits \b : 0, 2, 3, 4, 5, 6 2277 /// @param FrameSize \b : bitstream size of every NumCodes (bytes) 2278 /// Range--0 ~ 65535 2279 /// @return MS_U8 \b : TRUE--parameters are correct; 2280 /// FALSE--parameters are incorrect 2281 //////////////////////////////////////////////////////////////////////////////// 2282 MS_U8 MApi_AUDIO_RA8_Param(MS_U16 mNumCodecs, MS_U16 mSamples, MS_U16 mSampleRate, 2283 MS_U16* Channels, MS_U16* Regions, MS_U16* cplStart, MS_U16* cplQbits, 2284 MS_U16* FrameSize); 2285 2286 // En_DVB_melodyPlayStatus MApi_AUDIO_PlayMelody(En_DVB_melodyPlayCmdType eMelodyCmd, MS_VIRT* u32FileAddr,MS_U32 u32FileSize, MS_U32 u32DspReqAddr); 2287 //////////////////////////////////////////////////////////////////////////////// 2288 /// @ingroup Audio_ToBeRemove 2289 /// @brief \b Function \b Name: MApi_AUDIO_Init() 2290 /// @brief \b Function \b Description: MM Music mode Initial Audio decoder 2291 /// @param <IN> \b enDecSystem: Audio decoder type 2292 /// @param <OUT> \b NONE : 2293 /// @param <GLOBAL> \b NONE : 2294 //////////////////////////////////////////////////////////////////////////////// 2295 void MApi_AUDIO_Init(En_DVB_decSystemType enDecSystem); 2296 2297 //////////////////////////////////////////////////////////////////////////////// 2298 /// @ingroup Audio_ToBeRemove 2299 /// @brief \b Function \b Name: MApi_AUDIO_StartDecode() 2300 /// @brief \b Function \b Description: start play MM file 2301 /// @param <IN> \b NONE : 2302 /// @param <OUT> \b NONE : 2303 /// @param <GLOBAL> \b NONE : 2304 //////////////////////////////////////////////////////////////////////////////// 2305 void MApi_AUDIO_StartDecode(void); 2306 2307 //////////////////////////////////////////////////////////////////////////////// 2308 /// @ingroup Audio_ToBeRemove 2309 /// @brief \b Function \b Name: MApi_AUDIO_StartBrowse() 2310 /// @brief \b Function \b Description: start browse file 2311 /// @param <IN> \b NONE : 2312 /// @param <OUT> \b NONE : 2313 /// @param <GLOBAL> \b NONE : 2314 //////////////////////////////////////////////////////////////////////////////// 2315 void MApi_AUDIO_StartBrowse(void); 2316 2317 //////////////////////////////////////////////////////////////////////////////// 2318 /// @ingroup Audio_ToBeRemove 2319 /// @brief \b Function \b Name: MApi_AUDIO_StopDecode() 2320 /// @brief \b Function \b Description: Stop decoder 2321 /// @param <IN> \b NONE : 2322 /// @param <OUT> \b NONE : 2323 /// @param <GLOBAL> \b NONE : 2324 //////////////////////////////////////////////////////////////////////////////// 2325 void MApi_AUDIO_StopDecode(void); 2326 2327 //////////////////////////////////////////////////////////////////////////////// 2328 /// @ingroup Audio_ToBeRemove 2329 /// @brief \b Function \b Name: MApi_AUDIO_PauseDecode() 2330 /// @brief \b Function \b Description: pause decoder 2331 /// @param <IN> \b NONE : 2332 /// @param <OUT> \b NONE : 2333 /// @param <GLOBAL> \b NONE : 2334 //////////////////////////////////////////////////////////////////////////////// 2335 void MApi_AUDIO_PauseDecode(void); 2336 2337 //////////////////////////////////////////////////////////////////////////////// 2338 /// @ingroup Audio_ToBeRemove 2339 /// @brief \b Function \b Name: MApi_AUDIO_CheckPlayDone() 2340 /// @brief \b Function \b Description: Check file play done. If file play done, will return TRUE 2341 /// @param <IN> \b NONE : 2342 /// @param <OUT> \b MS_U8 : TRUE or FALSE 2343 /// @param <GLOBAL> \b NONE : 2344 //////////////////////////////////////////////////////////////////////////////// 2345 MS_U8 MApi_AUDIO_CheckPlayDone(void); 2346 2347 //////////////////////////////////////////////////////////////////////////////// 2348 /// @ingroup Audio_ToBeRemove 2349 /// @brief \b Function \b Name: MApi_AUDIO_GetResidualBufferSize() 2350 /// @brief \b Function \b Description: Get ES buffer level. 2351 /// @param <IN> \b NONE : 2352 /// @param <OUT> \b MS_U16 : ES buffer level 2353 /// @param <GLOBAL> \b NONE : 2354 //////////////////////////////////////////////////////////////////////////////// 2355 MS_U16 MApi_AUDIO_GetResidualBufferSize(void); 2356 2357 //////////////////////////////////////////////////////////////////////////////// 2358 /// @ingroup Audio_ToBeRemove 2359 /// @brief \b Function \b Name: MApi_AUDIO_GetPCMBufferSize() 2360 /// @brief \b Function \b Description: Get MP3 PCM buffer level. 2361 /// @param <IN> \b u16BitRate : Bit Rate 2362 /// @param <OUT> \b MS_U16 : MP3 PCM buffer level 2363 /// @param <GLOBAL> \b NONE : 2364 //////////////////////////////////////////////////////////////////////////////// 2365 MS_U16 MApi_AUDIO_GetPCMBufferSize(MS_U16 u16BitRate); 2366 2367 //////////////////////////////////////////////////////////////////////////////// 2368 /// @ingroup Audio_ToBeRemove 2369 /// @brief \b Function \b Name: MApi_AUDIO_GetPCMBufferSize2() 2370 /// @brief \b Function \b Description: Get PCM buffer level. 2371 /// @param <IN> \b u16BitRate : Bit Rate; 2372 /// @param <IN> \b u16SampleRate : Sample Rate 2373 /// @param <OUT> \b MS_U16 : PCM buffer level 2374 /// @param <GLOBAL> \b NONE : 2375 //////////////////////////////////////////////////////////////////////////////// 2376 MS_U16 MApi_AUDIO_GetPCMBufferSize2(MS_U16 u16BitRate,MS_U16 u16SampleRate); 2377 2378 //////////////////////////////////////////////////////////////////////////////// 2379 /// @ingroup Audio_ToBeRemove 2380 /// @brief \b Function \b Name: MApi_AUDIO_GetCurrentFrameNumber() 2381 /// @brief \b Function \b Description: Get MP3 Current Frame Number 2382 /// @param <IN> \b NONE : 2383 /// @param <OUT> \b MS_U32 : Current Frame Number 2384 /// @param <GLOBAL> \b NONE : 2385 //////////////////////////////////////////////////////////////////////////////// 2386 MS_U32 MApi_AUDIO_GetCurrentFrameNumber(void); 2387 2388 //////////////////////////////////////////////////////////////////////////////// 2389 /// @ingroup Audio_ToBeMerged 2390 /// @brief \b Function \b Name: MApi_AUDIO_GetSampleRate() 2391 /// @brief \b Function \b Description: Get Sample Rate 2392 /// @param <IN> \b NONE : 2393 /// @param <OUT> \b MS_U16 : Sample Rate 2394 /// @param <GLOBAL> \b NONE : 2395 //////////////////////////////////////////////////////////////////////////////// 2396 MS_U16 MApi_AUDIO_GetSampleRate(void); 2397 2398 //////////////////////////////////////////////////////////////////////////////// 2399 /// @ingroup Audio_ToBeMerged 2400 /// @brief \b Function \b Name: MApi_AUDIO_GetBitRate() 2401 /// @brief \b Function \b Description: Get Bit Rate 2402 /// @param <IN> \b NONE : 2403 /// @param <OUT> \b MS_U32 : Bit Rate 2404 /// @param <GLOBAL> \b NONE : 2405 //////////////////////////////////////////////////////////////////////////////// 2406 MS_U32 MApi_AUDIO_GetBitRate(void); 2407 2408 //////////////////////////////////////////////////////////////////////////////// 2409 /// @ingroup Audio_ToBeRemove 2410 /// @brief \b Function \b Name: MApi_AUDIO_GetLayer() 2411 /// @brief \b Function \b Description: Get MP3 Layer 2412 /// @param <IN> \b NONE : 2413 /// @param <OUT> \b Audio_MP3_LAYER : MPEG Layer 2414 /// @param <GLOBAL> \b NONE : 2415 //////////////////////////////////////////////////////////////////////////////// 2416 Audio_MP3_LAYER MApi_AUDIO_GetLayer(void); 2417 //////////////////////////////////////////////////////////////////////////////// 2418 /// @ingroup Audio_Decoder 2419 /// @brief \b Function \b Name: MApi_AUDIO_CheckInputRequest() 2420 /// @brief \b Function \b Description: If MCU receive DSP interrupt, this function will return TRUE and report requested ES data buffer address and size 2421 /// @param <IN> \b pU32WrtAddr : 2422 /// @param <IN> \b pU32WrtBytes : 2423 /// @param <OUT> \b MS_U8 : TRUE or FALSE 2424 /// @param <GLOBAL> \b NONE : 2425 //////////////////////////////////////////////////////////////////////////////// 2426 MS_U8 MApi_AUDIO_CheckInputRequest(MS_PHY *pPHYWrtAddr, MS_U32 *pU32WrtBytes); 2427 2428 //////////////////////////////////////////////////////////////////////////////// 2429 /// @ingroup Audio_Decoder 2430 /// @brief \b Function \b Name: MApi_AUDIO_SetInput() 2431 /// @brief \b Function \b Description: This function will inform DSP that MCU already write data to ES buffer by interrupt. 2432 /// @param <IN> \b NONE : 2433 /// @param <OUT> \b NONE : 2434 /// @param <GLOBAL> \b NONE : 2435 //////////////////////////////////////////////////////////////////////////////// 2436 void MApi_AUDIO_SetInput(void); 2437 2438 //////////////////////////////////////////////////////////////////////////////// 2439 /// @ingroup Audio_ToBeRemove 2440 /// @brief \b Function \b Name: MApi_AUDIO_SetSampleRateIndex() 2441 /// @brief \b Function \b Description: Set AAC sample rate index. 2442 /// @param <IN> \b u16Index : 2443 /// @param <OUT> \b NONE : 2444 /// @param <GLOBAL> \b NONE : 2445 //////////////////////////////////////////////////////////////////////////////// 2446 void MApi_AUDIO_SetSampleRateIndex(MS_U16 u16Index); 2447 2448 //////////////////////////////////////////////////////////////////////////////// 2449 /// @ingroup Audio_ToBeRemove 2450 /// @brief \b Function \b Name: MApi_AUDIO_SetXPCMParam() 2451 /// @brief \b Function \b Description: Set XPCM paramaters 2452 /// @param <IN> \b audioType : 2453 /// @param <IN> \b channels : 2454 /// @param <IN> \b sampleRate : 2455 /// @param <IN> \b bitsPerSample : 2456 /// @param <IN> \b samplePerBlock : 2457 /// @param <OUT> \b NONE : 2458 /// @param <GLOBAL> \b NONE : 2459 //////////////////////////////////////////////////////////////////////////////// 2460 void MApi_AUDIO_SetXPCMParam(XPCM_TYPE audioType, MS_U8 channels, MS_U16 sampleRate, MS_U8 bitsPerSample, MS_U16 blockSize, MS_U16 samplePerBlock); 2461 2462 //////////////////////////////////////////////////////////////////////////////// 2463 /// @ingroup Audio_ToBeRemove 2464 /// @brief \b Function \b Name: MApi_AUDIO_FileEndNotification() 2465 /// @brief \b Function \b Description: This function will inform DSP that file end 2466 /// @param <IN> \b NONE : 2467 /// @param <OUT> \b NONE : 2468 /// @param <GLOBAL> \b NONE : 2469 //////////////////////////////////////////////////////////////////////////////// 2470 void MApi_AUDIO_FileEndNotification(void); 2471 2472 //////////////////////////////////////////////////////////////////////////////// 2473 /// @ingroup Audio_ToBeRemove 2474 /// @brief \b Function \b Name: MApi_AUDIO_FileEndDataHandle() 2475 /// @brief \b Function \b Description: Info DSP that the last ES data left size. 2476 /// @param <IN> \b u32DataLeft : 2477 /// @param <OUT> \b NONE : 2478 /// @param <GLOBAL> \b NONE : 2479 //////////////////////////////////////////////////////////////////////////////// 2480 void MApi_AUDIO_FileEndDataHandle(MS_U32 u32DataLeft); 2481 2482 //////////////////////////////////////////////////////////////////////////////// 2483 /// @ingroup Audio_ToBeRemove 2484 /// @brief \b Function \b Name: MApi_AUDIO_GetPlayTick() 2485 /// @brief \b Function \b Description: Get Play Time stamp 2486 /// @param <IN> \b NONE : 2487 /// @param <OUT> \b NONE : 2488 /// @param <GLOBAL> \b NONE : 2489 //////////////////////////////////////////////////////////////////////////////// 2490 MS_U32 MApi_AUDIO_GetPlayTick(void); 2491 2492 //////////////////////////////////////////////////////////////////////////////// 2493 /// @ingroup Audio_ToBeMerged 2494 /// @brief \b Function \b Name: MApi_AUDIO_GetEsMEMCnt() 2495 /// @brief \b Function \b Description: Get ES Bufffer size 2496 /// @param <IN> \b NONE : 2497 /// @param <OUT> \b MS_U16 : ES Bufffer size 2498 /// @param <GLOBAL> \b NONE : 2499 //////////////////////////////////////////////////////////////////////////////// 2500 MS_U16 MApi_AUDIO_GetEsMEMCnt(void); 2501 2502 //////////////////////////////////////////////////////////////////////////////// 2503 /// @ingroup Audio_ToBeMerged 2504 /// @brief \b Function \b Name: MApi_AUDIO_SetASFParm() 2505 /// @brief \b Function \b Description: Set WMA ASF Paramaters 2506 /// @param <IN> \b parm_type : 2507 /// @param <IN> \b value : 2508 /// @param <OUT> \b NONE : 2509 /// @param <GLOBAL> \b NONE : 2510 //////////////////////////////////////////////////////////////////////////////// 2511 void MApi_AUDIO_SetASFParm(WMA_ASF_PARMTYPE parm_type, MS_U32 value); 2512 2513 //////////////////////////////////////////////////////////////////////////////// 2514 /// @ingroup Audio_ToBeRemove 2515 /// @brief \b Function \b Name: MApi_AUDIO_MM_SetInput() 2516 /// @brief \b Function \b Description: MCU send interrupt to decoder1/2 in MM mode 2517 /// @param <IN> \b AUDDecoderNo : DVB_Audio_Decoder1 / DVB_Audio_Decoder2 2518 /// @param <IN> \b u8IntTag : Interrupt tag, increase by every time 2519 /// @param <OUT> \b NONE : 2520 /// @param <GLOBAL> \b NONE : 2521 //////////////////////////////////////////////////////////////////////////////// 2522 void MApi_AUDIO_MM_SetInput (En_DVB_AudioDecoder AUDDecoderNo, MS_U8 u8IntTag); 2523 2524 //////////////////////////////////////////////////////////////////////////////// 2525 /// @ingroup Audio_ToBeRemove 2526 /// @brief \b Function \b Name: MApi_AUDIO_MM_CheckPlayDone() 2527 /// @brief \b Function \b Description: MCU check audio play end in MM mode 2528 /// @param <IN> \b AUDDecoderNo : DVB_Audio_Decoder1 / DVB_Audio_Decoder2 2529 /// @param <OUT> \b MS_U16 : Value of residual PCM level for file end stop 2530 /// @param <GLOBAL> \b NONE : 2531 //////////////////////////////////////////////////////////////////////////////// 2532 MS_U32 MApi_AUDIO_MM_CheckPlayDone (En_DVB_AudioDecoder AUDDecoderNo); 2533 //////////////////////////////////////////////////////////////////////////////// 2534 /// @ingroup Audio_ToBeRemove 2535 /// @brief \b Function \b Name: MApi_AUDIO_MM_CheckInputRequest() 2536 /// @brief \b Function \b Description : Decoder request input addr & size in MM mode 2537 /// @param <IN> \b AUDDecoderNo : DVB_Audio_Decoder1 / DVB_Audio_Decoder2 2538 /// @param <IN> \b pU32WrtAddr : Request input address in ES1 buffer 2539 /// @param <IN> \b pU32WrtBytes : Request input size 2540 /// @param <OUT> \b MS_U8 : return TRUE if ok, else return FALSE 2541 /// @param <GLOBAL> \b NONE : 2542 //////////////////////////////////////////////////////////////////////////////// 2543 MS_U8 MApi_AUDIO_MM_CheckInputRequest(En_DVB_AudioDecoder AUDDecoderNo, MS_PHY *pPHYWrtAddr, MS_U32 *pU32WrtBytes); 2544 //////////////////////////////////////////////////////////////////////////////// 2545 /// @ingroup Audio_ToBeRemove 2546 /// @brief \b Function \b Name: MApi_AUDIO_DmaReader_Init() 2547 /// @brief \b Function \b Description: 2548 /// @param <IN> \b eType : sampleRate 2549 /// @param <OUT> \b NONE : 2550 /// @param <RET> \b NONE : 2551 //////////////////////////////////////////////////////////////////////////////// 2552 void MApi_AUDIO_DmaReader_Init(SAMPLE_RATE sampleRate); 2553 2554 //////////////////////////////////////////////////////////////////////////////// 2555 /// @ingroup Audio_ToBeRemove 2556 /// @brief \b Function \b Name: MApi_AUDIO_DmaReader_AllInput_Init() 2557 /// @brief \b Function \b Description: Used DMA reader in all audio source application 2558 /// \b (ex: Key sound) (CHIP_T8/T12) (48KHz only) 2559 /// @param <IN> \b eType : sampleRate 2560 /// @param <OUT> \b NONE : 2561 /// @param <RET> \b NONE : 2562 //////////////////////////////////////////////////////////////////////////////// 2563 void MApi_AUDIO_DmaReader_AllInput_Init(void); 2564 2565 //////////////////////////////////////////////////////////////////////////////// 2566 /// @ingroup Audio_ToBeRemove 2567 /// @brief \b Function \b Name: MApi_AUDIO_DmaReader_WritePCM() 2568 /// @brief \b Function \b Description: This routine is used to write PCM data into DMA reader Buffer 2569 /// @param <IN> \b eType : buffer size (must be multiple of 8 Byte) 2570 /// @param <OUT> \b MS_BOOL : TRUE or FALSE 2571 /// @param <RET> \b NONE : 2572 //////////////////////////////////////////////////////////////////////////////// 2573 MS_BOOL MApi_AUDIO_DmaReader_WritePCM(void* buffer, MS_U32 bytes); 2574 2575 //////////////////////////////////////////////////////////////////////////////// 2576 /// @ingroup Audio_ToBeRemove 2577 /// @brief \b Function \b Name: MApi_AUDIO_DmaWriter_Init() 2578 /// @brief \b Function \b Description: 2579 /// @param <IN> \b NONE : 2580 /// @param <OUT> \b NONE : 2581 /// @param <RET> \b NONE : 2582 //////////////////////////////////////////////////////////////////////////////// 2583 // void MApi_AUDIO_DmaWriter_Init(void); 2584 2585 //////////////////////////////////////////////////////////////////////////////// 2586 /// @ingroup Audio_ToBeRemove 2587 /// @brief \b Function \b Name: MApi_AUDIO_USBPCM_Enable() @@Need_Modify 2588 /// @brief \b Function \b Description: Enable/ Disable the path of USB PCM 2589 /// @param <IN> \b bEnable : on: TRUE, off: FALSE 2590 /// @param <OUT> \b NONE : 2591 /// @param <RET> \b NONE : 2592 /// @param <GLOBAL> \b NONE : 2593 //////////////////////////////////////////////////////////////////////////////// 2594 void MApi_AUDIO_USBPCM_Enable(MS_BOOL bEnable); 2595 2596 //////////////////////////////////////////////////////////////////////////////// 2597 /// @ingroup Audio_ToBeRemove 2598 /// @brief \b Function \b Name: MApi_AUDIO_USBPCM_SetFlag() @@Need_Modify 2599 /// @brief \b Function \b Description: clear interrupt flag for USBPCM function 2600 /// \b (Encoder path) 2601 /// @param <IN> \b bEnable : set false to clean interrupt flag 2602 /// @param <OUT> \b NONE : 2603 /// @param <RET> \b NONE : 2604 /// @param <GLOBAL> \b NONE : 2605 //////////////////////////////////////////////////////////////////////////////// 2606 void MApi_AUDIO_USBPCM_SetFlag(MS_BOOL bEnable); 2607 2608 //////////////////////////////////////////////////////////////////////////////// 2609 /// @ingroup Audio_ToBeRemove 2610 /// @brief \b Function \b Name: MApi_AUDIO_USBPCM_GetFlag() @@Need_Modify 2611 /// @brief \b Function \b Description: Get interrupt flag for USBPCM function 2612 /// \b (Encoder path) 2613 /// @param <IN> \b NONE : 2614 /// @param <OUT> \b NONE : 2615 /// @param <RET> \b BOOL : interrupt flag 2616 /// @param <GLOBAL> \b NONE : 2617 //////////////////////////////////////////////////////////////////////////////// 2618 MS_BOOL MApi_AUDIO_USBPCM_GetFlag(void); 2619 2620 //////////////////////////////////////////////////////////////////////////////// 2621 /// @ingroup Audio_ToBeRemove 2622 /// @brief \b Function \b Name: MApi_AUDIO_USBPCM_GetMemInfo() @@Need_Modify 2623 /// @brief \b Function \b Description: Get memory address and size for USBPCM function 2624 /// \b (Encoder path) 2625 /// @param <IN> \b NONE : 2626 /// @param <OUT> \b MS_U32 : address, size 2627 /// @param <RET> \b NONE : 2628 /// @param <GLOBAL> \b NONE : 2629 //////////////////////////////////////////////////////////////////////////////// 2630 void MApi_AUDIO_USBPCM_GetMemInfo(AUDIO_UPLOAD_INFO *uploadInfo); 2631 2632 //////////////////////////////////////////////////////////////////////////////// 2633 /// @ingroup Audio_ToBeRemove 2634 /// @brief \b Function \b Name: MApi_AUDIO_PCMCapture_Init() 2635 /// @brief \b Function \b Description: Select source for pcm capture 2636 /// @param <IN> \b AUDIO_DEVICE_TYPE : select 1st or 2nd data capture 2637 /// @param <IN> \b AUDIO_CAPTURE_SOURCE_TYPE : Data Source 2638 /// @param <OUT> \b MS_BOOL : return TRUE if success, else return FALSE 2639 /// @param <RET> \b NONE : 2640 /// @param <GLOBAL> \b NONE : 2641 //////////////////////////////////////////////////////////////////////////////// 2642 MS_BOOL MApi_AUDIO_PCMCapture_Init(const AUDIO_DEVICE_TYPE eID, const AUDIO_CAPTURE_SOURCE_TYPE eSource); 2643 2644 //////////////////////////////////////////////////////////////////////////////// 2645 /// @ingroup Audio_ToBeRemove 2646 /// @brief \b Function \b Name: MApi_AUDIO_PCMCapture_Start() 2647 /// @brief \b Function \b Description: captrue pcm data to DDR 2648 /// @param <IN> \b AUDIO_DEVICE_TYPE : select 1st or 2nd data capture 2649 /// @param <OUT> \b MS_BOOL : return TRUE if success, else return FALSE 2650 /// @param <RET> \b NONE : 2651 /// @param <GLOBAL> \b NONE : 2652 //////////////////////////////////////////////////////////////////////////////// 2653 MS_BOOL MApi_AUDIO_PCMCapture_Start(const AUDIO_DEVICE_TYPE eID); 2654 2655 //////////////////////////////////////////////////////////////////////////////// 2656 /// @ingroup Audio_ToBeRemove 2657 /// @brief \b Function \b Name: MApi_AUDIO_PCMCapture_Stop() 2658 /// @brief \b Function \b Description: stop captrue pcm data from DDR 2659 /// @param <IN> \b AUDIO_DEVICE_TYPE : select 1st or 2nd data capture 2660 /// @param <OUT> \b MS_BOOL : return TRUE if success, else return FALSE 2661 /// @param <RET> \b NONE : 2662 /// @param <GLOBAL> \b NONE : 2663 //////////////////////////////////////////////////////////////////////////////// 2664 MS_BOOL MApi_AUDIO_PCMCapture_Stop(const AUDIO_DEVICE_TYPE eID); 2665 2666 //////////////////////////////////////////////////////////////////////////////// 2667 /// @ingroup Audio_ToBeRemove 2668 /// @brief \b Function \b Name: MApi_AUDIO_PCMCapture_Read() 2669 /// @brief \b Function \b Description: captrue pcm data from DDR to device 2670 /// @param <IN> \b AUDIO_DEVICE_TYPE : select 1st or 2nd data capture 2671 /// @param <IN> \b void* : destination buffer pointer 2672 /// @param <IN> \b MS_U32 : buffer size need transfered in byte 2673 /// @param <OUT> \b MS_BOOL : return TRUE if success, else return FALSE 2674 /// @param <RET> \b NONE : 2675 /// @param <GLOBAL> \b NONE : 2676 //////////////////////////////////////////////////////////////////////////////// 2677 MS_BOOL MApi_AUDIO_PCMCapture_Read(const AUDIO_DEVICE_TYPE eID, void* buffer, const MS_U32 bytes); 2678 2679 //////////////////////////////////////////////////////////////////////////////// 2680 /// @ingroup Audio_ToBeRemove 2681 /// @brief \b Function \b Name: MApi_AUDIO_VoIP_Config() 2682 /// @brief \b Function \b Description: This routine is used for VoIP applications 2683 /// @param <IN> \b AUDIO_VoIP_CONFIG_TYPE : configType 2684 /// @param <IN> \b MS_U32 : param1 2685 /// @param <IN> \b MS_U32 : param2 2686 /// @param <OUT> \b MS_BOOL : return TRUE if success, else return FALSE 2687 /// @param <RET> \b NONE : 2688 /// @param <GLOBAL> \b NONE : 2689 //////////////////////////////////////////////////////////////////////////////// 2690 MS_BOOL MApi_AUDIO_VoIP_Config(AUDIO_VoIP_CONFIG_TYPE configType, MS_U32 param1, MS_U32 param2); 2691 2692 //////////////////////////////////////////////////////////////////////////////// 2693 /// @ingroup Audio_ToBeRemove 2694 /// @brief \b Function \b Name: MApi_AUDIO_ALSA_Check() 2695 /// @brief \b Function \b Description: Check if ALSA Interface is supported 2696 /// @param <IN> \b bEnable : on: TRUE, off: FALSE 2697 /// @param <OUT> \b MS_BOOL : return TRUE if it's supported, else return FALSE 2698 /// @param <RET> \b NONE : 2699 /// @param <GLOBAL> \b NONE : 2700 //////////////////////////////////////////////////////////////////////////////// 2701 // MS_BOOL MApi_AUDIO_ALSA_Check(void); 2702 2703 //////////////////////////////////////////////////////////////////////////////// 2704 /// @ingroup Audio_ToBeRemove 2705 /// @brief \b Function \b Name: MApi_AUDIO_ALSA_Enable() 2706 /// @brief \b Function \b Description: Enable/ Disable the path of ALSA 2707 /// @param <IN> \b bEnable : on: TRUE, off: FALSE 2708 /// @param <OUT> \b MS_BOOL : return TRUE if ok, else return FALSE 2709 /// @param <RET> \b NONE : 2710 /// @param <GLOBAL> \b NONE : 2711 //////////////////////////////////////////////////////////////////////////////// 2712 // MS_BOOL MApi_AUDIO_ALSA_Enable(MS_BOOL bEnable); 2713 2714 //////////////////////////////////////////////////////////////////////////////// 2715 /// @ingroup Audio_ToBeRemove 2716 /// @brief \b Function \b Name: MApi_AUDIO_UNI_CheckDecodeDone() 2717 /// @brief \b Function \b Description : Decoder report pcm out addr & size in Uniplayer mode 2718 /// @param <IN> \b pU32WrtAddr : Request input address in ES1 buffer 2719 /// @param <IN> \b pU32WrtBytes : Request input size 2720 /// @param <OUT> \b MS_U8 : return TRUE if ok, else return FALSE 2721 /// @param <GLOBAL> \b NONE : 2722 //////////////////////////////////////////////////////////////////////////////// 2723 // MS_BOOL MApi_AUDIO_UNI_CheckDecodeDone(MS_PHY *pPHYWrtAddr, MS_U32 *pU32WrtBytes); 2724 2725 //////////////////////////////////////////////////////////////////////////////// 2726 /// @ingroup Audio_ToBeRemove 2727 /// @brief \b Function \b Name: MApi_AUDIO_UNI_SetOutput() 2728 /// @brief \b Function \b Description: MCU send interrupt to decoder1 in Uniplayer mode 2729 /// @param <IN> \b PCMOutCnt : Get output PCM count by MCU 2730 /// @param <OUT> \b NONE : 2731 /// @param <GLOBAL> \b NONE : 2732 //////////////////////////////////////////////////////////////////////////////// 2733 // void MApi_AUDIO_UNI_SetOutput (MS_U32 PCMOutCnt); 2734 2735 //////////////////////////////////////////////////////////////////////////////// 2736 /// @ingroup Audio_ToBeRemove 2737 /// @brief \b Function \b Name: MApi_AUDIO_UNI_Set_PCMInputWriteAddr() 2738 /// @brief \b Function \b Description: MCU send DEC1-PCM3 wptr to decoder1 in Uniplayer mode 2739 /// @param <IN> \b PCMIn_Wptr : PCM3 write pointer to DSP 2740 /// @param <OUT> \b NONE : 2741 /// @param <GLOBAL> \b NONE : 2742 //////////////////////////////////////////////////////////////////////////////// 2743 // void MApi_AUDIO_UNI_Set_PCMInputWriteAddr (MS_U32 PCMIn_Wptr); 2744 2745 //////////////////////////////////////////////////////////////////////////////// 2746 /// @ingroup Audio_ToBeRemove 2747 /// @brief \b Function \b Name: MApi_AUDIO_UNI_Get_OutPCMLevel() 2748 /// @brief \b Function \b Description: Decoder1 report DEC1-PCM3 buffer level in Uniplayer mode 2749 /// @param <OUT> \b MS_U32 : DEC1-PCM3 buffer level (byte unit) 2750 /// @param <GLOBAL> \b NONE : 2751 //////////////////////////////////////////////////////////////////////////////// 2752 // MS_U32 MApi_AUDIO_UNI_Get_OutPCMLevel (void); 2753 2754 //////////////////////////////////////////////////////////////////////////////// 2755 /// @ingroup Audio_ToBeRemove 2756 /// @brief \b Function \b Name: MApi_AUDIO_RingTask() 2757 /// @brief \b Function \b Description : 2758 /// @param <IN> \b auRingTask : 2759 /// @param <GLOBAL> \b NONE : 2760 //////////////////////////////////////////////////////////////////////////////// 2761 // void MApi_AUDIO_RingTask(audioRingTask* auRingTask) ; 2762 2763 //////////////////////////////////////////////////////////////////////////////// 2764 /// @ingroup Audio_ToBeRemove 2765 /// @brief \b Function \b Name: MApi_AUDIO_Ring_DataTransfer() 2766 /// @brief \b Function \b Description : 2767 /// @param <IN> \b auRingTask : 2768 /// @param <GLOBAL> \b NONE : 2769 //////////////////////////////////////////////////////////////////////////////// 2770 // void MApi_AUDIO_Ring_DataTransfer(audioRingTask* auRingTask, audioRingTask* auRingTask_1); 2771 2772 //////////////////////////////////////////////////////////////////////////////// 2773 /// @ingroup Audio_ToBeRemove 2774 /// @brief \b Function \b Name: MApi_AUDIO_MM2_initAesInfo() 2775 /// @brief \b Function \b Description : Initialize AES info 2776 /// @param <IN> \b dec_id : Decoder ID 2777 /// @param <OUT> \b MS_BOOL : return TRUE if ok, else return FALSE 2778 /// @param <GLOBAL> \b NONE : 2779 //////////////////////////////////////////////////////////////////////////////// 2780 MS_BOOL MApi_AUDIO_MM2_initAesInfo( AUDIO_DEC_ID dec_id ); 2781 2782 //////////////////////////////////////////////////////////////////////////////// 2783 /// @ingroup Audio_ToBeRemove 2784 /// @brief \b Function \b Name: MApi_AUDIO_MM2_checkAesInfo() 2785 /// @brief \b Function \b Description : Get AES info from audio decoder 2786 /// @param <IN> \b dec_id : Decoder ID 2787 /// @param <IN> \b aes_info : AES info structure pointer 2788 /// @param <OUT> \b MS_BOOL : return TRUE if ok, else return FALSE 2789 /// @param <GLOBAL> \b NONE : 2790 //////////////////////////////////////////////////////////////////////////////// 2791 MS_BOOL MApi_AUDIO_MM2_checkAesInfo( AUDIO_DEC_ID dec_id, AES_INFO *aes_info ); 2792 2793 //////////////////////////////////////////////////////////////////////////////// 2794 /// @ingroup Audio_ToBeRemove 2795 /// @brief \b Function \b Name: MApi_AUDIO_MM2_inputAesFinished() 2796 /// @brief \b Function \b Description : Inform DSP how much ES data is sent 2797 /// @param <IN> \b dec_id : Decoder ID 2798 /// @param <IN> \b es_size : Size of ES data 2799 /// @param <IN> \b ptsExist : Whether ES data contains PTS or not 2800 /// @param <IN> \b pts : PTS 2801 /// @param <OUT> \b MS_BOOL : return TRUE if ok, else return FALSE 2802 /// @param <GLOBAL> \b NONE : 2803 //////////////////////////////////////////////////////////////////////////////// 2804 MS_BOOL MApi_AUDIO_MM2_inputAesFinished( AUDIO_DEC_ID dec_id, MS_U32 es_size, MS_BOOL ptsExist, MS_U64 pts ); 2805 2806 2807 //====== STAOS PIP START 2012/02/01 ======== 2808 2809 //////////////////////////////////////////////////////////////////////////////// 2810 /// @ingroup Audio_Decoder 2811 /// @brief \b Function \b Name: MApi_AUDIO_SetAudioParam2() 2812 //////////////////////////////////////////////////////////////////////////////// 2813 MS_BOOL MApi_AUDIO_SetAudioParam2( AUDIO_DEC_ID DecId, Audio_ParamType paramType, MS_VIRT Param ); 2814 //////////////////////////////////////////////////////////////////////////////// 2815 /// @ingroup Audio_Decoder 2816 /// @brief \b Function \b Name: MApi_AUDIO_GetAudioInfo2() 2817 //////////////////////////////////////////////////////////////////////////////// 2818 MS_BOOL MApi_AUDIO_GetAudioInfo2( AUDIO_DEC_ID DecId, Audio_InfoType infoType, void * pInfo ); 2819 2820 //====== STAOS PIP END 2012/02/01 ======== 2821 //////////////////////////////////////////////////////////////////////////////// 2822 /// @ingroup Audio_ToBeRemove 2823 /// @brief \b Function \b Name: MApi_AUDIO_GetDDRInfo() 2824 /// @brief \b Function \b Description: Return Audio DDR info 2825 /// @param <IN> \b AUDIO_DEC_ID : select audio processor 2826 /// @param <IN> \b EN_AUDIO_DDRINFO : DDR info 2827 /// @param <OUT> \b MS_U32 : return DDR info 2828 /// @param <RET> \b NONE : 2829 /// @param <GLOBAL> \b NONE : 2830 //////////////////////////////////////////////////////////////////////////////// 2831 MS_PHY MApi_AUDIO_GetDDRInfo(AUDIO_DEC_ID DecId, EN_AUDIO_DDRINFO DDRInfo); 2832 2833 MS_U32 MApi_AUDIO_GetCaps(AUDIO_DEC_ID DecId, MS_U32 *pCaps); 2834 2835 MS_S32 MApi_AUDIO_PCM_Open(void *pData); 2836 MS_S32 MApi_AUDIO_PCM_Close(MS_S32 s32DeviceId); 2837 MS_S32 MApi_AUDIO_PCM_Start(MS_S32 s32DeviceId); 2838 MS_S32 MApi_AUDIO_PCM_Stop(MS_S32 s32DeviceId); 2839 MS_S32 MApi_AUDIO_PCM_Set(MS_S32 s32DeviceId, MS_U32 u32Cmd, const void *pData); 2840 MS_S32 MApi_AUDIO_PCM_Get(MS_S32 s32DeviceId, MS_U32 u32Cmd, void *pData); 2841 MS_U32 MApi_AUDIO_PCM_Read(MS_S32 s32DeviceId, void *pBuf, MS_U32 u32Size); 2842 MS_U32 MApi_AUDIO_PCM_Write(MS_S32 s32DeviceId, const void *pBuf, MS_U32 u32Size); 2843 MS_S32 MApi_AUDIO_PCM_Flush(MS_S32 s32DeviceId); 2844 2845 #ifdef __cplusplus 2846 } 2847 #endif 2848 2849 #endif // _API_AUDIO_H_ 2850 2851