📄 drvausif.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.
//
////////////////////////////////////////////////////////////////////////////////
#ifndef _AUSIF_H_
#define _AUSIF_H_
#include "drvAuCommon.h"
// Multichannel TV Sound
// for sound status
enum
{
AU_STATUS_MONO = _BIT0, // Primary Mono
AU_STATUS_STEREO = _BIT1, // Primary Stereo
AU_STATUS_SAP = _BIT2, // Second Audio Program
AU_STATUS_NICAM = _BIT3 // Second Audio Program
};
// for sound type setting
enum
{
AU_TYPE_MONO,
AU_TYPE_STEREO,
AU_TYPE_SAP, // SAP
AU_TYPE_MONO_SAP, // MONO+SAP
AU_TYPE_LANG_A_MONO, // LANG_A
AU_TYPE_STEREO_A2, //
AU_TYPE_LANG_B, // LANG_B
AU_TYPE_LANG_A_B, // LANG_A + LANG_B or Mono + SAP
AU_TYPE_NICAM=_BIT3,
AU_TYPE_AUTO =_BIT7 // auto switch to mono & mute
};
/// AUDIO SIF SOUND MODE
enum
{
AU_MODE_MONO, ///< MONO
AU_MODE_STEREO, ///< STEREO
AU_MODE_SAP, ///< SAP
AU_MODE_LANG_A, ///< LANG_A
AU_MODE_LANG_B, ///< LANG_B
AU_MODE_LANG_AB, ///< LANG_AB
AU_MODE_NICAM, ///< FORCE_NICAM
AU_MODE_AUTO =_BIT7 ///< auto switch to mono & mute
};
// for carrier type
// 4.5 MHz
enum
{
AU_CARRIER1_IGNORE=0,
AU_CARRIER1_KOREA=1,
AU_CARRIER1_BTSC=2,
AU_CARRIER1_JAPAN=3
};
// 6.5 MHz
enum
{
AU_CARRIER2_L=0x10,
AU_CARRIER2_DK=0x20
};
enum
{
AU_SOUND_BG, // 5.5 MHz
AU_SOUND_DK, // 6.5 MHz
AU_SOUND_I, // 6.0 MHz
AU_SOUND_L, // 6.5 MHz
AU_SOUND_MAX,
};
enum
{
AU_INFO_CARRIER_1_AMP,
AU_INFO_CARRIER_1_VAR,
AU_INFO_CARRIER_2_AMP,
AU_INFO_CARRIER_2_VAR,
AU_INFO_CARRIER_STATE,
AU_INFO_ERROR_COUNT,
AU_INFO_BTSC_MAIN_AMP,
AU_INFO_BTSC_MAIN_VAR,
AU_INFO_EIAJ_MAIN_AMP,
AU_INFO_EIAJ_MAIN_VAR,
AU_INFO_NICAM_BIT_ERROR,
AU_INFO_AM_MAIN_AMP,
};
// for standard status
// [3:2]: 00:NTSC 01:A2 10:NICAM 11:OTHER
// BIT7: AUTO MODE
enum
{
AU_SYS_NOT_READY, // 0
AU_SYS_M_BTSC, // 1
AU_SYS_M_EIAJ, // 2
AU_SYS_M_A2, // 3
AU_SYS_BG_A2, // 4
AU_SYS_DK1_A2, // 5
AU_SYS_DK2_A2, // 6
AU_SYS_DK3_A2, // 7
AU_SYS_BG_NICAM, // 8
AU_SYS_DK_NICAM, // 9
AU_SYS_I_NICAM, // 10
AU_SYS_L_NICAM, // 11
AU_SYS_FM_RADIO, // 12
AU_SYS_HI_DEV=0x10
};
enum
{
SIF_CLOCK_10MHZ=0,
SIF_CLOCK_12MHZ,
SIF_CLOCK_15MHZ,
SIF_CLOCK_20MHZ,
SIF_CLOCK_30MHZ,
SIF_CLOCK_40MHZ,
SIF_CLOCK_50MHZ,
SIF_CLOCK_60MHZ,
MAX_SIF_CLOCK_NUM
};
enum
{
SIF_CM_MAIN_ADDR=0x0000,
SIF_CM_XXX_ADDR=0x0500,
SIF_DM_IO_ADDR=0x2000,
SIF_PM_XXX_ADDR=0x3000
};
#define IDMA_BUFFER_LEN 0x100
#define NICAM_ENHANCE_ON_THRESHOLD 0x0140
#define NICAM_ENHANCE_OFF_THRESHOLD 0x00A0
#define AU_SIF_CARRIER1_THR 0x0100 //0x0c00
#define AU_SIF_CARRIER2_THR 0x0040 //0x0800
void MDrv_AuSifInit(void);
BYTE MDrv_AuSifGetSoundMode(void);
BOOL MDrv_AuSifSetSoundMode(BYTE mode_type);
WORD MDrv_AuSifGetCarrierInfo(BYTE type);
BYTE MDrv_AuSifGetMainSystem(BYTE carrier_type);
BYTE MDrv_AuSifGetSubSystem(BYTE type);
BYTE MDrv_AuSifGetSystem(BYTE carrier_type);
BOOL MDrv_AuSifSetSystem(BYTE system_type);
BOOL MDrv_AuSifLoadCode(BYTE type);
BOOL MDrv_AuSifReLoadCode(BYTE type);
BYTE MDrv_AuSif_GetStandard(void);
void MDrv_AuSif_setMemInfo(void);
BOOL MDrv_AuSif_BTSC_setMonoThr(BYTE monothr_on_hi, BYTE monothr_on_lo, BYTE monothr_off_hi, BYTE monothr_off_lo);
BOOL MDrv_AuSif_BTSC_setStereoThr(BYTE stereothr_on_hi, BYTE stereothr_on_lo, BYTE stereothr_off_hi, BYTE stereothr_off_lo);
BOOL MDrv_AuSif_BTSC_setSapThr(BYTE sapthr_on_hi, BYTE sapthr_on_lo, BYTE sapthr_off_hi, BYTE sapthr_off_lo);
BOOL MDrv_AuSif_BTSC_setPilotLevelThr(BYTE pilotthr_on_hi, BYTE pilotthr_on_lo, BYTE pilotthr_off_hi, BYTE piotthr_off_lo);
#endif //_AUSIF_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -