rk30 hdmi:
authorZheng Yang <zhengyang@rock-chips.com>
Tue, 17 Apr 2012 03:48:24 +0000 (11:48 +0800)
committerZheng Yang <zhengyang@rock-chips.com>
Tue, 17 Apr 2012 03:48:24 +0000 (11:48 +0800)
1. add function hdmi_get_hotplug(void) to poll hdmi hotplug status for other modules.
2. add macro HDMI_AUTO_CONFIGURE in rk30_hdmi.h to enable/disable auto confiure output mode according EDID.

drivers/video/rockchip/hdmi/rk30_hdmi.h
drivers/video/rockchip/hdmi/rk30_hdmi_lcdc.c
drivers/video/rockchip/hdmi/rk30_hdmi_task.c
drivers/video/rockchip/hdmi/rk_hdmi.h

index 66ee37685945c02db6e15646d8112fd1a32e6454..6852d936ab07645739e7562dc1cc6e7570eeead8 100755 (executable)
@@ -21,10 +21,17 @@ enum {
        HDMI_SOURCE_LCDC1 = 1
 };
 
+/* default HDMI video source */
 #define HDMI_SOURCE_DEFAULT            HDMI_SOURCE_LCDC1
 
+/* If HDMI_ENABLE, system will auto configure output mode according to EDID 
+ * If HDMI_DISABLE, system will output mode according to macro HDMI_VIDEO_DEFAULT_MODE
+ */
+#define HDMI_AUTO_CONFIGURE                    HDMI_ENABLE
+
 /* default HDMI output video mode */
 #define HDMI_VIDEO_DEFAULT_MODE                        HDMI_1280x720p_60Hz//HDMI_1920x1080p_60Hz
+/* default HDMI output audio mode */
 #define HDMI_AUDIO_DEFAULT_CHANNEL             2
 #define HDMI_AUDIO_DEFAULT_RATE                        HDMI_AUDIO_FS_44100
 #define HDMI_AUDIO_DEFAULT_WORD_LENGTH HDMI_AUDIO_WORD_LENGTH_16bit
index 391ee1e3994525839537715e01485bc71de91f05..ac97b46d5494751cc2dddf472137aeda6af3f87b 100755 (executable)
@@ -513,3 +513,14 @@ int hdmi_switch_fb(struct hdmi *hdmi, int vic)
        }
        return rc;
 }
+
+/**
+ * hdmi_get_status: get hdmi hotplug status
+ * 
+ * NOTES:
+ * 
+ */
+int hdmi_get_hotplug(void)
+{
+       return hdmi->hotplug;
+}
\ No newline at end of file
index 383935f63755d60cd4fba4e826d5c6ab2e8eae51..51439e0dba77af93f1aa88d9c87bff8b5a910e2d 100755 (executable)
@@ -48,7 +48,7 @@ int hdmi_sys_init(void)
        hdmi->hotplug                   = HDMI_HPD_REMOVED;
        hdmi->state                             = HDMI_SLEEP;
        hdmi->enable                    = HDMI_ENABLE;
-       hdmi->autoconfig                = HDMI_ENABLE;
+       hdmi->autoconfig                = HDMI_AUTO_CONFIGURE;
        
        hdmi->vic                               = HDMI_VIDEO_DEFAULT_MODE;
        hdmi->audio.channel     = HDMI_AUDIO_DEFAULT_CHANNEL;
index c40a180fa2edebd55cbe777a92d42cd079dd7c3c..4989ef496bbfbf1cfeabe0a4b1bc8af892079bab 100755 (executable)
@@ -195,4 +195,6 @@ extern const struct fb_videomode hdmi_mode[];
 #define hdmi_dbg(dev, format, arg...)  
 #endif
 
+extern int hdmi_get_hotplug(void);
+
 #endif