#ifndef _VIP2_IOCTL_H_ #define _VIP2_IOCTL_H_ #include "drv_vip_external.h" #include "drv_kmf_interface.h" #include "drv_cvd2_external.h" #include "kmf_ioctl.h" typedef enum _SRCTYPE_t{ SRCTYPE_ATV = 0x1, SRCTYPE_DTV = 0x2, SRCTYPE_TV = 0x4, SRCTYPE_AV = 0x10, SRCTYPE_SV = 0x20, SRCTYPE_SCART = 0x40, SRCTYPE_VIDEO = 0x80, SRCTYPE_COMPONENT = 0x100, SRCTYPE_PC = 0x200, SRCTYPE_DVD = 0x400, //[Singming 20121030] Add for CONFIG_DVD_COMBO #ifdef CONFIG_BLUETOOTH_SUPPORT SRCTYPE_BLUETOOTH = 0x800, #endif SRCTYPE_HDMI = 0x1000, SRCTYPE_EMENU = 0x2000, #if defined(CONFIG_SUPPORT_NES_GAME) || defined(CONFIG_OSD_GAME_SUPPORT) SRCTYPE_GAME = 0x4000, #endif SRCTYPE_PVR = 0x8000, SRCTYPE_PICVIEWER = 0x10000, SRCTYPE_MUSICPLAYER = 0x20000, SRCTYPE_MEDIA = 0x40000, SRCTYPE_KOK = 0x80000, SRCTYPE_ANYPLEX = 0x100000, SRCTYPE_ANDROID = 0x200000, //Special Source SRCTYPE_BURNIN = 0x400000, SRCTYPE_FIRMWAREUPDTAE = 0x800000, //Reserved bits SRCTYPE_RESERVED = 0xff000000 }SRCTYPE_t; typedef enum { MID_PROGRESSIVE=0, MID_INTERLACE } MID_LACE_MODE_t; typedef enum { MID_CVD2_STD_NONE = CVD2_STD_NONE, MID_CVD2_STD_NTSC_M = CVD2_STD_NTSC_M, MID_CVD2_STD_NTSC_443 = CVD2_STD_NTSC_443, MID_CVD2_STD_PAL = CVD2_STD_PAL_IBGDK, MID_CVD2_STD_PAL_M = CVD2_STD_PAL_M, MID_CVD2_STD_PAL_CN = CVD2_STD_PAL_CN, MID_CVD2_STD_PAL_60 = CVD2_STD_PAL_60, MID_CVD2_STD_SECAM = CVD2_STD_SECAM, MID_CVD2_STD_END, } MID_CVD2_MODE_t; typedef enum { MID_HDMI_MODE=0, MID_DVI_MODE, } MID_HDMI_MODE_t; typedef enum { STATUS_NOSIGNAL, STATUS_SIGNALOK, STATUS_SIGNALWEAK, STATUS_NOTSUPPORT, STATUS_UNKNOWN, } MID_INPUT_STATUS_t; typedef struct MID_InputInfo { unsigned int wHactive; // input horizontal resouluton unsigned int wVactive; // input vertical resolution unsigned int wHsfreq; // H sync frequency unsigned int wVsfreq; // V sync frequency MID_CVD2_MODE_t eCvd2ColorFormat; // CVD2 source: PAL / NTSC / SECAM unsigned char bIsHdmiNeedOverScan; // for menu determine showing HDMI screen mode item(0: HDMI timing don't do overscan, 1: HDMI timing need do overscan) MID_LACE_MODE_t eInterlace; // 1=interlaced, 0=progressive VIP_InputStruct_3D_t e3DStructure; // HDMI source 3D mode unsigned char bRGBRange; // HDMI source RGB range MID_HDMI_MODE_t eSourceDVIMode; // HDMI source: 0: HDMI mode, 1: DVI mode SCART_MODE_t eScartMode; // CVD2 source: 0: SCART_SV mode, 1: SCART_CVBS mode, 2: SCART_RGB mode MID_INPUT_STATUS_t eInputStatus; // 0:No signal, 1:Signal stable, 2: weak signal; Set by driver only SRCTYPE_t eMidSourceType; unsigned int uiTimingIndex; // Only works in CVD2 and ADC and HDMI unsigned char bCodedFrame; // Input source aspect ratio unsigned short usTimingTableHStart; //For Factory menu used only unsigned short usTimingTableVStart; //For Factory menu used only unsigned char bIsHScalerDown; unsigned char bITC; }MID_InputInfo_t, *PMID_InputInfo_t; typedef struct _DrvInputStatus_t { unsigned char msgfromVIP; // 1: VIP, 0: other driver unsigned char bSub; // 0: main, 1: sub; set by VIP driver only. unsigned int path; // input path unsigned char bActive; // 0:FALSE, 1:TRUE; Set by driver only unsigned char bNotSupport; unsigned char bScramble; //0:FALSE, 1:TRUE; Set by DTV driver only unsigned char bAudioOnly; unsigned char bHscalerDown; }DrvInputStatus_t, *PDrvInputStatus_t; /* VIP module related factory define Begin */ enum{ STRIPE_PATTERN_DISABLE, STRIPE_PATTERN_HORIZONTAL, STRIPE_PATTERN_VERTICAL, }; typedef enum{ VIP_TEST_PATTERN_DISABLE = 0, VIP_TEST_PATTERN_GRAY16, VIP_TEST_PATTERN_GRAY32, VIP_TEST_PATTERN_GRAY64, VIP_TEST_PATTERN_VERTICAL_COLORBAR, VIP_TEST_PATTERN_HORIZONTAL_RAMP_COLORBAR, VIP_TEST_PATTERN_VERTICAL_STRIPE_PATTERN, VIP_TEST_PATTERN_HORIZONTAL_STRIPE_PATTERN, VIP_TEST_PATTERN_DISABLE_STRIPE_PATTERN, VIP_TEST_PATTERN_FILL_COLOR = 0x80, #ifdef CONFIG_CONTROL_WHITE_pattern_BY_PQ VIP_TEST_PATTERN_FILL_COLOR_PQ, #endif VIP_TEST_PATTERN_END, }VIP_TestPattern_t; typedef struct _VIP_TestPattern { UINT16 wPatternType; //VIP test pattern type selection UINT16 wRedColor; //Fill Red color value UINT16 wGreenColor; //Fill Green color value UINT16 wBlueColor; //Fill Blue color value }VIP_TestPattern,*PVIP_TestPattern; /* VIP module related factory define End */ UINT8 Cmd_VipInit(void); UINT8 Cmd_VipAdjust(VIP_ADJCMD_t cmd, int value); UINT8 Cmd_VipSetOverScan(UINT16 usiTop, UINT16 usBottom, UINT16 usLeft, UINT16 usRight); UINT8 Cmd_VipGetOverScan(UINT16* usiTop, UINT16* usBottom, UINT16* usLeft, UINT16* usRight, BOOL* fUnitByRatio); UINT8 Cmd_VipGetYAvag(UINT32* Yavg); UINT8 Cmd_VipSetExtsInputWin(UINT16 usHStart, UINT16 usHEnd, UINT16 usVStart, UINT16 usVEnd); UINT8 Cmd_VipGetExtsInputWin(UINT16* usHStart, UINT16* usHEnd, UINT16* usVStart, UINT16* usVEnd); UINT8 Cmd_VipSetHDMIScreenMode(UINT8 eMode); UINT8 Cmd_VipOverScanEn(UINT8 ucEn); UINT8 Cmd_VipGetInputInfo(SRCTYPE_t eSource, PMID_InputInfo_t pInput_Info); UINT8 Cmd_VipGetPanelRes(UINT32* ulWidth, UINT32* ulHeight); UINT32 Cmd_VipGetAdcHTotal(void); UINT8 Cmd_VipSetAPPMuteStatus(BOOL eMuteStatus); #ifdef CONFIG_QSD UINT8 Cmd_VipSetMTMuteStatus(BOOL eMuteStatus); #endif UINT8 Cmd_VipGetMuteStatus(PVIP_Mute_Flag_st peRetMuteStatus); BOOL Cmd_VipIsSupport3D(VIP_InputStruct_3D_t e3DInputStruct); UINT8 Cmd_VipSetMuteColor(UINT8 bR, UINT8 bG, UINT8 bB); UINT8 Cmd_VipSetTvfeMuteColorByAPP(BOOL fEn); UINT8 Cmd_VipSourceSelect_By_ShowLogo(input_type_t eInputType); //UINT8 Cmd_VipTestPattern(UINT16 ePattern); UINT8 Cmd_VipTestPattern(UINT16 ePattern,UINT16 eRedColor,UINT16 eGreenColor,UINT16 eBuleColor); UINT8 Cmd_VipGetPanelInverse(BOOL *fFlip); UINT8 Cmd_VipGetDefPanelInverse(BOOL * fFlip); UINT8 Cmd_SetVideoPosAndSize(INT16 sdHstart, INT16 sdVstart, UINT16 sdHsize, UINT16 sdVsize, UINT8 fMHEG5Active, UINT8 bInfo); UINT8 Cmd_GetDispAspectRatio(void); #ifdef CONFIG_SUPPORT_MHEG5 UINT8 Cmd_SetMHEG5En(UINT8 ucEn); UINT8 Cmd_SetWideAlignment(VIP_MHEG5_WideAignment eWideAlignment, UINT8 fMheg5Active, UINT8 bInfo); UINT8 Cmd_SetSceneAspectRatio(VIP_MHEG5_SceneAspectRatio eSceneAR, UINT8 fMheg5Active, UINT8 bInfo); UINT8 Cmd_UpdateVIP(UINT8 fMheg5Active, UINT8 bInfo); UINT8 Cmd_GetDecFC(VIP_MHEG5_DecFC *decFC); #endif #ifdef CONFIG_ENABLE_MIR UINT8 Cmd_VipSetMirrorFormat(BOOL fMirEn, UINT8 bFormat, BOOL fOSDEn); #endif UINT8 Cmd_VipSetMonflg(UINT32 dMonflg); void Cmd_VipSetSrcZoom(BOOL en, UINT16 x, UINT16 y, UINT16 dWidth, UINT16 dHeight); void Cmd_VipSetDspZoom(BOOL en, UINT16 x, UINT16 y, UINT16 dWidth, UINT16 dHeight); UINT8 Cmd_VipSSC_LVDS_CLKShift(VIP_ADJCMD_t cmd, int value,int iParm1); void Cmd_SetMediaPlayStatus(VIP_MEDIA_Playback_State_t eMediaPlayStatus); /** * @brief Set Zoom in/out percent with each aspectraio * * This function set zoom in/out percent and apply to aspectratio setting, set this function before aspectraio function. * Supported in PC, HDMI, DTV, Media-Movie and PHOTO source currently. * * @param HPercent : zoom in/out in horizontal, the value should be 20 - 100. 20 is 20%, and 100 is 100%, default should be 100 * @param VPercent : zoom in/out in vertical, the value should be 20 - 100. 20 is 20%, and 100 is 100%, default should be 100 * the parameter HPercent can be different with VPercent * @return n/a */ void Cmd_SetZoomPercent(INT32 HPercent, INT32 VPercent); UINT8 Cmd_VipGetRGBMaxMin(INT32* iRMax, INT32* iGMax, INT32* iBMax, INT32* iRMin, INT32* iGMin, INT32* iBMin); UINT8 Cmd_VipGetYHistOverValCnt(INT32 iYHistOverValue, INT32* iCount); #endif