diff --git a/software/sys_controller/av_controller.c b/software/sys_controller/av_controller.c index f61e511..fc1a244 100755 --- a/software/sys_controller/av_controller.c +++ b/software/sys_controller/av_controller.c @@ -137,9 +137,9 @@ typedef enum { POST_COAST, SYNC_LPF, VIDEO_LPF, + DISABLE_ALC, LINETRIPLE_ENABLE, LINETRIPLE_MODE, - DISABLE_ALC, TX_MODE, #ifndef DEBUG FW_UPDATE, @@ -220,9 +220,9 @@ const menuitem_t menu[] = { { POST_COAST, "H-PLL Post-Coast" }, { SYNC_LPF, "Analog sync LPF" }, { VIDEO_LPF, "Video LPF" }, + { DISABLE_ALC, "Auto Lev. Contr." }, { LINETRIPLE_ENABLE, "240p/288p lineX3" }, { LINETRIPLE_MODE, "Linetriple mode" }, - { DISABLE_ALC, "Auto Lev. Contr." }, { TX_MODE, "TX mode" }, #ifndef DEBUG { FW_UPDATE, "Firmware update" }, @@ -1079,7 +1079,7 @@ status_t get_status(tvp_input_t input) if (tc.disable_alc != cm.cc.disable_alc) - tvp_set_alc(target_type, tc.disable_alc); + tvp_set_alc(tc.disable_alc, target_type); cm.totlines = totlines; diff --git a/software/sys_controller/tvp7002/tvp7002.c b/software/sys_controller/tvp7002/tvp7002.c index cf4c7d8..0a2b156 100755 --- a/software/sys_controller/tvp7002/tvp7002.c +++ b/software/sys_controller/tvp7002/tvp7002.c @@ -85,7 +85,7 @@ static void tvp_set_clamp_position(video_type type) } } -static void tvp_set_alc(alt_u8 disable_alc, video_type type) +void tvp_set_alc(alt_u8 disable_alc, video_type type) { if (!disable_alc) { tvp_writereg(TVP_ALCEN, 0x80); //enable ALC diff --git a/software/sys_controller/tvp7002/tvp7002.h b/software/sys_controller/tvp7002/tvp7002.h index 3ba9afb..af2f7d6 100755 --- a/software/sys_controller/tvp7002/tvp7002.h +++ b/software/sys_controller/tvp7002/tvp7002.h @@ -56,6 +56,7 @@ typedef struct { static const alt_u32 clkrate[] = {27000000, 6500000}; //in MHz +void tvp_set_alc(alt_u8 disable_alc, video_type type); inline alt_u32 tvp_readreg(alt_u32 regaddr);