/**
 * @file hv_cal_SubMute.h
 * @brief Header file of mute module.
 *
 * @verbatim
 * ==============================================================================
 *                        ##### How to use #####
 * ==============================================================================
 *
 * @endverbatim
 *
 * @author HiView SoC Software Team
 * @version 1.0.0
 * @date 2022-08-22
 */

#ifndef __HV_CAL_DPU_SUB_MUTE_H__
#define __HV_CAL_DPU_SUB_MUTE_H__

#include "hv_comm_DataType.h"
#include "hv_comm_Define.h"

/**
 * @brief set sub mute clk en.
 * @param[in] bEn set en.
 * @return null
 */
VOID Hv_Cal_DpuScaler_SetSubMuteClkEn(BOOL bEn);

/**
 * @brief set mute.
 * @param[in] value set htotal.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubHtotal(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set vtotal.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubVtotal(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set hact.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubHact(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set vact.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubVact(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set hact min.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubHactMin(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set hact max.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubHactMax(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set vact min.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubVactMin(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set vact max.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubVactMax(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set frm trig pos.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubFrmTrigPos(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value tongle reg_mute_de_normal_option.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubNormOption(VOID);
/**
 * @brief set mute.
 * @param[in] value set force stable.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubForceStable(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set det enable.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubDetEnable(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set hmin det enable.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubHminDetEnable(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set hmax det enable.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubHmaxDetEnable(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set vmin det enable.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubVminDetEnable(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set vmax det enable.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubVmaxDetEnable(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set httl max det enable.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubHttlMaxDetEnable(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set prog src stable enable.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubSh12ProgSrcStableEn(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set htotal max.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubHtotalMax(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set htotal min.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubHtotalMin(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set vttl min det enable.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubVttlMinDetEnable(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set httl min det enable.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubHttlMinDetEnable(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set hs bproth.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubHsBporth(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set vs bproth.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubVsBporth(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set hs width.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubHsWidth(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set vs width.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubVsWidth(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set freerun keep time.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubFreerunKeepTime(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set rx lock det enable.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubRxLocknDetEnable(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set rx de det enable.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubRxDeDetEnable(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set hs pos.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubHsPos(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set vs pos.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubVsPos(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set force freerun.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubForceFreeRun(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set norm post delay.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubNormPostDelay(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set freerun to norm threshold.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubFreerun2normThreshold(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set clk det enable.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubClkDetEnable(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set inclk unlocked threshold.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubInclkUnlockedTh(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set ex clk stable sel.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubRxclkStableSel(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set inclk no ck option.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubInclkNoCkOption(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set antiglitch threshold.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubAntiglitchTh(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set no de enable.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubNoDeEnable(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set htotal out mode.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubHtotalOutMode(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set measure enable.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubVsMeasureEn(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set norm clr delay.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubNormClrDelay(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set httl min comp en.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubHttlMinCompEn(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set vblank min.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubVblankMin(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set freq low threshold.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubInclkFreqLowTh(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set high threshold.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubInclkFreqHighTh(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set hact out.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubHactOut(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set vact out.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubVactOut(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] NULL.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
//Status Hv_Cal_DpuScaler_ResetDeDetectFunc(VOID);


/**
 * @brief set mute.
 * @param[in] value set mute interrupt.
 * @return Status, 0-HV_SUCCESS, 1-FAILUER.
 */
Status Hv_Cal_DpuScaler_SetMuteSubSh12MuteInt(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set into normal delay register.
 * @return Status, 0-HV_SUCCESS, 1-HV_FAILURE.
 */
Status Hv_Cal_DpuScaler_SetMuteSubNormDelay(UINT32 uiValue);

/**
 * @brief set mute.
 * @param[in] value set into no de detection threshold register.
 * @return Status, 0-HV_SUCCESS, 1-HV_FAILURE.
 */
Status Hv_Cal_DpuScaler_SetMuteSubNoDeTh(UINT32 uiValue);

/**
 * @brief get mut result.
 * @param[in] None.
 * @return status:
    Readback of internal state machine.
    [9]:wait4;
    [8]:wait3;
    [7]:wait2;
    [6]:wait1;
    [5]:normal;
    [4]:wait0;
    [3]:freerun;
    [2]:idle;
    [1]:freerun state;
    [0]:normal state;
 **/
UINT32 Hv_Cal_DpuScaler_GetMuteSubState(VOID);

/**
 * @brief readback of clock detection abnormal. High is abnormal.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubClkAbn(VOID);

/**
 * @brief readback of DE H active minimal abnormal. High is abnormal.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubHdeMinAbn(VOID);

/**
 * @brief readback of DE H active maximal abnormal. High is abnormal.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubHdeMaxAbn(VOID);

/**
 * @brief readback of H total maximal abnormal. High is abnormal.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubHTotalMaxAbn(VOID);

/**
 * @brief readback of DE V active minimal abnormal. High is abnormal.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubVDeMinAbn(VOID);

/**
 * @brief readback of DE V active maximal abnormal. High is abnormal.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubVDeMaxAbn(VOID);

/**
 * @brief readback of V blanking maximal abnormal. High is abnormal.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubVBlkMaxAbn(VOID);

/**
 * @brief readback of no DE at all.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubNoDe(VOID);

/**
 * @brief readback of MUTE function enable.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubEn(VOID);

/**
 * @brief readback of vx1 lock abnormal.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubVx1LockAbn(VOID);

/**
 * @brief readback of vx1 de abnormall.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubVx1DeAbn(VOID);

/**
 * @brief readback of low vs frequency abnormal.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubVsFreqIsLow(VOID);

/**
 * @brief readback of high vs frequency abnormal.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubVsFreqIsHigh(VOID);

/**
 * @brief readback of v total minimal abnormal.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubVttlMinAbn(VOID);

/**
 * @brief readback of vs frequency diff abnormal.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubVsFreqDiffHigh(VOID);

/**
 * @brief readback of vs frequency diff abnormal.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubVsFreqDiffLong(VOID);

/**
 * @brief readback htotal minimal abnormal.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubHTotalMinAbn(VOID);

/**
 * @brief readback vblank minimal abnormal.
 * @param[in]None.
 * @return.
 */
UINT32 Hv_Cal_DpuScaler_GetMuteSubVBlkMinAbn(VOID);

Status Hv_Cal_DpuScaler_SetSubMisc84(UINT32 uiValue);


void Hv_Cal_DpuScaler_LDGSubReleaseBlack(VOID);

Status Hv_Cal_DpuScaler_LDGSubInsertBlackEventInit(UINT32 uiValue);

Status Hv_Cal_DpuScaler_LDGSubInsertBlackCableDetect(VOID);

Status Hv_Cal_DpuScaler_SetSubMuteCompW2Enable(UINT32 uiValue);

UINT32 Hv_Cal_DpuScaler_GetSubMuteStatus(VOID);

UINT32 Hv_Cal_DpuScaler_GetMuteSubIntReason(VOID);

Status Hv_Cal_DpuScaler_SubMuteClearInsertBlack(VOID);

Status Hv_Cal_DpuScaler_SubMuteForceFreeRun(BOOL bSwitch);

UINT32 Hv_Cal_DpuScaler_SubGetBalckInsertStatus(ChannelType mutePath);

VOID Hv_Cal_DpuScaler_SetSubMuteThreahold(VOID);

Status Hv_Cal_DpuScaler_SetMuteSubStateW4Enable(UINT32 uiValue);

VOID Hv_Cal_DpuScaler_SubClearMuteEn(VOID);

VOID Hv_Cal_DpuScaler_SetSubSeamlessApplyInEn(BOOL bEn);

#endif

