revert a small error in calling the tvp_set_alc() function and add missing changes in tvp7002.c/.h

This commit is contained in:
borti4938 2016-04-22 09:07:07 +02:00
parent 7b6c67cc4d
commit 5a4d6c798e
3 changed files with 5 additions and 4 deletions

View File

@ -137,9 +137,9 @@ typedef enum {
POST_COAST, POST_COAST,
SYNC_LPF, SYNC_LPF,
VIDEO_LPF, VIDEO_LPF,
DISABLE_ALC,
LINETRIPLE_ENABLE, LINETRIPLE_ENABLE,
LINETRIPLE_MODE, LINETRIPLE_MODE,
DISABLE_ALC,
TX_MODE, TX_MODE,
#ifndef DEBUG #ifndef DEBUG
FW_UPDATE, FW_UPDATE,
@ -220,9 +220,9 @@ const menuitem_t menu[] = {
{ POST_COAST, "H-PLL Post-Coast" }, { POST_COAST, "H-PLL Post-Coast" },
{ SYNC_LPF, "Analog sync LPF" }, { SYNC_LPF, "Analog sync LPF" },
{ VIDEO_LPF, "Video LPF" }, { VIDEO_LPF, "Video LPF" },
{ DISABLE_ALC, "Auto Lev. Contr." },
{ LINETRIPLE_ENABLE, "240p/288p lineX3" }, { LINETRIPLE_ENABLE, "240p/288p lineX3" },
{ LINETRIPLE_MODE, "Linetriple mode" }, { LINETRIPLE_MODE, "Linetriple mode" },
{ DISABLE_ALC, "Auto Lev. Contr." },
{ TX_MODE, "TX mode" }, { TX_MODE, "TX mode" },
#ifndef DEBUG #ifndef DEBUG
{ FW_UPDATE, "Firmware update" }, { FW_UPDATE, "Firmware update" },
@ -1079,7 +1079,7 @@ status_t get_status(tvp_input_t input)
if (tc.disable_alc != cm.cc.disable_alc) 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; cm.totlines = totlines;

View File

@ -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) { if (!disable_alc) {
tvp_writereg(TVP_ALCEN, 0x80); //enable ALC tvp_writereg(TVP_ALCEN, 0x80); //enable ALC

View File

@ -56,6 +56,7 @@ typedef struct {
static const alt_u32 clkrate[] = {27000000, 6500000}; //in MHz 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); inline alt_u32 tvp_readreg(alt_u32 regaddr);