diff options
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/bttv-cards.c | 4 | ||||
-rw-r--r-- | drivers/media/video/vpx3220.c | 32 |
2 files changed, 22 insertions, 14 deletions
diff --git a/drivers/media/video/bttv-cards.c b/drivers/media/video/bttv-cards.c index 6c332800d6ab..0881a17d5226 100644 --- a/drivers/media/video/bttv-cards.c +++ b/drivers/media/video/bttv-cards.c | |||
@@ -2393,10 +2393,10 @@ struct tvcard bttv_tvcards[] = { | |||
2393 | .tuner = 0, | 2393 | .tuner = 0, |
2394 | .tuner_type = TUNER_LG_TDVS_H062F, | 2394 | .tuner_type = TUNER_LG_TDVS_H062F, |
2395 | .tuner_addr = ADDR_UNSET, | 2395 | .tuner_addr = ADDR_UNSET, |
2396 | .video_inputs = 2, | 2396 | .video_inputs = 3, |
2397 | .audio_inputs = 1, | 2397 | .audio_inputs = 1, |
2398 | .svhs = 2, | 2398 | .svhs = 2, |
2399 | .muxsel = { 2, 3 }, | 2399 | .muxsel = { 2, 3, 1 }, |
2400 | .gpiomask = 0x00e00007, | 2400 | .gpiomask = 0x00e00007, |
2401 | .audiomux = { 0x00400005, 0, 0x00000001, 0, 0x00c00007, 0 }, | 2401 | .audiomux = { 0x00400005, 0, 0x00000001, 0, 0x00c00007, 0 }, |
2402 | .no_msp34xx = 1, | 2402 | .no_msp34xx = 1, |
diff --git a/drivers/media/video/vpx3220.c b/drivers/media/video/vpx3220.c index 4437bdebe24f..137b58f2c666 100644 --- a/drivers/media/video/vpx3220.c +++ b/drivers/media/video/vpx3220.c | |||
@@ -203,7 +203,7 @@ static const unsigned short init_ntsc[] = { | |||
203 | 0x8c, 640, /* Horizontal length */ | 203 | 0x8c, 640, /* Horizontal length */ |
204 | 0x8d, 640, /* Number of pixels */ | 204 | 0x8d, 640, /* Number of pixels */ |
205 | 0x8f, 0xc00, /* Disable window 2 */ | 205 | 0x8f, 0xc00, /* Disable window 2 */ |
206 | 0xf0, 0x173, /* 13.5 MHz transport, Forced | 206 | 0xf0, 0x73, /* 13.5 MHz transport, Forced |
207 | * mode, latch windows */ | 207 | * mode, latch windows */ |
208 | 0xf2, 0x13, /* NTSC M, composite input */ | 208 | 0xf2, 0x13, /* NTSC M, composite input */ |
209 | 0xe7, 0x1e1, /* Enable vertical standard | 209 | 0xe7, 0x1e1, /* Enable vertical standard |
@@ -212,38 +212,36 @@ static const unsigned short init_ntsc[] = { | |||
212 | 212 | ||
213 | static const unsigned short init_pal[] = { | 213 | static const unsigned short init_pal[] = { |
214 | 0x88, 23, /* Window 1 vertical begin */ | 214 | 0x88, 23, /* Window 1 vertical begin */ |
215 | 0x89, 288 + 16, /* Vertical lines in (16 lines | 215 | 0x89, 288, /* Vertical lines in (16 lines |
216 | * skipped by the VFE) */ | 216 | * skipped by the VFE) */ |
217 | 0x8a, 288 + 16, /* Vertical lines out (16 lines | 217 | 0x8a, 288, /* Vertical lines out (16 lines |
218 | * skipped by the VFE) */ | 218 | * skipped by the VFE) */ |
219 | 0x8b, 16, /* Horizontal begin */ | 219 | 0x8b, 16, /* Horizontal begin */ |
220 | 0x8c, 768, /* Horizontal length */ | 220 | 0x8c, 768, /* Horizontal length */ |
221 | 0x8d, 784, /* Number of pixels | 221 | 0x8d, 784, /* Number of pixels |
222 | * Must be >= Horizontal begin + Horizontal length */ | 222 | * Must be >= Horizontal begin + Horizontal length */ |
223 | 0x8f, 0xc00, /* Disable window 2 */ | 223 | 0x8f, 0xc00, /* Disable window 2 */ |
224 | 0xf0, 0x177, /* 13.5 MHz transport, Forced | 224 | 0xf0, 0x77, /* 13.5 MHz transport, Forced |
225 | * mode, latch windows */ | 225 | * mode, latch windows */ |
226 | 0xf2, 0x3d1, /* PAL B,G,H,I, composite input */ | 226 | 0xf2, 0x3d1, /* PAL B,G,H,I, composite input */ |
227 | 0xe7, 0x261, /* PAL/SECAM set to 288 + 16 lines | 227 | 0xe7, 0x241, /* PAL/SECAM set to 288 lines */ |
228 | * change to 0x241 for 288 lines */ | ||
229 | }; | 228 | }; |
230 | 229 | ||
231 | static const unsigned short init_secam[] = { | 230 | static const unsigned short init_secam[] = { |
232 | 0x88, 23 - 16, /* Window 1 vertical begin */ | 231 | 0x88, 23, /* Window 1 vertical begin */ |
233 | 0x89, 288 + 16, /* Vertical lines in (16 lines | 232 | 0x89, 288, /* Vertical lines in (16 lines |
234 | * skipped by the VFE) */ | 233 | * skipped by the VFE) */ |
235 | 0x8a, 288 + 16, /* Vertical lines out (16 lines | 234 | 0x8a, 288, /* Vertical lines out (16 lines |
236 | * skipped by the VFE) */ | 235 | * skipped by the VFE) */ |
237 | 0x8b, 16, /* Horizontal begin */ | 236 | 0x8b, 16, /* Horizontal begin */ |
238 | 0x8c, 768, /* Horizontal length */ | 237 | 0x8c, 768, /* Horizontal length */ |
239 | 0x8d, 784, /* Number of pixels | 238 | 0x8d, 784, /* Number of pixels |
240 | * Must be >= Horizontal begin + Horizontal length */ | 239 | * Must be >= Horizontal begin + Horizontal length */ |
241 | 0x8f, 0xc00, /* Disable window 2 */ | 240 | 0x8f, 0xc00, /* Disable window 2 */ |
242 | 0xf0, 0x177, /* 13.5 MHz transport, Forced | 241 | 0xf0, 0x77, /* 13.5 MHz transport, Forced |
243 | * mode, latch windows */ | 242 | * mode, latch windows */ |
244 | 0xf2, 0x3d5, /* SECAM, composite input */ | 243 | 0xf2, 0x3d5, /* SECAM, composite input */ |
245 | 0xe7, 0x261, /* PAL/SECAM set to 288 + 16 lines | 244 | 0xe7, 0x241, /* PAL/SECAM set to 288 lines */ |
246 | * change to 0x241 for 288 lines */ | ||
247 | }; | 245 | }; |
248 | 246 | ||
249 | static const unsigned char init_common[] = { | 247 | static const unsigned char init_common[] = { |
@@ -410,6 +408,12 @@ vpx3220_command (struct i2c_client *client, | |||
410 | case DECODER_SET_NORM: | 408 | case DECODER_SET_NORM: |
411 | { | 409 | { |
412 | int *iarg = arg, data; | 410 | int *iarg = arg, data; |
411 | int temp_input; | ||
412 | |||
413 | /* Here we back up the input selection because it gets | ||
414 | overwritten when we fill the registers with the | ||
415 | choosen video norm */ | ||
416 | temp_input = vpx3220_fp_read(client, 0xf2); | ||
413 | 417 | ||
414 | dprintk(1, KERN_DEBUG "%s: DECODER_SET_NORM %d\n", | 418 | dprintk(1, KERN_DEBUG "%s: DECODER_SET_NORM %d\n", |
415 | I2C_NAME(client), *iarg); | 419 | I2C_NAME(client), *iarg); |
@@ -449,6 +453,10 @@ vpx3220_command (struct i2c_client *client, | |||
449 | 453 | ||
450 | } | 454 | } |
451 | decoder->norm = *iarg; | 455 | decoder->norm = *iarg; |
456 | |||
457 | /* And here we set the backed up video input again */ | ||
458 | vpx3220_fp_write(client, 0xf2, temp_input | 0x0010); | ||
459 | udelay(10); | ||
452 | } | 460 | } |
453 | break; | 461 | break; |
454 | 462 | ||