u8 bCheckStatus(u8 bMode)
{
	u8 bStatus = 0;
	MT8193_PLUG_FUNC();
	bStatus = bReadByteHdmiGRL(GRL_STATUS);

	if ((bStatus & bMode) == bMode) {
		return TRUE;
	} else {
		return FALSE;
	}
}
u8 bCheckPordHotPlug(u8 bMode)
{
	u8 bStatus = FALSE;
	MT8193_PLUG_FUNC();
	if (bMode == (PORD_MODE | HOTPLUG_MODE)) {
		bStatus = bCheckStatus(STATUS_PORD | STATUS_HTPLG);
	} else if (bMode == HOTPLUG_MODE) {
		bStatus = bCheckStatus(STATUS_HTPLG);
	} else if (bMode == PORD_MODE) {
		bStatus = bCheckStatus(STATUS_PORD);
	}

	return bStatus;

}
Ejemplo n.º 3
0
static void vPlugDetectService(HDMI_CTRL_STATE_T e_state)
{
  u8 bData=0xff;

  MT8193_PLUG_FUNC();

  e_hdmi_ctrl_state = HDMI_STATE_IDLE;
  
  switch(e_state)
  {
    case HDMI_STATE_HOT_PLUG_OUT:
     vClearEdidInfo();
     vHDCPReset();
     bData = HDMI_PLUG_OUT;
	  
    break;

    case HDMI_STATE_HOT_PLUGIN_AND_POWER_ON:
     mt8193_checkedid(0);
     bData = HDMI_PLUG_IN_AND_SINK_POWER_ON;
      
    break;

    case HDMI_STATE_HOT_PLUG_IN_ONLY:
     vClearEdidInfo();
     vHDCPReset();
     mt8193_checkedid(0);
     bData = HDMI_PLUG_IN_ONLY;
      
    break;

    case HDMI_STATE_IDLE:

    break;
    default:
    break;

  }

  if(bData!=0xff)
  vNotifyAppHdmiState(bData);
}
Ejemplo n.º 4
0
void vcheckhdmiplugstate(void)
{
   u32 bMask;
   MT8193_PLUG_FUNC();

   bMask = bReadHdmiIntMask();
   vWriteHdmiIntMask((bMask&0xfe));
   if(bCheckPordHotPlug(PORD_MODE|HOTPLUG_MODE)==FALSE)
   {

      {
        if((i4SharedInfo(SI_HDMI_RECEIVER_STATUS)== HDMI_PLUG_IN_AND_SINK_POWER_ON)||(i4SharedInfo(SI_HDMI_RECEIVER_STATUS)== HDMI_PLUG_IN_ONLY))
        { 	
          bMask = bReadHdmiIntMask();
          vWriteHdmiIntMask((bMask|0xfE));
          
          vHDCPReset();
          vTxSignalOnOff(0);
          
          vSetSharedInfo(SI_HDMI_RECEIVER_STATUS, HDMI_PLUG_OUT);
          vSetHDMICtrlState(HDMI_STATE_HOT_PLUG_OUT);
        }
        else
        {
          MT8193_PLUG_LOG("plug out, no action\n");
        }
      }
   } 
   else
   {
     if((i4SharedInfo(SI_HDMI_RECEIVER_STATUS)== HDMI_PLUG_OUT)||(i4SharedInfo(SI_HDMI_RECEIVER_STATUS)== HDMI_PLUG_IN_ONLY)) 
     {	
       vSetSharedInfo(SI_HDMI_RECEIVER_STATUS, HDMI_PLUG_IN_AND_SINK_POWER_ON);
       vSetHDMICtrlState(HDMI_STATE_HOT_PLUGIN_AND_POWER_ON);
     }
     else
     {
       MT8193_PLUG_LOG("plug in ok, no action\n");
     }
   }
}
Ejemplo n.º 5
0
static void vSetHDMICtrlState(HDMI_CTRL_STATE_T e_state)
{
	MT8193_PLUG_FUNC();
	e_hdmi_ctrl_state = e_state;
}
Ejemplo n.º 6
0
static void mt8193_hdmi_late_resume(struct early_suspend *h)
{
	MT8193_PLUG_FUNC();
	mt8193_hdmiearlysuspend = 1;
}
Ejemplo n.º 7
0
static void mt8193_hdmi_early_suspend(struct early_suspend *h)
{
	MT8193_PLUG_FUNC();
	mt8193_hdmiearlysuspend = 0;
	is_hdmi_plug_out_flag = 0;
}
Ejemplo n.º 8
0
static void mt8193_hdmi_early_suspend(struct early_suspend *h)
{
	MT8193_PLUG_FUNC();
    mt8193_hdmiearlysuspend = 0;
}