Fix random input detection issue.

This commit is contained in:
marqs committed 2016-06-22 23:22:59 +03:00
1 parent bab00679df
commit a2e10637bd
6 files changed
+901 -902

No files matched your search

@@ -388,6 +388,7 @@ void tvp_source_sel(tvp_input_t input, video_format fmt)
else // RGBS
tvp_writereg(TVP_SYNCCTRL1, 0x53);
usleep(1000);
sync_status = tvp_readreg(TVP_SYNCSTAT);
if (sync_status & (1<<7))
printf("%s detected, %s polarity\n", (sync_status & (1<<3)) ? "Csync" : "Hsync", (sync_status & (1<<5)) ? "pos" : "neg");
@@ -395,6 +396,7 @@ void tvp_source_sel(tvp_input_t input, video_format fmt)
printf("Vsync detected, %s polarity\n", (sync_status & (1<<2)) ? "pos" : "neg");
} else {
tvp_writereg(TVP_SYNCCTRL1, 0x5B);
usleep(1000);
sync_status = tvp_readreg(TVP_SYNCSTAT);
if (sync_status & (1<<1))
printf("SOG detected\n");