rk616_hdmi_initial();
if(hdmi->enable) {
enable_irq(hdmi->irq);
- queue_delayed_work(hdmi->workqueue, &hdmi->delay_work, 0);
+ hdmi_irq();
}
+ queue_delayed_work(hdmi->workqueue, &hdmi->delay_work, msecs_to_jiffies(10));
mutex_unlock(&hdmi->enable_mutex);
return;
}
debugfs_create_file("hdmi", S_IRUSR,rk616->debugfs_dir,rk616,&rk616_hdmi_reg_fops);
}
#endif
- //rk616_irq_work_func(NULL);
- queue_delayed_work(hdmi->workqueue, &hdmi->delay_work, msecs_to_jiffies(10));
+ rk616_irq_work_func(NULL);
+ //queue_delayed_work(hdmi->workqueue, &hdmi->delay_work, msecs_to_jiffies(10));
dev_info(hdmi->dev, "rk616 hdmi probe success.\n");
return 0;
err1:
int rk616_hdmi_detect_hotplug(void)
{
int value = 0;
+ HDMIRdReg(INTERRUPT_STATUS1,&value);
+ if(value){
+ HDMIWrReg(INTERRUPT_STATUS1, value);
+ }
HDMIRdReg(HDMI_STATUS,&value);
hdmi_dbg(hdmi->dev, "[%s] value %02x\n", __FUNCTION__, value);
return -ENOENT;
}
+ //set_audio source I2S
if(HDMI_CODEC_SOURCE_SELECT == INPUT_IIS){
- //set_audio source I2S
+ HDMIWrReg(AUDIO_CTRL1, 0x00);
HDMIWrReg(AUDIO_SAMPLE_RATE, rate);
HDMIWrReg(AUDIO_I2S_MODE, v_I2S_MODE(I2S_STANDARD) | v_I2S_CHANNEL(channel) );
HDMIWrReg(AUDIO_I2S_MAP, 0x00);
HDMIWrReg(AUDIO_I2S_SWAPS_SPDIF, 0); // no swap
}else{
- HDMIWrReg(AUDIO_CTRL1, 0x08); //internal CTS, disable down sample, i2s input, disable MCLK
+ HDMIWrReg(AUDIO_CTRL1, 0x08);
HDMIWrReg(AUDIO_I2S_SWAPS_SPDIF, 0); // no swap
}
rk616_hdmi_set_pwr_mode(NORMAL);
queue_delayed_work(hdmi->workqueue, &hdmi->delay_work, msecs_to_jiffies(10));
}
-
+#if 0
if(hdmi->state == HDMI_SLEEP) {
// hdmi_dbg(hdmi->dev, "hdmi return to sleep mode\n");
rk616_hdmi_set_pwr_mode(LOWER_PWR);
}
+#endif
#if 0
if(hdmi->hdcp_irq_cb)
hdmi->hdcp_irq_cb(interrupt2);
else {
if(hdmi->irq)
enable_irq(hdmi->irq);
- #if defined(CONFIG_HDMI_RK610) || defined(CONFIG_HDMI_RK2928) || defined(CONFIG_HDMI_CAT66121)
+ #if defined(CONFIG_HDMI_RK610) || defined(CONFIG_HDMI_RK2928) || defined(CONFIG_HDMI_CAT66121) || defined(CONFIG_HDMI_RK616)
queue_delayed_work(hdmi->workqueue, &hdmi->delay_work, 0);
#endif
mutex_unlock(&hdmi->enable_mutex);