diff --git a/mkapp/hal/HDZGOGGLE_RX.bin b/mkapp/hal/HDZGOGGLE_RX.bin index c642ecf..61fba82 100644 Binary files a/mkapp/hal/HDZGOGGLE_RX.bin and b/mkapp/hal/HDZGOGGLE_RX.bin differ diff --git a/mkapp/hal/HDZGOGGLE_VA.bin b/mkapp/hal/HDZGOGGLE_VA.bin index 7ecf11e..366008d 100644 Binary files a/mkapp/hal/HDZGOGGLE_VA.bin and b/mkapp/hal/HDZGOGGLE_VA.bin differ diff --git a/mkapp/hal/ver.txt b/mkapp/hal/ver.txt index b6afec2..ac3687f 100755 --- a/mkapp/hal/ver.txt +++ b/mkapp/hal/ver.txt @@ -1 +1 @@ -77-182 +76-184 diff --git a/src/core/app_state.c b/src/core/app_state.c index f22ee35..0f04112 100755 --- a/src/core/app_state.c +++ b/src/core/app_state.c @@ -79,6 +79,7 @@ void app_exit_menu() { } void app_switch_to_analog() { + system_exec("aww 0x0300b084 0x00001555"); // Set vdpo clock driver strength to level 2. Refer datasheet 12.7.5.11 Analog_Module_Power(0, 1); if (GOGGLE_VER_2) { @@ -112,6 +113,7 @@ void app_switch_to_analog() { system_script(REC_STOP_LIVE); } void app_switch_to_av_in() { + system_exec("aww 0x0300b084 0x00001555"); // Set vdpo clock driver strength to level 2. Refer datasheet 12.7.5.11 Analog_Module_Power(0, 0); Source_AV(0); @@ -134,6 +136,7 @@ void app_switch_to_av_in() { } void app_switch_to_hdmi_in() { + system_exec("aww 0x0300b084 0x00001555"); // Set vdpo clock driver strength to level 2. Refer datasheet 12.7.5.11 Analog_Module_Power(0, 0); Source_HDMI_in(); @@ -171,7 +174,7 @@ void app_switch_to_hdmi_in() { // false = user selected from auto scan page void app_switch_to_hdzero(bool is_default) { int ch; - + system_exec("aww 0x0300b084 0x00001555"); // Set vdpo clock driver strength to level 2. Refer datasheet 12.7.5.11 Analog_Module_Power(0, 0); if (is_default) { diff --git a/src/driver/hardware.c b/src/driver/hardware.c index a99b50c..7612054 100755 --- a/src/driver/hardware.c +++ b/src/driver/hardware.c @@ -475,7 +475,12 @@ void vclk_phase_set(video_source_t source, uint8_t reg_8d_sel) { else I2C_Write(ADDR_FPGA, 0x8d, (vclk_phase[source] >> 24) & 0xff); - I2C_Write(ADDR_FPGA, 0x8e, (vclk_phase[source] >> 16) & 0xff); + if (source == VIDEO_SOURCE_HDZERO_IN_720P60_50 || source == VIDEO_SOURCE_HDZERO_IN_720P90) { + I2C_Write(ADDR_FPGA, 0x8e, 0x01); + } else { + I2C_Write(ADDR_FPGA, 0x8e, (vclk_phase[source] >> 16) & 0xff); + } + I2C_Write(ADDR_AL, 0x14, (vclk_phase[source] >> 8) & 0xff); IT66121_set_phase(vclk_phase[source] & 3, 0); @@ -532,9 +537,9 @@ void pclk_phase_set(video_source_t source) { LOGI("pclk_phase_set %d", pclk_phase[source]); // bit[0] hdmi in if (source == VIDEO_SOURCE_HDMI_IN_1080P50 || source == VIDEO_SOURCE_HDMI_IN_1080P60 || source == VIDEO_SOURCE_HDMI_IN_1080POTHER) { - IT66021_Set_Pclk((pclk_phase[source] >> 0) & 1, 1); + IT66021_Set_Pclk((pclk_phase[source] >> 0) & 1); } else { - IT66021_Set_Pclk((pclk_phase[source] >> 0) & 1, 2); + IT66021_Set_Pclk((pclk_phase[source] >> 0) & 1); } // bit[1] analog in @@ -611,7 +616,7 @@ void Display_UI_init() { I2C_Write(ADDR_FPGA, 0x84, 0x11); OLED_SetTMG(0); - system_exec("aww 0x0300b084 0x00015565"); // Set vdpo clock driver strength to level 2. Refer datasheet 12.7.5.11 + system_exec("aww 0x0300b084 0x00002aaa"); // Set vdpo clock driver strength to level 2. Refer datasheet 12.7.5.11 if (GOGGLE_VER_2) I2C_Write(ADDR_FPGA, 0xa7, 0x00); diff --git a/src/driver/it66021.c b/src/driver/it66021.c index 41cb0b5..26ff6dc 100755 --- a/src/driver/it66021.c +++ b/src/driver/it66021.c @@ -340,10 +340,6 @@ void IT66021_edid() { I2C_L_Write(0x49, 0xc0, 0x04); } -void IT66021_Set_Pclk(int inv, int dly) { - IT66021_Mask_WR(0, 0x0f, 0x03, 0x00); - if (inv) - I2C_L_Write(ADDR_IT66021, 0x50, 0xA0 + dly); - else - I2C_L_Write(ADDR_IT66021, 0x50, 0xB0 + dly); +void IT66021_Set_Pclk(int inv) { + I2C_L_Write(ADDR_IT66021, 0x50, 0xB0); } \ No newline at end of file diff --git a/src/driver/it66021.h b/src/driver/it66021.h index 98ce479..80a4f10 100755 --- a/src/driver/it66021.h +++ b/src/driver/it66021.h @@ -14,7 +14,7 @@ void IT66021_Set_CSMatrix(int cs); int IT66021_Get_PCLKFREQ(); void IT66021_edid(); -void IT66021_Set_Pclk(int inv, int dly); +void IT66021_Set_Pclk(int inv); #ifdef __cplusplus }