⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 msapi_audio_dvb.h

📁 mstar 776 开发的车载dvd
💻 H
字号:

////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2006-2007 MStar Semiconductor, Inc.
// All rights reserved.
//
// Unless otherwise stipulated in writing, any and all information contained
// herein regardless in any format shall remain the sole proprietary of
// MStar Semiconductor Inc. and be kept in strict confidence
// (¨MStar Confidential Information〃) by the recipient.
// Any unauthorized act including without limitation unauthorized disclosure,
// copying, use, reproduction, sale, distribution, modification, disassembling,
// reverse engineering and compiling of the contents of MStar Confidential
// Information is unlawful and strictly prohibited. MStar hereby reserves the
// rights to any and all damages, losses, costs and expenses resulting therefrom.
//
// File Name: BD_CUS03_22LS4D.H
// Description: Audio Control!
// Revision History:
//
////////////////////////////////////////////////////////////////////////////////


#ifndef _MSAPI_AUDIO_H_
#define _MSAPI_AUDIO_H_

#include "DataType.h"
#include "board.h"
#include "drvAnalog_DataType.h"

//******************************************************************************
//                                  Defines
//******************************************************************************


//******************************************************************************
//      	                        Enums
//******************************************************************************
typedef enum
{
    MSAPI_AUD_INPUT_DECORDER,
    MSAPI_AUD_INPUT_ADC,
    MSAPI_AUD_INPUT_SPDIF,
    MSAPI_AUD_INPUT_I2S,
    MSAPI_AUD_INPUT_HDMI
} EN_AudioInputType;

typedef enum
{
    MSAPI_AUD_SIF_SYS_NOT_READY,   // 0
    MSAPI_AUD_SIF_SYS_M_BTSC,      // 1
    MSAPI_AUD_SIF_SYS_M_EIAJ,      // 2
    MSAPI_AUD_SIF_SYS_M_A2,        // 3

    MSAPI_AUD_SIF_SYS_BG_A2,       // 4
    MSAPI_AUD_SIF_SYS_DK1_A2,      // 5
    MSAPI_AUD_SIF_SYS_DK2_A2,      // 6
    MSAPI_AUD_SIF_SYS_DK3_A2,      // 7

    MSAPI_AUD_SIF_SYS_BG_NICAM,    // 8
    MSAPI_AUD_SIF_SYS_DK_NICAM,    // 9
    MSAPI_AUD_SIF_SYS_I_NICAM,     // 10
    MSAPI_AUD_SIF_SYS_L_NICAM,     // 11
    MSAPI_AUD_SIF_SYS_FM_RADIO,    // 12
    MSAPI_AUD_SIF_SYS_HI_DEV = 0x10
} En_SIF_systemType;

typedef enum
{
    MSAPI_AUD_SIF_SOUNDMODE_MONO,           // MONO
    MSAPI_AUD_SIF_SOUNDMODE_STEREO,         // STEREO
    MSAPI_AUD_SIF_SOUNDMODE_SAP,            // SAP
    MSAPI_AUD_SIF_SOUNDMODE_LANG_A,         // LANG_A
    MSAPI_AUD_SIF_SOUNDMODE_LANG_B,         // LANG_B
    MSAPI_AUD_SIF_SOUNDMODE_LANG_AB,        // LANG_AB
    MSAPI_AUD_SIF_SOUNDMODE_NICAM,          // FORCE_NICAM
    MSAPI_AUD_SIF_SOUNDMODE_AUTO =_BIT7     // auto switch to mono & mute
} En_SIF_soundModeType;

// NTSC (BTSC/A2/EIAJ)
// MSAPI_AUD_SIF_SOUNDMODE_MONO
// MSAPI_AUD_SIF_SOUNDMODE_STEREO
// MSAPI_AUD_SIF_SOUNDMODE_SAP

// PAL (A2/NiCam)
//MSAPI_AUD_SIF_SOUNDMODE_MONO
//MSAPI_AUD_SIF_SOUNDMODE_STEREO
//MSAPI_AUD_SIF_SOUNDMODE_LANG_A
//MSAPI_AUD_SIF_SOUNDMODE_LANG_B

typedef enum
{
    TV_COLOR_PAL,
    TV_COLOR_SECAM,
    TV_COLOR_AUTO,
    TV_COLOR_NUMS
} EnuTVColorSystem;

typedef enum
{
    MSAPI_AUD_DVB_MPEG,             // 0
    MSAPI_AUD_DVB_AC3,              //1
    MSAPI_AUD_DVB_MP3,             //2
    MSAPI_AUD_DVB_JPEG,
    MSAPI_AUD_DVB_TONE,             //3
    MSAPI_AUD_DVB_NONE              //4
} En_DVB_decSystemType;

typedef enum
{
	MSAPI_AUD_DVB_DECCMD_STOP,
    MSAPI_AUD_DVB_DECCMD_PLAY,
    MSAPI_AUD_DVB_DECCMD_RESYNC,
    MSAPI_AUD_DVB_DECCMD_PLAYFILE
} En_DVB_decCmdType;

typedef enum
{
	MSAPI_AUD_DVB_FreeRunMode_AVsync,
    MSAPI_AUD_DVB_FreeRunMode_FreeRun,
} En_DVB_FreeRunMode;

typedef enum
{
    MSAPI_AUD_DVB_SOUNDMODE_STEREO,
    MSAPI_AUD_DVB_SOUNDMODE_LEFT,
    MSAPI_AUD_DVB_SOUNDMODE_RIGHT,
    MSAPI_AUD_DVB_SOUNDMODE_NONE,
} En_DVB_soundModeType;

#if MCU_AEON_ENABLE
typedef enum
{
    MSAPI_AUD_AEON_CMD_51_DECCMD_PLAY,
    MSAPI_AUD_AEON_CMD_51_DECCMD_STOP,
    MSAPI_AUD_AEON_CMD_51_DECCMD_RESYNC,
    MSAPI_AUD_AEON_CMD_51_DECCMD_PLAYFILE,
    MSAPI_AUD_AEON_CMD_51_DECCMD_PLAYFILE_PARAM
} En_AEON251_MailBoxType;
#endif


//******************************************************************************
//                                  Function prototypes
//******************************************************************************

#ifdef _MSAPI_AUDIO_C_
#define INTERFACE
#else
#define INTERFACE extern
#endif

INTERFACE void msAPI_AUD_SetVolumeAttenuation(U8 u8Volume);

#define MSAPI_VOLUME_UNMUTE     0
#define MSAPI_VOLUME_MUTE       1

#define	MSAPI_AMP_UNMUTE	    0
#define	MSAPI_AMP_MUTE		    1
#if 0
INTERFACE void msAPI_AUD_SetMute(BOOLEAN dsp_mute_en, BOOLEAN amp_mute_en, BOOLEAN lineout_mute_en);
#endif
INTERFACE void msAPI_AUD_DspMute(BYTE path, BOOLEAN dsp_mute_en);
INTERFACE void msAPI_AUD_AmpMute(BOOLEAN amp_mute_en);
INTERFACE void msAPI_VAmp_Standby(BOOLEAN bFlag);
INTERFACE void msAPI_AUD_Lineout_SetMute(BOOLEAN lineout_mute_en);

////////////////////////////////////////////////////////////////////////////////
#define MSAPI_AUDMODE_STEREO    0
#define MSAPI_AUDMODE_LEFT      1
#define MSAPI_AUDMODE_RIGHT     2

#define MSAPI_AUDMODE_NUM       3

INTERFACE void msAPI_AUD_SetSoundMode(EN_SOUND_MTS_TYPE soundMode);

////////////////////////////////////////////////////////////////////////////////

#define  MSAPI_AUD_STOP         0
#define  MSAPI_AUD_PLAY         1
#define  MSAPI_AUD_RESYNC     2

#define  MSAPI_AUD_PASER_STOP         1
#define  MSAPI_AUD_PASER_PLAY         0


INTERFACE void msAPI_AUD_SetDecCommand(En_DVB_decCmdType enDecComamnd);

////////////////////////////////////////////////////////////////////////////////
#define  MSAPI_AUD_AVsync       0
#define  MSAPI_AUD_FreeRun      1

INTERFACE void msAPI_AUD_SetFreeRun(En_DVB_FreeRunMode enFreeRun);

////////////////////////////////////////////////////////////////////////////////
#define  MSAPI_AUD_MPEG         0
#define  MSAPI_AUD_AC3          1
#define  MSAPI_AUD_PCM          2

INTERFACE void msAPI_AUD_SetDecSystem(En_DVB_decSystemType enDecSystem);

////////////////////////////////////////////////////////////////////////////////

#define  MSAPI_AUD_TONE_0    0  // 0.25 KHz. continuous tone
#define  MSAPI_AUD_TONE_1    1  // 0.375 KHz. continuous tone
#define  MSAPI_AUD_TONE_2    2  // 0.5 KHz. continuous tone
#define  MSAPI_AUD_TONE_3    3  // 0.75 KHz. continuous tone
#define  MSAPI_AUD_TONE_4    4  // 1 KHz. continuous tone
#define  MSAPI_AUD_TONE_5    5  // 1.875 KHz. continuous tone
#define  MSAPI_AUD_TONE_6    6  // 2.5 KHz. continuous tone
#define  MSAPI_AUD_TONE_7    7  // 3.5 KHz. continuous tone

INTERFACE void msAPI_AUD_GentTone(U8 toneType);
INTERFACE void msAPI_AUD_SetP1_1(bit bEnable);
INTERFACE U8 msAPI_AUD_GetStdard(void);
INTERFACE void msAPI_VAmp_Mute(BOOLEAN bFlag);
INTERFACE void msAPI_AUD_SPDIF_Path_Sel(U8 spdif_output_sel);

////////////////////////////////////////////////////////////////////////////////
/*
bit 20-31:  Reserved
bit 0-19 :  MPEG header Without sync word.
19       :  ID bit (used with bits 30 -29 of status) for Fsample
17 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -