| /******************************************************************************* |
| * Copyright (C) Marvell International Ltd. and its affiliates |
| * |
| * Marvell GPL License Option |
| * |
| * If you received this File from Marvell, you may opt to use, redistribute and/or |
| * modify this File in accordance with the terms and conditions of the General |
| * Public License Version 2, June 1991 (the "GPL License"), a copy of which is |
| * available along with the File in the license.txt file or by writing to the Free |
| * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 or |
| * on the worldwide web at http://www.gnu.org/licenses/gpl.txt. |
| * |
| * THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE IMPLIED |
| * WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY |
| * DISCLAIMED. The GPL License provides additional details about this warranty |
| * disclaimer. |
| ********************************************************************************/ |
| |
| #ifndef __VPP_BE_HDMITX_H__ |
| #define __VPP_BE_HDMITX_H__ |
| |
| int BE_HDMIPHY_SetDAMP (THINVPP_OBJ *vpp_obj, int value); |
| int BE_HDMIPHY_SetEAMP(THINVPP_OBJ *vpp_obj, int value); |
| |
| #if BOOTLOADER_FASTLOGO |
| |
| #define NEW_HDMI_TX_IP |
| |
| /*----------------------------------------------------------------------------- |
| * Macros |
| *----------------------------------------------------------------------------- |
| */ |
| #define VPP_BE_HDMITX_MAX_PKT_INDEX 6 |
| |
| /*----------------------------------------------------------------------------- |
| * Enums, Structures and Unions |
| *----------------------------------------------------------------------------- |
| */ |
| typedef enum tagVPP_BE_HDMITX_OUT_MODE |
| { |
| VPP_BE_HDMITX_OUT_UNDEF = 0x00, |
| VPP_BE_HDMITX_OUT_DVI, |
| VPP_BE_HDMITX_OUT_HDMI, |
| }VPP_BE_HDMITX_OUT_MODE; |
| |
| typedef enum tagVPP_BE_HDMITX_AUDIO_BUS |
| { |
| VPP_BE_HDMITX_AUDIO_I2S, |
| VPP_BE_HDMITX_AUDIO_SPDIF, |
| VPP_BE_HDMITX_AUDIO_BUS_MAX |
| }VPP_BE_HDMITX_AUDIO_BUS, *PVPP_BE_HDMITX_AUDIO_BUS; |
| |
| // Audio Input clock sampling freq types |
| typedef enum tagVPP_BE_HDMITX_AUDIO_INP_CLK_SEL |
| { |
| VPP_BE_HDMITX_AUD_INP_CLK_128fs = 0, |
| VPP_BE_HDMITX_AUD_INP_CLK_256fs, |
| VPP_BE_HDMITX_AUD_INP_CLK_384fs, |
| VPP_BE_HDMITX_AUD_INP_CLK_512fs, |
| VPP_BE_HDMITX_AUD_INP_CLK_MAX |
| }VPP_BE_HDMITX_AUDIO_INP_CLK_SEL; |
| |
| // Color Depth |
| typedef enum tagVPP_BE_HDMITX_BIT_DEPTH |
| { |
| VPP_BE_HDMITX_BIT_DEPTH_8 = 4, |
| VPP_BE_HDMITX_BIT_DEPTH_10, |
| VPP_BE_HDMITX_BIT_DEPTH_12, |
| }VPP_BE_HDMITX_BIT_DEPTH; |
| |
| // Pixel repetition types |
| typedef enum tagVPP_BE_HDMITX_PIXEL_RPT_TYPE |
| { |
| VPP_BE_HDMITX_PIXEL_RPT_NONE = 0, |
| VPP_BE_HDMITX_PIXEL_RPT_BY_2 = 1, |
| VPP_BE_HDMITX_PIXEL_RPT_BY_3, |
| VPP_BE_HDMITX_PIXEL_RPT_BY_4, |
| VPP_BE_HDMITX_PIXEL_RPT_BY_5, |
| VPP_BE_HDMITX_PIXEL_RPT_BY_6, |
| VPP_BE_HDMITX_PIXEL_RPT_BY_7, |
| VPP_BE_HDMITX_PIXEL_RPT_BY_8, |
| VPP_BE_HDMITX_PIXEL_RPT_BY_9, |
| VPP_BE_HDMITX_PIXEL_RPT_BY_10, |
| VPP_BE_HDMITX_PIXEL_RPT_MAX |
| }VPP_BE_HDMITX_PIXEL_RPT_TYPE; |
| |
| // HDMI Packet Types |
| typedef enum tagVPP_BE_HDMITX_HOST_PKT_TYPE |
| { |
| VPP_BE_HDMITX_PKT_NONE = 0x00, |
| VPP_BE_HDMITX_NULL_PKT, |
| VPP_BE_HDMITX_ACR_PKT, |
| VPP_BE_HDMITX_AUD_SAMP_PKT, |
| VPP_BE_HDMITX_GC_PKT, |
| VPP_BE_HDMITX_ACP_PKT, |
| VPP_BE_HDMITX_ISRC1_PKT, |
| VPP_BE_HDMITX_ISRC2_PKT, |
| VPP_BE_HDMITX_1BIT_AUD_SAMP_PKT, |
| VPP_BE_HDMITX_DST_AUD_PKT, |
| VPP_BE_HDMITX_HBR_AUD_PKT, |
| VPP_BE_HDMITX_GAMUT_METADATA_PKT, |
| VPP_BE_HDMITX_VENDOR_INFOFRM_PKT = 0x81, |
| VPP_BE_HDMITX_AVI_INFOFRM_PKT, |
| VPP_BE_HDMITX_SPD_INFOFRM_PKT, |
| VPP_BE_HDMITX_AUD_INFOFRM_PKT, |
| VPP_BE_HDMITX_MPEG_INFOFRM_PKT, |
| VPP_BE_HDMITX_MAX_PKT, |
| }VPP_BE_HDMITX_HOST_PKT_TYPE, *PVPP_BE_HDMITX_HOST_PKT_TYPE; |
| |
| // Host packet transfer mode |
| typedef enum tagVPP_BE_HDMITX_HOST_PKT_TX_MODE |
| { |
| VPP_BE_HDMITX_HOST_PKT_TX_ONCE = 0, |
| VPP_BE_HDMITX_HOST_PKT_TX_EVERY_VSYNC, |
| VPP_BE_HDMITX_HOST_PKT_TX_MAX_MODE |
| }VPP_BE_HDMITX_HOST_PKT_TX_MODE,*PVPP_BE_HDMITX_HOST_PKT_TX_MODE; |
| |
| typedef union tagVPP_BE_HDMITX_AUDIO_BUS_PARAMS |
| { |
| struct |
| { |
| int ClkDelay; |
| int DataShift; |
| int DataJustification; |
| int LeftChnWordSelEdge; |
| int DataLatchingEdge; |
| unsigned char PortCfg; // Flag |
| }I2SParams; |
| }VPP_BE_HDMITX_AUDIO_BUS_PARAMS, *PVPP_BE_HDMITX_AUDIO_BUS_PARAMS; |
| |
| typedef struct tagVPP_BE_HDMITX_AUDIO_FMT_PARAMS |
| { |
| int Layout; |
| unsigned char WordLength; |
| VPP_BE_HDMITX_AUDIO_INP_CLK_SEL InputClk; |
| unsigned int AcrN; |
| unsigned int AcrCts; |
| unsigned char HbrAudio; |
| unsigned char AudioFmt; |
| }VPP_BE_HDMITX_AUDIO_FMT_PARAMS, *PVPP_BE_HDMITX_AUDIO_FMT_PARAMS; |
| |
| typedef struct tagVPP_BE_HDMITX_VIDEO_FMT_PARAMS |
| { |
| // RGB/YCbCr |
| int VideoFmt; |
| // Display Resolution |
| int DispRes; |
| // Color Depth |
| int ColorDepth; |
| // Pixel Repetition |
| VPP_BE_HDMITX_PIXEL_RPT_TYPE PixelRpt; |
| }VPP_BE_HDMITX_VIDEO_FMT_PARAMS, *PVPP_BE_HDMITX_VIDEO_FMT_PARAMS; |
| |
| typedef struct tagVPP_BE_HDMITX_AUDIO_CHN_STS |
| { |
| unsigned char CpBit; |
| unsigned char PreEmphasisInfo; |
| unsigned char CategoryCode; |
| unsigned char SrcNum; |
| unsigned char ChnNum; |
| unsigned char SampFreq; |
| unsigned char ClkAccuracy; |
| unsigned char MaxAudSampLen; |
| unsigned char WordLength; //Based on MaxAudSampLen |
| unsigned char OrigSampFreq; |
| }VPP_BE_HDMITX_AUDIO_CHN_STS, *PVPP_BE_HDMITX_AUDIO_CHN_STS; |
| |
| /*----------------------------------------------------------------------------- |
| * Function Prototypes |
| *----------------------------------------------------------------------------- |
| */ |
| int BE_HDMITX_LoadDefaultVal(THINVPP_OBJ *vpp_obj); |
| int BE_HDMITX_EnableAudioPkt(THINVPP_OBJ *vpp_obj,int EnAudio); |
| int BE_HDMITX_SetVideoFmtParams(THINVPP_OBJ *vpp_obj, |
| VPP_BE_HDMITX_OUT_MODE OutMode, |
| PVPP_BE_HDMITX_VIDEO_FMT_PARAMS pVideoParams); |
| int BE_HDMITX_EnableGCP(THINVPP_OBJ *vpp_obj,int EnableGCP); |
| int BE_HDMITX_SetMute(THINVPP_OBJ *vpp_obj,int Audio, int Video); |
| int BE_HDMITX_GetMuteSts(THINVPP_OBJ *vpp_obj,int *pAudio, int *pVideo); |
| int BE_HDMITX_SendHostPkt(THINVPP_OBJ *vpp_obj, unsigned char PktIndex, |
| VPP_BE_HDMITX_HOST_PKT_TX_MODE PktTxMode); |
| int BE_HDMITX_DisableHostPkt(THINVPP_OBJ *vpp_obj, unsigned char PktIndex, |
| VPP_BE_HDMITX_HOST_PKT_TX_MODE PktTxMode); |
| int BE_HDMITX_SetHostPktTxData(THINVPP_OBJ *vpp_obj, unsigned char pktIndex, unsigned char *pPktData); |
| int BE_HDMITX_ClearHostPktTxData(THINVPP_OBJ *vpp_obj, unsigned char pktIndex, unsigned char bcmType); |
| int BE_HDMITX_SyncHostPktTxOnceStatus(THINVPP_OBJ *vpp_obj, unsigned char *pPktTxOnceStatus); |
| int BE_HDMITX_ResetFifo(THINVPP_OBJ *vpp_obj); |
| int BE_HDMITX_EnablePhyFifo(THINVPP_OBJ *vpp_obj, int enable, int bufWrite); |
| int BE_HDMITX_SetMode(THINVPP_OBJ *vpp_obj,VPP_BE_HDMITX_OUT_MODE OutMode); |
| int BE_HDMIPHY_LoadDefaultVal (THINVPP_OBJ *vpp_obj); |
| int BE_HDMIPHY_EnableTmds (THINVPP_OBJ *vpp_obj,int Enable); |
| |
| #endif // __VPP_BE_HDMITX_H__ |
| #endif |