diff options
author | Steven Toth <stoth@linuxtv.org> | 2008-09-04 00:17:33 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:37:03 -0400 |
commit | 5bd1b66359437864e6b46420ba6770c2b1c4362c (patch) | |
tree | 610860306d4a0c40456ef6b7b12904251880ddbd | |
parent | 0d46748c3f874defbbbf98bcf40c7b18964abbc0 (diff) |
V4L/DVB (8987): cx88: Add support for the Hauppauge HVR4000 and HVR4000-LITE (S2) boards
Adding support for Hauppauge's cx88 S2 based products, based on the
cx24116 DVB-S2 demodulator.
Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | Documentation/video4linux/CARDLIST.cx88 | 2 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-cards.c | 79 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-dvb.c | 42 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-input.c | 4 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88.h | 2 |
5 files changed, 129 insertions, 0 deletions
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88 index 7cf5685d3645..c95a2fb70c30 100644 --- a/Documentation/video4linux/CARDLIST.cx88 +++ b/Documentation/video4linux/CARDLIST.cx88 | |||
@@ -66,3 +66,5 @@ | |||
66 | 65 -> DViCO FusionHDTV 7 Gold [18ac:d610] | 66 | 65 -> DViCO FusionHDTV 7 Gold [18ac:d610] |
67 | 66 -> Prolink Pixelview MPEG 8000GT [1554:4935] | 67 | 66 -> Prolink Pixelview MPEG 8000GT [1554:4935] |
68 | 67 -> Kworld PlusTV HD PCI 120 (ATSC 120) [17de:08c1] | 68 | 67 -> Kworld PlusTV HD PCI 120 (ATSC 120) [17de:08c1] |
69 | 68 -> Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid [0070:6900,0070:6904,0070:6902] | ||
70 | 69 -> Hauppauge WinTV-HVR4000(Lite) DVB-S/S2 [0070:6905,0070:6906] | ||
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c index de199a206a15..538967e32284 100644 --- a/drivers/media/video/cx88/cx88-cards.c +++ b/drivers/media/video/cx88/cx88-cards.c | |||
@@ -1664,6 +1664,51 @@ static const struct cx88_board cx88_boards[] = { | |||
1664 | }, | 1664 | }, |
1665 | .mpeg = CX88_MPEG_DVB, | 1665 | .mpeg = CX88_MPEG_DVB, |
1666 | }, | 1666 | }, |
1667 | [CX88_BOARD_HAUPPAUGE_HVR4000] = { | ||
1668 | .name = "Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid", | ||
1669 | .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3, | ||
1670 | .radio_type = UNSET, | ||
1671 | .tuner_addr = ADDR_UNSET, | ||
1672 | .radio_addr = ADDR_UNSET, | ||
1673 | .tda9887_conf = TDA9887_PRESENT, | ||
1674 | /* | ||
1675 | * GPIO0 (WINTV2000) | ||
1676 | * | ||
1677 | * Analogue SAT DVB-T | ||
1678 | * Antenna 0xc4bf 0xc4bb | ||
1679 | * Composite 0xc4bf 0xc4bb | ||
1680 | * S-Video 0xc4bf 0xc4bb | ||
1681 | * Composite1 0xc4ff 0xc4fb | ||
1682 | * S-Video1 0xc4ff 0xc4fb | ||
1683 | */ | ||
1684 | .input = {{ | ||
1685 | .type = CX88_VMUX_TELEVISION, | ||
1686 | .vmux = 0, | ||
1687 | .gpio0 = 0xc4bf, | ||
1688 | }, { | ||
1689 | .type = CX88_VMUX_COMPOSITE1, | ||
1690 | .vmux = 1, | ||
1691 | .gpio0 = 0xc4bf, | ||
1692 | }, { | ||
1693 | .type = CX88_VMUX_SVIDEO, | ||
1694 | .vmux = 2, | ||
1695 | .gpio0 = 0xc4bf, | ||
1696 | } }, | ||
1697 | /* fixme: Add radio support */ | ||
1698 | .mpeg = CX88_MPEG_DVB, | ||
1699 | }, | ||
1700 | [CX88_BOARD_HAUPPAUGE_HVR4000LITE] = { | ||
1701 | .name = "Hauppauge WinTV-HVR4000(Lite) DVB-S/S2", | ||
1702 | .tuner_type = UNSET, | ||
1703 | .radio_type = UNSET, | ||
1704 | .tuner_addr = ADDR_UNSET, | ||
1705 | .radio_addr = ADDR_UNSET, | ||
1706 | .input = {{ | ||
1707 | .type = CX88_VMUX_DVB, | ||
1708 | .vmux = 0, | ||
1709 | } }, | ||
1710 | .mpeg = CX88_MPEG_DVB, | ||
1711 | }, | ||
1667 | }; | 1712 | }; |
1668 | 1713 | ||
1669 | /* ------------------------------------------------------------------ */ | 1714 | /* ------------------------------------------------------------------ */ |
@@ -2013,6 +2058,26 @@ static const struct cx88_subid cx88_subids[] = { | |||
2013 | .subvendor = 0x17de, | 2058 | .subvendor = 0x17de, |
2014 | .subdevice = 0x08c1, | 2059 | .subdevice = 0x08c1, |
2015 | .card = CX88_BOARD_KWORLD_ATSC_120, | 2060 | .card = CX88_BOARD_KWORLD_ATSC_120, |
2061 | }, { | ||
2062 | .subvendor = 0x0070, | ||
2063 | .subdevice = 0x6900, | ||
2064 | .card = CX88_BOARD_HAUPPAUGE_HVR4000, | ||
2065 | }, { | ||
2066 | .subvendor = 0x0070, | ||
2067 | .subdevice = 0x6904, | ||
2068 | .card = CX88_BOARD_HAUPPAUGE_HVR4000, | ||
2069 | }, { | ||
2070 | .subvendor = 0x0070, | ||
2071 | .subdevice = 0x6902, | ||
2072 | .card = CX88_BOARD_HAUPPAUGE_HVR4000, | ||
2073 | }, { | ||
2074 | .subvendor = 0x0070, | ||
2075 | .subdevice = 0x6905, | ||
2076 | .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE, | ||
2077 | }, { | ||
2078 | .subvendor = 0x0070, | ||
2079 | .subdevice = 0x6906, | ||
2080 | .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE, | ||
2016 | }, | 2081 | }, |
2017 | }; | 2082 | }; |
2018 | 2083 | ||
@@ -2065,6 +2130,13 @@ static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data) | |||
2065 | case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */ | 2130 | case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */ |
2066 | case 28552: /* WinTV-PVR 'Roslyn' (No IR) */ | 2131 | case 28552: /* WinTV-PVR 'Roslyn' (No IR) */ |
2067 | case 34519: /* WinTV-PCI-FM */ | 2132 | case 34519: /* WinTV-PCI-FM */ |
2133 | case 69009: | ||
2134 | /* WinTV-HVR4000 (DVBS/S2/T, Video and IR, back panel inputs) */ | ||
2135 | case 69100: /* WinTV-HVR4000LITE (DVBS/S2, IR) */ | ||
2136 | case 69500: /* WinTV-HVR4000LITE (DVBS/S2, No IR) */ | ||
2137 | case 69559: | ||
2138 | /* WinTV-HVR4000 (DVBS/S2/T, Video no IR, back panel inputs) */ | ||
2139 | case 69569: /* WinTV-HVR4000 (DVBS/S2/T, Video no IR) */ | ||
2068 | case 90002: /* Nova-T-PCI (9002) */ | 2140 | case 90002: /* Nova-T-PCI (9002) */ |
2069 | case 92001: /* Nova-S-Plus (Video and IR) */ | 2141 | case 92001: /* Nova-S-Plus (Video and IR) */ |
2070 | case 92002: /* Nova-S-Plus (Video and IR) */ | 2142 | case 92002: /* Nova-S-Plus (Video and IR) */ |
@@ -2415,6 +2487,11 @@ static void cx88_card_setup_pre_i2c(struct cx88_core *core) | |||
2415 | /* Enable the xc5000 tuner */ | 2487 | /* Enable the xc5000 tuner */ |
2416 | cx_set(MO_GP0_IO, 0x00001010); | 2488 | cx_set(MO_GP0_IO, 0x00001010); |
2417 | break; | 2489 | break; |
2490 | case CX88_BOARD_HAUPPAUGE_HVR4000: | ||
2491 | case CX88_BOARD_HAUPPAUGE_HVR4000LITE: | ||
2492 | /* Init GPIO to allow tuner to attach */ | ||
2493 | cx_write(MO_GP0_IO, 0x0000c4bf); | ||
2494 | udelay(1000); | ||
2418 | } | 2495 | } |
2419 | } | 2496 | } |
2420 | 2497 | ||
@@ -2489,6 +2566,8 @@ static void cx88_card_setup(struct cx88_core *core) | |||
2489 | case CX88_BOARD_HAUPPAUGE_HVR1100LP: | 2566 | case CX88_BOARD_HAUPPAUGE_HVR1100LP: |
2490 | case CX88_BOARD_HAUPPAUGE_HVR3000: | 2567 | case CX88_BOARD_HAUPPAUGE_HVR3000: |
2491 | case CX88_BOARD_HAUPPAUGE_HVR1300: | 2568 | case CX88_BOARD_HAUPPAUGE_HVR1300: |
2569 | case CX88_BOARD_HAUPPAUGE_HVR4000: | ||
2570 | case CX88_BOARD_HAUPPAUGE_HVR4000LITE: | ||
2492 | if (0 == core->i2c_rc) | 2571 | if (0 == core->i2c_rc) |
2493 | hauppauge_eeprom(core, eeprom); | 2572 | hauppauge_eeprom(core, eeprom); |
2494 | break; | 2573 | break; |
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index 9f0e5b3c515e..7a5a4a2c69ca 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include "tuner-simple.h" | 48 | #include "tuner-simple.h" |
49 | #include "tda9887.h" | 49 | #include "tda9887.h" |
50 | #include "s5h1411.h" | 50 | #include "s5h1411.h" |
51 | #include "cx24116.h" | ||
51 | 52 | ||
52 | MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); | 53 | MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); |
53 | MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); | 54 | MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); |
@@ -518,6 +519,35 @@ static int attach_xc3028(u8 addr, struct cx8802_dev *dev) | |||
518 | return 0; | 519 | return 0; |
519 | } | 520 | } |
520 | 521 | ||
522 | static int cx24116_set_ts_param(struct dvb_frontend *fe, | ||
523 | int is_punctured) | ||
524 | { | ||
525 | struct cx8802_dev *dev = fe->dvb->priv; | ||
526 | dev->ts_gen_cntrl = 0x2; | ||
527 | |||
528 | return 0; | ||
529 | } | ||
530 | |||
531 | static int cx24116_reset_device(struct dvb_frontend *fe) | ||
532 | { | ||
533 | struct cx8802_dev *dev = fe->dvb->priv; | ||
534 | struct cx88_core *core = dev->core; | ||
535 | |||
536 | /* Reset the part */ | ||
537 | cx_write(MO_SRST_IO, 0); | ||
538 | msleep(10); | ||
539 | cx_write(MO_SRST_IO, 1); | ||
540 | msleep(10); | ||
541 | |||
542 | return 0; | ||
543 | } | ||
544 | |||
545 | static struct cx24116_config hauppauge_hvr4000_config = { | ||
546 | .demod_address = 0x05, | ||
547 | .set_ts_params = cx24116_set_ts_param, | ||
548 | .reset_device = cx24116_reset_device, | ||
549 | }; | ||
550 | |||
521 | static int dvb_register(struct cx8802_dev *dev) | 551 | static int dvb_register(struct cx8802_dev *dev) |
522 | { | 552 | { |
523 | struct cx88_core *core = dev->core; | 553 | struct cx88_core *core = dev->core; |
@@ -876,6 +906,18 @@ static int dvb_register(struct cx8802_dev *dev) | |||
876 | goto frontend_detach; | 906 | goto frontend_detach; |
877 | } | 907 | } |
878 | break; | 908 | break; |
909 | case CX88_BOARD_HAUPPAUGE_HVR4000: | ||
910 | case CX88_BOARD_HAUPPAUGE_HVR4000LITE: | ||
911 | /* Support for DVB-S only, not DVB-T support */ | ||
912 | dev->dvb.frontend = dvb_attach(cx24116_attach, | ||
913 | &hauppauge_hvr4000_config, | ||
914 | &dev->core->i2c_adap); | ||
915 | if (dev->dvb.frontend) { | ||
916 | dvb_attach(isl6421_attach, dev->dvb.frontend, | ||
917 | &dev->core->i2c_adap, | ||
918 | 0x08, 0x00, 0x00); | ||
919 | } | ||
920 | break; | ||
879 | default: | 921 | default: |
880 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n", | 922 | printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n", |
881 | core->name); | 923 | core->name); |
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c index 53526d997a4e..097081eb505f 100644 --- a/drivers/media/video/cx88/cx88-input.c +++ b/drivers/media/video/cx88/cx88-input.c | |||
@@ -224,6 +224,8 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
224 | case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: | 224 | case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: |
225 | case CX88_BOARD_HAUPPAUGE_HVR1100: | 225 | case CX88_BOARD_HAUPPAUGE_HVR1100: |
226 | case CX88_BOARD_HAUPPAUGE_HVR3000: | 226 | case CX88_BOARD_HAUPPAUGE_HVR3000: |
227 | case CX88_BOARD_HAUPPAUGE_HVR4000: | ||
228 | case CX88_BOARD_HAUPPAUGE_HVR4000LITE: | ||
227 | ir_codes = ir_codes_hauppauge_new; | 229 | ir_codes = ir_codes_hauppauge_new; |
228 | ir_type = IR_TYPE_RC5; | 230 | ir_type = IR_TYPE_RC5; |
229 | ir->sampling = 1; | 231 | ir->sampling = 1; |
@@ -462,6 +464,8 @@ void cx88_ir_irq(struct cx88_core *core) | |||
462 | case CX88_BOARD_HAUPPAUGE_HVR1100: | 464 | case CX88_BOARD_HAUPPAUGE_HVR1100: |
463 | case CX88_BOARD_HAUPPAUGE_HVR3000: | 465 | case CX88_BOARD_HAUPPAUGE_HVR3000: |
464 | case CX88_BOARD_PINNACLE_PCTV_HD_800i: | 466 | case CX88_BOARD_PINNACLE_PCTV_HD_800i: |
467 | case CX88_BOARD_HAUPPAUGE_HVR4000: | ||
468 | case CX88_BOARD_HAUPPAUGE_HVR4000LITE: | ||
465 | ircode = ir_decode_biphase(ir->samples, ir->scount, 5, 7); | 469 | ircode = ir_decode_biphase(ir->samples, ir->scount, 5, 7); |
466 | ir_dprintk("biphase decoded: %x\n", ircode); | 470 | ir_dprintk("biphase decoded: %x\n", ircode); |
467 | if ((ircode & 0xfffff000) != 0x3000) | 471 | if ((ircode & 0xfffff000) != 0x3000) |
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h index 54fe65094711..edcdabaf7bca 100644 --- a/drivers/media/video/cx88/cx88.h +++ b/drivers/media/video/cx88/cx88.h | |||
@@ -221,6 +221,8 @@ extern struct sram_channel cx88_sram_channels[]; | |||
221 | #define CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD 65 | 221 | #define CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD 65 |
222 | #define CX88_BOARD_PROLINK_PV_8000GT 66 | 222 | #define CX88_BOARD_PROLINK_PV_8000GT 66 |
223 | #define CX88_BOARD_KWORLD_ATSC_120 67 | 223 | #define CX88_BOARD_KWORLD_ATSC_120 67 |
224 | #define CX88_BOARD_HAUPPAUGE_HVR4000 68 | ||
225 | #define CX88_BOARD_HAUPPAUGE_HVR4000LITE 69 | ||
224 | 226 | ||
225 | enum cx88_itype { | 227 | enum cx88_itype { |
226 | CX88_VMUX_COMPOSITE1 = 1, | 228 | CX88_VMUX_COMPOSITE1 = 1, |