add CONFIG_HDMI_RK30_CTL_CODEC to enable control codec:
When HDMI inserted, mute codec analog output;
When HDMI removed, unmute codec analog output.
-config HDMI_RK30
+menuconfig HDMI_RK30
bool "RK30 HDMI support"
depends on LCDC_RK30
select FB_MODE_HELPERS
help
Support rk30 hdmi if you say y here
+config HDMI_RK30_CTL_CODEC
+ bool "Mute Codec When HDMI Actived"
+ depends on HDMI_RK30
+ default n
+ help
+ If you say y heres, Codec will be mute when hdmi inserted,
+ and unmute when removed.
+
config HDMI_RK30_DEBUG
bool "RK30 HDMI Debugging"
depends on HDMI_RK30 && LCDC_RK30
#include "rk30_hdmi.h"
#include "rk30_hdmi_hw.h"
+#ifdef CONFIG_HDMI_RK30_CTL_CODEC
+extern void codec_set_spk(bool on);
+#endif
#define HDMI_MAX_TRY_TIMES 1
#ifdef CONFIG_SWITCH
switch_set_state(&(hdmi->switch_hdmi), 0);
#endif
+ #if CONFIG_HDMI_RK30_CTL_CODEC
+ codec_set_spk(1);
+ #endif
}
static void hdmi_sys_sleep(void)
#ifdef CONFIG_SWITCH
switch_set_state(&(hdmi->switch_hdmi), 1);
#endif
+ #ifdef CONFIG_HDMI_RK30_CTL_CODEC
+ codec_set_spk(0);
+ #endif
}
break;
case SYSTEM_CONFIG: