diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-12 20:02:09 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-12 20:02:09 -0300 |
commit | 0b8c00434bd885aefcf8d76a532e0599ae0a270b (patch) | |
tree | 66715c7d51d05067690bcc0e0059babcdac7d552 /linux/drivers/media/video | |
parent | 6eb293db78dfbf0a4311279cdb444ef3f9a287a7 (diff) | |
download | mediapointer-dvb-s2-0b8c00434bd885aefcf8d76a532e0599ae0a270b.tar.gz mediapointer-dvb-s2-0b8c00434bd885aefcf8d76a532e0599ae0a270b.tar.bz2 |
On saa7111/7113, LUMA_CTRL need a different value
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Also sends the proper saa71111 init table.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/saa7115.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c index d3fc82b34..0a90806e6 100644 --- a/linux/drivers/media/video/saa7115.c +++ b/linux/drivers/media/video/saa7115.c @@ -166,7 +166,7 @@ static inline int saa711x_read(struct i2c_client *client, u8 reg) /* ----------------------------------------------------------------------- */ /* SAA7111 initialization table */ -static const unsigned char saa7111_init_auto_input[] = { +static const unsigned char saa7111_init[] = { R_01_INC_DELAY, 0x00, /* reserved */ /*front end */ @@ -206,7 +206,7 @@ static const unsigned char saa7111_init_auto_input[] = { }; /* SAA7113 init codes */ -static const unsigned char saa7113_init_auto_input[] = { +static const unsigned char saa7113_init[] = { R_01_INC_DELAY, 0x08, R_02_INPUT_CNTL_1, 0xc2, R_03_INPUT_CNTL_2, 0x30, @@ -248,6 +248,7 @@ static const unsigned char saa7115_init_auto_input[] = { /* Decoder Part */ R_06_H_SYNC_START, 0xeb, /* horiz sync begin = -21 */ R_07_H_SYNC_STOP, 0xe0, /* horiz sync stop = -17 */ + R_09_LUMA_CNTL, 0x53, /* 0x53, was 0x56 for 60hz. luminance control */ R_0A_LUMA_BRIGHT_CNTL, 0x80, /* was 0x88. decoder brightness, 0x80 is itu standard */ R_0B_LUMA_CONTRAST_CNTL, 0x44, /* was 0x48. decoder contrast, 0x44 is itu standard */ R_0C_CHROMA_SAT_CNTL, 0x40, /* was 0x47. decoder saturation, 0x40 is itu standard */ @@ -593,7 +594,6 @@ static const unsigned char saa7115_init_misc[] = { R_5E_SDID, 0x35, R_02_INPUT_CNTL_1, 0x84, /* input tuner -> input 4, amplifier active */ - R_09_LUMA_CNTL, 0x53, /* 0x53, was 0x56 for 60hz. luminance control */ R_80_GLOBAL_CNTL_1, 0x20, /* enable task B */ R_88_POWER_SAVE_ADC_PORT_CNTL, 0xd0, @@ -1537,11 +1537,15 @@ static int saa711x_attach(struct i2c_adapter *adapter, int address, int kind) v4l_dbg(1, debug, client, "writing init values\n"); /* init to 60hz/48khz */ - if (state->ident == V4L2_IDENT_SAA7111 || - state->ident == V4L2_IDENT_SAA7113) { - state->crystal_freq = SAA7115_FREQ_24_576_MHZ; - saa711x_writeregs(client, saa7113_init_auto_input); - } else { + state->crystal_freq = SAA7115_FREQ_24_576_MHZ; + switch (state->ident) { + case V4L2_IDENT_SAA7111: + saa711x_writeregs(client, saa7111_init); + break; + case V4L2_IDENT_SAA7113: + saa711x_writeregs(client, saa7113_init); + break; + default: state->crystal_freq = SAA7115_FREQ_32_11_MHZ; saa711x_writeregs(client, saa7115_init_auto_input); } |