diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/saa7115.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index 7ba3714bf2a0..974179d4d389 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c | |||
@@ -155,7 +155,7 @@ static inline int saa711x_read(struct i2c_client *client, u8 reg) | |||
155 | /* ----------------------------------------------------------------------- */ | 155 | /* ----------------------------------------------------------------------- */ |
156 | 156 | ||
157 | /* SAA7111 initialization table */ | 157 | /* SAA7111 initialization table */ |
158 | static const unsigned char saa7111_init_auto_input[] = { | 158 | static const unsigned char saa7111_init[] = { |
159 | R_01_INC_DELAY, 0x00, /* reserved */ | 159 | R_01_INC_DELAY, 0x00, /* reserved */ |
160 | 160 | ||
161 | /*front end */ | 161 | /*front end */ |
@@ -195,7 +195,7 @@ static const unsigned char saa7111_init_auto_input[] = { | |||
195 | }; | 195 | }; |
196 | 196 | ||
197 | /* SAA7113 init codes */ | 197 | /* SAA7113 init codes */ |
198 | static const unsigned char saa7113_init_auto_input[] = { | 198 | static const unsigned char saa7113_init[] = { |
199 | R_01_INC_DELAY, 0x08, | 199 | R_01_INC_DELAY, 0x08, |
200 | R_02_INPUT_CNTL_1, 0xc2, | 200 | R_02_INPUT_CNTL_1, 0xc2, |
201 | R_03_INPUT_CNTL_2, 0x30, | 201 | R_03_INPUT_CNTL_2, 0x30, |
@@ -237,6 +237,7 @@ static const unsigned char saa7115_init_auto_input[] = { | |||
237 | /* Decoder Part */ | 237 | /* Decoder Part */ |
238 | R_06_H_SYNC_START, 0xeb, /* horiz sync begin = -21 */ | 238 | R_06_H_SYNC_START, 0xeb, /* horiz sync begin = -21 */ |
239 | R_07_H_SYNC_STOP, 0xe0, /* horiz sync stop = -17 */ | 239 | R_07_H_SYNC_STOP, 0xe0, /* horiz sync stop = -17 */ |
240 | R_09_LUMA_CNTL, 0x53, /* 0x53, was 0x56 for 60hz. luminance control */ | ||
240 | R_0A_LUMA_BRIGHT_CNTL, 0x80, /* was 0x88. decoder brightness, 0x80 is itu standard */ | 241 | R_0A_LUMA_BRIGHT_CNTL, 0x80, /* was 0x88. decoder brightness, 0x80 is itu standard */ |
241 | R_0B_LUMA_CONTRAST_CNTL, 0x44, /* was 0x48. decoder contrast, 0x44 is itu standard */ | 242 | R_0B_LUMA_CONTRAST_CNTL, 0x44, /* was 0x48. decoder contrast, 0x44 is itu standard */ |
242 | R_0C_CHROMA_SAT_CNTL, 0x40, /* was 0x47. decoder saturation, 0x40 is itu standard */ | 243 | R_0C_CHROMA_SAT_CNTL, 0x40, /* was 0x47. decoder saturation, 0x40 is itu standard */ |
@@ -582,7 +583,6 @@ static const unsigned char saa7115_init_misc[] = { | |||
582 | R_5E_SDID, 0x35, | 583 | R_5E_SDID, 0x35, |
583 | 584 | ||
584 | R_02_INPUT_CNTL_1, 0x84, /* input tuner -> input 4, amplifier active */ | 585 | R_02_INPUT_CNTL_1, 0x84, /* input tuner -> input 4, amplifier active */ |
585 | R_09_LUMA_CNTL, 0x53, /* 0x53, was 0x56 for 60hz. luminance control */ | ||
586 | 586 | ||
587 | R_80_GLOBAL_CNTL_1, 0x20, /* enable task B */ | 587 | R_80_GLOBAL_CNTL_1, 0x20, /* enable task B */ |
588 | R_88_POWER_SAVE_ADC_PORT_CNTL, 0xd0, | 588 | R_88_POWER_SAVE_ADC_PORT_CNTL, 0xd0, |
@@ -1518,11 +1518,15 @@ static int saa711x_attach(struct i2c_adapter *adapter, int address, int kind) | |||
1518 | v4l_dbg(1, debug, client, "writing init values\n"); | 1518 | v4l_dbg(1, debug, client, "writing init values\n"); |
1519 | 1519 | ||
1520 | /* init to 60hz/48khz */ | 1520 | /* init to 60hz/48khz */ |
1521 | if (state->ident == V4L2_IDENT_SAA7111 || | 1521 | state->crystal_freq = SAA7115_FREQ_24_576_MHZ; |
1522 | state->ident == V4L2_IDENT_SAA7113) { | 1522 | switch (state->ident) { |
1523 | state->crystal_freq = SAA7115_FREQ_24_576_MHZ; | 1523 | case V4L2_IDENT_SAA7111: |
1524 | saa711x_writeregs(client, saa7113_init_auto_input); | 1524 | saa711x_writeregs(client, saa7111_init); |
1525 | } else { | 1525 | break; |
1526 | case V4L2_IDENT_SAA7113: | ||
1527 | saa711x_writeregs(client, saa7113_init); | ||
1528 | break; | ||
1529 | default: | ||
1526 | state->crystal_freq = SAA7115_FREQ_32_11_MHZ; | 1530 | state->crystal_freq = SAA7115_FREQ_32_11_MHZ; |
1527 | saa711x_writeregs(client, saa7115_init_auto_input); | 1531 | saa711x_writeregs(client, saa7115_init_auto_input); |
1528 | } | 1532 | } |