diff options
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-cards.c')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-cards.c | 86 |
1 files changed, 68 insertions, 18 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index c36d3f632104..2cda15f829fd 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <media/cx25840.h> | 26 | #include <media/cx25840.h> |
27 | 27 | ||
28 | #include "cx23885.h" | 28 | #include "cx23885.h" |
29 | #include "tuner-xc2028.h" | ||
29 | 30 | ||
30 | /* ------------------------------------------------------------------ */ | 31 | /* ------------------------------------------------------------------ */ |
31 | /* board config info */ | 32 | /* board config info */ |
@@ -148,6 +149,15 @@ struct cx23885_board cx23885_boards[] = { | |||
148 | .portb = CX23885_MPEG_DVB, | 149 | .portb = CX23885_MPEG_DVB, |
149 | .portc = CX23885_MPEG_DVB, | 150 | .portc = CX23885_MPEG_DVB, |
150 | }, | 151 | }, |
152 | [CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP] = { | ||
153 | .name = "DViCO FusionHDTV DVB-T Dual Express", | ||
154 | .portb = CX23885_MPEG_DVB, | ||
155 | .portc = CX23885_MPEG_DVB, | ||
156 | }, | ||
157 | [CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H] = { | ||
158 | .name = "Leadtek Winfast PxDVR3200 H", | ||
159 | .portc = CX23885_MPEG_DVB, | ||
160 | }, | ||
151 | }; | 161 | }; |
152 | const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); | 162 | const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); |
153 | 163 | ||
@@ -219,6 +229,14 @@ struct cx23885_subid cx23885_subids[] = { | |||
219 | .subvendor = 0x18ac, | 229 | .subvendor = 0x18ac, |
220 | .subdevice = 0xd618, | 230 | .subdevice = 0xd618, |
221 | .card = CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP, | 231 | .card = CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP, |
232 | },{ | ||
233 | .subvendor = 0x18ac, | ||
234 | .subdevice = 0xdb78, | ||
235 | .card = CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP, | ||
236 | }, { | ||
237 | .subvendor = 0x107d, | ||
238 | .subdevice = 0x6681, | ||
239 | .card = CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H, | ||
222 | }, | 240 | }, |
223 | }; | 241 | }; |
224 | const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); | 242 | const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); |
@@ -319,15 +337,15 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data) | |||
319 | dev->name, tv.model); | 337 | dev->name, tv.model); |
320 | } | 338 | } |
321 | 339 | ||
322 | /* Tuner callback function for cx23885 boards. Currently only needed | 340 | int cx23885_tuner_callback(void *priv, int component, int command, int arg) |
323 | * for HVR1500Q, which has an xc5000 tuner. | ||
324 | */ | ||
325 | int cx23885_tuner_callback(void *priv, int command, int arg) | ||
326 | { | 341 | { |
327 | struct cx23885_i2c *bus = priv; | 342 | struct cx23885_tsport *port = priv; |
328 | struct cx23885_dev *dev = bus->dev; | 343 | struct cx23885_dev *dev = port->dev; |
329 | u32 bitmask = 0; | 344 | u32 bitmask = 0; |
330 | 345 | ||
346 | if (command == XC2028_RESET_CLK) | ||
347 | return 0; | ||
348 | |||
331 | if (command != 0) { | 349 | if (command != 0) { |
332 | printk(KERN_ERR "%s(): Unknown command 0x%x.\n", | 350 | printk(KERN_ERR "%s(): Unknown command 0x%x.\n", |
333 | __func__, command); | 351 | __func__, command); |
@@ -335,21 +353,21 @@ int cx23885_tuner_callback(void *priv, int command, int arg) | |||
335 | } | 353 | } |
336 | 354 | ||
337 | switch(dev->board) { | 355 | switch(dev->board) { |
356 | case CX23885_BOARD_HAUPPAUGE_HVR1400: | ||
357 | case CX23885_BOARD_HAUPPAUGE_HVR1500: | ||
338 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: | 358 | case CX23885_BOARD_HAUPPAUGE_HVR1500Q: |
339 | /* Tuner Reset Command from xc5000 */ | 359 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: |
340 | if (command == 0) | 360 | /* Tuner Reset Command */ |
341 | bitmask = 0x04; | 361 | bitmask = 0x04; |
342 | break; | 362 | break; |
343 | case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP: | 363 | case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP: |
344 | if (command == 0) { | 364 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: |
345 | 365 | /* Two identical tuners on two different i2c buses, | |
346 | /* Two identical tuners on two different i2c buses, | 366 | * we need to reset the correct gpio. */ |
347 | * we need to reset the correct gpio. */ | 367 | if (port->nr == 0) |
348 | if (bus->nr == 0) | 368 | bitmask = 0x01; |
349 | bitmask = 0x01; | 369 | else if (port->nr == 1) |
350 | else if (bus->nr == 1) | 370 | bitmask = 0x04; |
351 | bitmask = 0x04; | ||
352 | } | ||
353 | break; | 371 | break; |
354 | } | 372 | } |
355 | 373 | ||
@@ -465,6 +483,32 @@ void cx23885_gpio_setup(struct cx23885_dev *dev) | |||
465 | mdelay(20); | 483 | mdelay(20); |
466 | cx_set(GP0_IO, 0x000f000f); | 484 | cx_set(GP0_IO, 0x000f000f); |
467 | break; | 485 | break; |
486 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: | ||
487 | /* GPIO-0 portb xc3028 reset */ | ||
488 | /* GPIO-1 portb zl10353 reset */ | ||
489 | /* GPIO-2 portc xc3028 reset */ | ||
490 | /* GPIO-3 portc zl10353 reset */ | ||
491 | |||
492 | /* Put the parts into reset and back */ | ||
493 | cx_set(GP0_IO, 0x000f0000); | ||
494 | mdelay(20); | ||
495 | cx_clear(GP0_IO, 0x0000000f); | ||
496 | mdelay(20); | ||
497 | cx_set(GP0_IO, 0x000f000f); | ||
498 | break; | ||
499 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: | ||
500 | /* GPIO-2 xc3028 tuner reset */ | ||
501 | |||
502 | /* The following GPIO's are on the internal AVCore (cx25840) */ | ||
503 | /* GPIO-? zl10353 demod reset */ | ||
504 | |||
505 | /* Put the parts into reset and back */ | ||
506 | cx_set(GP0_IO, 0x00040000); | ||
507 | mdelay(20); | ||
508 | cx_clear(GP0_IO, 0x00000004); | ||
509 | mdelay(20); | ||
510 | cx_set(GP0_IO, 0x00040004); | ||
511 | break; | ||
468 | } | 512 | } |
469 | } | 513 | } |
470 | 514 | ||
@@ -479,6 +523,9 @@ int cx23885_ir_init(struct cx23885_dev *dev) | |||
479 | case CX23885_BOARD_HAUPPAUGE_HVR1400: | 523 | case CX23885_BOARD_HAUPPAUGE_HVR1400: |
480 | /* FIXME: Implement me */ | 524 | /* FIXME: Implement me */ |
481 | break; | 525 | break; |
526 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: | ||
527 | request_module("ir-kbd-i2c"); | ||
528 | break; | ||
482 | } | 529 | } |
483 | 530 | ||
484 | return 0; | 531 | return 0; |
@@ -516,6 +563,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) | |||
516 | 563 | ||
517 | switch (dev->board) { | 564 | switch (dev->board) { |
518 | case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP: | 565 | case CX23885_BOARD_DVICO_FUSIONHDTV_7_DUAL_EXP: |
566 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: | ||
519 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ | 567 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ |
520 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ | 568 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
521 | ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; | 569 | ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; |
@@ -548,6 +596,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) | |||
548 | case CX23885_BOARD_HAUPPAUGE_HVR1200: | 596 | case CX23885_BOARD_HAUPPAUGE_HVR1200: |
549 | case CX23885_BOARD_HAUPPAUGE_HVR1700: | 597 | case CX23885_BOARD_HAUPPAUGE_HVR1700: |
550 | case CX23885_BOARD_HAUPPAUGE_HVR1400: | 598 | case CX23885_BOARD_HAUPPAUGE_HVR1400: |
599 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: | ||
551 | default: | 600 | default: |
552 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ | 601 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ |
553 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ | 602 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
@@ -561,6 +610,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) | |||
561 | case CX23885_BOARD_HAUPPAUGE_HVR1800: | 610 | case CX23885_BOARD_HAUPPAUGE_HVR1800: |
562 | case CX23885_BOARD_HAUPPAUGE_HVR1800lp: | 611 | case CX23885_BOARD_HAUPPAUGE_HVR1800lp: |
563 | case CX23885_BOARD_HAUPPAUGE_HVR1700: | 612 | case CX23885_BOARD_HAUPPAUGE_HVR1700: |
613 | case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: | ||
564 | request_module("cx25840"); | 614 | request_module("cx25840"); |
565 | break; | 615 | break; |
566 | } | 616 | } |