/////////////////////////////////////////////////////////////////////////////// // Function Body /////////////////////////////////////////////////////////////////////////////// void RxHDCPSetReceiver() { PowerDownHDMI(); bHDCPMode = HDCP_RECEIVER ; InitHDMIRX(TRUE); }
void zhou_hdmi_init() { BOOL bSignal, bChangeMode ; hdmirx_clear_hpd(); InitHDMIRX(TRUE); hdmirx_set_hpd(); Check_HDMInterrupt(); bSignal = CheckHDMIRX(); printk("CheckHDMIRx = %d\n",bSignal); }
void RxHDCPSetOverCascade() { PowerDownHDMI(); bHDCPMode = HDCP_REPEATER | HDCP_OVER_CASCADE ; InitHDMIRX(TRUE); }
void RxHDCPSetOverDownStream() { PowerDownHDMI(); bHDCPMode = HDCP_REPEATER | HDCP_OVER_DOWNSTREAM ; InitHDMIRX(TRUE); }
void RxHDCPSetInvalidV() { PowerDownHDMI(); bHDCPMode = HDCP_REPEATER | HDCP_INVALID_V ; InitHDMIRX(FALSE); }
void RxHDCPSetRdyTimeOut() { PowerDownHDMI(); bHDCPMode = HDCP_REPEATER | HDCP_RDY_TIMEOUT ; InitHDMIRX(TRUE); }
void RxHDCPSetRepeater() { PowerDownHDMI(); bHDCPMode = HDCP_REPEATER ; InitHDMIRX(TRUE); }
static int hdmi_task_handle(void *data) { static BOOL bSignal ; BOOL bOldSignal, bChangeMode ; int dump_count = 0 ; int stable_count = 0; MCU_init() ; printk("\n%s\n" , VERSION_STRING); while(1){ HoldSystem(); hdmirx_clear_hpd(); #ifdef _COPY_EDID_ CopyDefaultEDID() ; #endif InitHDMIRX(TRUE); hdmirx_set_hpd(); xCntCnt = 0 ; xCntSum = 0 ; while(hdmirx_device.it660x_enable){ while(hdmirx_device.task_pause){ msleep(10); } if(ReadRXIntPin()) { Check_HDMInterrupt(); } //if(IsTimeOut(20)){ dump_count ++ ; bOldSignal = bSignal ; bSignal = CheckHDMIRX(); bChangeMode = (bSignal != bOldSignal); if(bChangeMode) { // if Changed Mode ... if(bSignal) { stable_count = 0; update_status(0); // if signal is TRUE , then ... dump_vidmode(); if( IsHDMIRXHDMIMode() ) dump_InfoFrame() ; dump_audSts(); } else { stable_count = 0; stop_vdin(); update_status(1); // if signal is FALSE , then ... xCntCnt = 0 ; xCntSum = 0 ; } bChangeMode = FALSE ; // clear bChange Mode action } else { // if not change mode, ... if(bSignal) { if(stable_count<stable_threshold){ stable_count++; if(stable_count == stable_threshold){ start_vdin(getHDMIRXHorzActive(), getHDMIRXVertActive(), 10000, IsHDMIRXInterlace()); } } update_status(0); // if signal is TRUE , then ... if( (dump_count % 20) == 1 ) { xCntCnt ++ ; xCntSum += getHDMIRXxCnt() ; if( xCntCnt > 40 ) { xCntCnt /= 2 ; xCntSum /= 2 ; } } } else { stable_count = 0; stop_vdin(); update_status(1); // if signal is FALSE , then ... xCntCnt = 0 ; xCntSum = 0 ; } } if( dump_count > (DUMP_TIME*1000/20) ) { dump_count = 0 ; if( bSignal ) { dump_vidmode(); if( IsHDMIRXHDMIMode() ) dump_InfoFrame() ; dump_audSts(); } else { printk("Reg10 = %02X\nReg12 = %02X\nReg64 = %02X\nReg65 = %02X\n" ,(int)HDMIRX_ReadI2C_Byte(0x10) ,(int)HDMIRX_ReadI2C_Byte(0x12) ,(int)HDMIRX_ReadI2C_Byte(0x64) ,(int)HDMIRX_ReadI2C_Byte(0x65) ) ; } printk("\n\n") ; DumpHDMIRXReg(); } //}// if(IsTimeOut(20)) msleep(10); } PowerDownHDMI(); } return 0; }
int main(void) { static BOOL bSignal ; BOOL bOldSignal, bChangeMode ; int dump_count = 0 ; hdmirx_clear_hpd(); EnableHDMIRXVideoOutput(VIDEO_AUTO) ; SelectHDMIPort(CAT_HDMI_PORTA); InitHDMIRX(TRUE); hdmirx_set_hpd(); xCntCnt = 0 ; xCntSum = 0 ; while(1){ HoldSystem(); if(ReadRXIntPin()) { Check_HDMInterrupt(); } #if 0 // for switching to port B hdmirx_clear_hpd(); EnableHDMIRXVideoOutput(VIDEO_AUTO) ; SelectHDMIPort(CAT_HDMI_PORTB); hdmirx_set_hpd(); #endif if(IsTimeOut(LOOP_MSEC)) { dump_count ++ ; bOldSignal = bSignal ; bSignal = CheckHDMIRX(); bChangeMode = (bSignal != bOldSignal); if(bChangeMode) { // if Changed Mode ... if(bSignal) { // if signal is TRUE , then ... dump_vidmode(); if( IsHDMIRXHDMIMode() ) dump_InfoFrame() ; dump_audSts(); } else { // if signal is FALSE , then ... xCntCnt = 0 ; xCntSum = 0 ; } bChangeMode = FALSE ; // clear bChange Mode action } else { // if not change mode, ... if(bSignal) { // if signal is TRUE , then ... if( (dump_count % 20) == 1 ) { xCntCnt ++ ; xCntSum += getHDMIRXxCnt() ; if( xCntCnt > 40 ) { xCntCnt /= 2 ; xCntSum /= 2 ; } } } else { // if signal is FALSE , then ... xCntCnt = 0 ; xCntSum = 0 ; } } if( dump_count > (DUMP_TIME*1000/20) ) { dump_count = 0 ; if( bSignal ) { dump_vidmode(); if( IsHDMIRXHDMIMode() ) dump_InfoFrame() ; dump_audSts(); } else { printf("There is no signal: Reg10 = %02X Reg12 = %02X Reg64 = %02X Reg65 = %02X\n" ,(int)HDMIRX_ReadI2C_Byte(0x10) ,(int)HDMIRX_ReadI2C_Byte(0x12) ,(int)HDMIRX_ReadI2C_Byte(0x64) ,(int)HDMIRX_ReadI2C_Byte(0x65) ) ; } printf("\n\n") ; DumpHDMIRXReg(); } }// if(IsTimeOut(20)) } return 0; }