static int set_disp_mode_auto(void) { int ret=-1; #ifndef AVOS const vinfo_t *info = get_current_vinfo(); #else vinfo_t* info=&lvideo_info; #endif HDMI_Video_Codes_t vic; //Prevent warning //msleep(500); vic = hdmitx_edid_get_VIC(&hdmitx_device, info->name, (hdmitx_device.disp_switch_config==DISP_SWITCH_FORCE)?1:0); hdmitx_device.cur_VIC = HDMI_Unkown; ret = hdmitx_set_display(&hdmitx_device, vic); //if vic is HDMI_Unkown, hdmitx_set_display will disable HDMI if(ret>=0){ hdmitx_device.cur_VIC = vic; hdmitx_device.audio_param_update_flag = 1; hdmi_authenticated = -1; hdmitx_device.auth_process_timer = AUTH_PROCESS_TIME; set_test_mode(); } if(hdmitx_device.cur_VIC == HDMI_Unkown){ if(hpdmode==2){ hdmitx_edid_clear(&hdmitx_device); /* edid will be read again when hpd is muxed and it is high */ hdmitx_device.mux_hpd_if_pin_high_flag = 0; } if(hdmitx_device.HWOp.Cntl){ hdmitx_device.HWOp.Cntl(&hdmitx_device, HDMITX_HWCMD_TURNOFF_HDMIHW, (hpdmode==2)?1:0); } } return ret; }
static RESULT cmd_test(const char** argv, int argc, GameContext* pContext, GameEventContext* pEvent) { // 列出/执行测试用例 if(argc < 2) { //param_error(argv[0]); //return R_E_PARAM; } if(argc < 2 || !strcmp(argv[1], "list") || !strcmp(argv[1], "l")) { // script_list_test script_test_list(); } else if(!strcmp(argv[1], "run") || !strcmp(argv[1], "r")) { // script_test_run(index) if(argc >= 3) { if (R_SUCC == script_test_run(pContext, atoi(argv[2]))) { set_test_mode(); } } else { if (R_SUCC == script_test_run(pContext, -1)) { set_test_mode(); } } } return R_DEF; }
static int set_disp_mode(const char *mode) { int ret=-1; HDMI_Video_Codes_t vic; vic = hdmitx_edid_get_VIC(&hdmitx_device, mode, 1); if(vic != HDMI_Unkown){ hdmitx_device.mux_hpd_if_pin_high_flag = 1; if(hdmitx_device.vic_count == 0){ if(hdmitx_device.unplug_powerdown){ return 0; } } } hdmitx_device.cur_VIC = HDMI_Unkown; ret = hdmitx_set_display(&hdmitx_device, vic); if(ret>=0){ hdmitx_device.cur_VIC = vic; hdmitx_device.audio_param_update_flag = 1; hdmi_authenticated = -1; hdmitx_device.auth_process_timer = AUTH_PROCESS_TIME; set_test_mode(); } if(hdmitx_device.cur_VIC == HDMI_Unkown){ if(hpdmode == 2){ hdmitx_edid_clear(&hdmitx_device); /* edid will be read again when hpd is muxed and it is high */ hdmitx_device.mux_hpd_if_pin_high_flag = 0; } if(hdmitx_device.HWOp.Cntl){ hdmitx_device.HWOp.Cntl(&hdmitx_device, HDMITX_HWCMD_TURNOFF_HDMIHW, (hpdmode==2)?1:0); } } return ret; }