diff options
author | Steven Toth <stoth@kernellabs.com> | 2009-07-20 14:37:25 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-12 11:17:57 -0400 |
commit | 1369738023900302ef9677c90c4da873b5593ee7 (patch) | |
tree | 8726e29c95872bf37c64ac15f0a1ddae4fe2ade6 /drivers/media/video/cx23885 | |
parent | 21ff3e4f63a3095f739f6398accd3b43d77e30b5 (diff) |
V4L/DVB (12306): cx23885: Add support for ATSC/QAM on Hauppauge HVR-1850
cx23885: Add support for ATSC/QAM on Hauppauge HVR-1850
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-cards.c | 49 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-dvb.c | 11 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885.h | 1 |
3 files changed, 60 insertions, 1 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c index 2bf8ed604d6b..3143d85ef31d 100644 --- a/drivers/media/video/cx23885/cx23885-cards.c +++ b/drivers/media/video/cx23885/cx23885-cards.c | |||
@@ -205,6 +205,11 @@ struct cx23885_board cx23885_boards[] = { | |||
205 | .name = "Magic-Pro ProHDTV Extreme 2", | 205 | .name = "Magic-Pro ProHDTV Extreme 2", |
206 | .portb = CX23885_MPEG_DVB, | 206 | .portb = CX23885_MPEG_DVB, |
207 | }, | 207 | }, |
208 | [CX23885_BOARD_HAUPPAUGE_HVR1850] = { | ||
209 | .name = "Hauppauge WinTV-HVR1850", | ||
210 | .portb = CX23885_MPEG_ENCODER, | ||
211 | .portc = CX23885_MPEG_DVB, | ||
212 | }, | ||
208 | }; | 213 | }; |
209 | const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); | 214 | const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); |
210 | 215 | ||
@@ -332,6 +337,10 @@ struct cx23885_subid cx23885_subids[] = { | |||
332 | .subvendor = 0x14f1, | 337 | .subvendor = 0x14f1, |
333 | .subdevice = 0x8657, | 338 | .subdevice = 0x8657, |
334 | .card = CX23885_BOARD_MAGICPRO_PROHDTVE2, | 339 | .card = CX23885_BOARD_MAGICPRO_PROHDTVE2, |
340 | }, { | ||
341 | .subvendor = 0x0070, | ||
342 | .subdevice = 0x8541, | ||
343 | .card = CX23885_BOARD_HAUPPAUGE_HVR1850, | ||
335 | }, | 344 | }, |
336 | }; | 345 | }; |
337 | const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); | 346 | const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); |
@@ -491,8 +500,13 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data) | |||
491 | /* WinTV-HVR1700 (PCIe, OEM, No IR, full height) | 500 | /* WinTV-HVR1700 (PCIe, OEM, No IR, full height) |
492 | * DVB-T and MPEG2 HW Encoder */ | 501 | * DVB-T and MPEG2 HW Encoder */ |
493 | break; | 502 | break; |
503 | case 85021: | ||
504 | /* WinTV-HVR1850 (PCIe, OEM, RCA in, IR, FM, | ||
505 | Dual channel ATSC and MPEG2 HW Encoder */ | ||
506 | break; | ||
494 | default: | 507 | default: |
495 | printk(KERN_WARNING "%s: warning: unknown hauppauge model #%d\n", | 508 | printk(KERN_WARNING "%s: warning: " |
509 | "unknown hauppauge model #%d\n", | ||
496 | dev->name, tv.model); | 510 | dev->name, tv.model); |
497 | break; | 511 | break; |
498 | } | 512 | } |
@@ -742,6 +756,36 @@ void cx23885_gpio_setup(struct cx23885_dev *dev) | |||
742 | cx_set(GP0_IO, 0x00060006); | 756 | cx_set(GP0_IO, 0x00060006); |
743 | mdelay(100); | 757 | mdelay(100); |
744 | break; | 758 | break; |
759 | case CX23885_BOARD_HAUPPAUGE_HVR1850: | ||
760 | /* GPIO-0 656_CLK */ | ||
761 | /* GPIO-1 656_D0 */ | ||
762 | /* GPIO-2 Wake# */ | ||
763 | /* GPIO-3-10 cx23417 data0-7 */ | ||
764 | /* GPIO-11-14 cx23417 addr0-3 */ | ||
765 | /* GPIO-15-18 cx23417 READY, CS, RD, WR */ | ||
766 | /* GPIO-19 IR_RX */ | ||
767 | /* GPIO-20 C_IR_TX */ | ||
768 | /* GPIO-21 I2S DAT */ | ||
769 | /* GPIO-22 I2S WCLK */ | ||
770 | /* GPIO-23 I2S BCLK */ | ||
771 | /* ALT GPIO: EXP GPIO LATCH */ | ||
772 | |||
773 | /* CX23417 GPIO's */ | ||
774 | /* GPIO-14 S5H1411/CX24228 Reset */ | ||
775 | /* GPIO-13 EEPROM write protect */ | ||
776 | mc417_gpio_enable(dev, GPIO_14 | GPIO_13, 1); | ||
777 | |||
778 | /* Put the demod into reset and protect the eeprom */ | ||
779 | mc417_gpio_clear(dev, GPIO_14 | GPIO_13); | ||
780 | mdelay(100); | ||
781 | |||
782 | /* Bring the demod out of reset */ | ||
783 | mc417_gpio_set(dev, GPIO_14); | ||
784 | mdelay(100); | ||
785 | |||
786 | /* CX24228 GPIO */ | ||
787 | /* Connected to IF / Mux */ | ||
788 | break; | ||
745 | } | 789 | } |
746 | } | 790 | } |
747 | 791 | ||
@@ -758,6 +802,7 @@ int cx23885_ir_init(struct cx23885_dev *dev) | |||
758 | case CX23885_BOARD_HAUPPAUGE_HVR1275: | 802 | case CX23885_BOARD_HAUPPAUGE_HVR1275: |
759 | case CX23885_BOARD_HAUPPAUGE_HVR1255: | 803 | case CX23885_BOARD_HAUPPAUGE_HVR1255: |
760 | case CX23885_BOARD_HAUPPAUGE_HVR1210: | 804 | case CX23885_BOARD_HAUPPAUGE_HVR1210: |
805 | case CX23885_BOARD_HAUPPAUGE_HVR1850: | ||
761 | /* FIXME: Implement me */ | 806 | /* FIXME: Implement me */ |
762 | break; | 807 | break; |
763 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: | 808 | case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP: |
@@ -797,6 +842,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) | |||
797 | case CX23885_BOARD_HAUPPAUGE_HVR1275: | 842 | case CX23885_BOARD_HAUPPAUGE_HVR1275: |
798 | case CX23885_BOARD_HAUPPAUGE_HVR1255: | 843 | case CX23885_BOARD_HAUPPAUGE_HVR1255: |
799 | case CX23885_BOARD_HAUPPAUGE_HVR1210: | 844 | case CX23885_BOARD_HAUPPAUGE_HVR1210: |
845 | case CX23885_BOARD_HAUPPAUGE_HVR1850: | ||
800 | if (dev->i2c_bus[0].i2c_rc == 0) | 846 | if (dev->i2c_bus[0].i2c_rc == 0) |
801 | hauppauge_eeprom(dev, eeprom+0xc0); | 847 | hauppauge_eeprom(dev, eeprom+0xc0); |
802 | break; | 848 | break; |
@@ -864,6 +910,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) | |||
864 | case CX23885_BOARD_HAUPPAUGE_HVR1275: | 910 | case CX23885_BOARD_HAUPPAUGE_HVR1275: |
865 | case CX23885_BOARD_HAUPPAUGE_HVR1255: | 911 | case CX23885_BOARD_HAUPPAUGE_HVR1255: |
866 | case CX23885_BOARD_HAUPPAUGE_HVR1210: | 912 | case CX23885_BOARD_HAUPPAUGE_HVR1210: |
913 | case CX23885_BOARD_HAUPPAUGE_HVR1850: | ||
867 | default: | 914 | default: |
868 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ | 915 | ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ |
869 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ | 916 | ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ |
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c index e4a22dcaf59b..f87a023a7351 100644 --- a/drivers/media/video/cx23885/cx23885-dvb.c +++ b/drivers/media/video/cx23885/cx23885-dvb.c | |||
@@ -866,6 +866,17 @@ static int dvb_register(struct cx23885_tsport *port) | |||
866 | &magicpro_prohdtve2_xc5000_config); | 866 | &magicpro_prohdtve2_xc5000_config); |
867 | } | 867 | } |
868 | break; | 868 | break; |
869 | case CX23885_BOARD_HAUPPAUGE_HVR1850: | ||
870 | i2c_bus = &dev->i2c_bus[0]; | ||
871 | fe0->dvb.frontend = dvb_attach(s5h1411_attach, | ||
872 | &hcw_s5h1411_config, | ||
873 | &i2c_bus->i2c_adap); | ||
874 | if (fe0->dvb.frontend != NULL) | ||
875 | dvb_attach(tda18271_attach, fe0->dvb.frontend, | ||
876 | 0x60, &dev->i2c_bus[0].i2c_adap, | ||
877 | &hauppauge_tda18271_config); | ||
878 | break; | ||
879 | |||
869 | default: | 880 | default: |
870 | printk(KERN_INFO "%s: The frontend of your DVB/ATSC card " | 881 | printk(KERN_INFO "%s: The frontend of your DVB/ATSC card " |
871 | " isn't supported yet\n", | 882 | " isn't supported yet\n", |
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h index 0958d6a7ffdd..963e6b17a43e 100644 --- a/drivers/media/video/cx23885/cx23885.h +++ b/drivers/media/video/cx23885/cx23885.h | |||
@@ -77,6 +77,7 @@ | |||
77 | #define CX23885_BOARD_HAUPPAUGE_HVR1210 21 | 77 | #define CX23885_BOARD_HAUPPAUGE_HVR1210 21 |
78 | #define CX23885_BOARD_MYGICA_X8506 22 | 78 | #define CX23885_BOARD_MYGICA_X8506 22 |
79 | #define CX23885_BOARD_MAGICPRO_PROHDTVE2 23 | 79 | #define CX23885_BOARD_MAGICPRO_PROHDTVE2 23 |
80 | #define CX23885_BOARD_HAUPPAUGE_HVR1850 24 | ||
80 | 81 | ||
81 | #define GPIO_0 0x00000001 | 82 | #define GPIO_0 0x00000001 |
82 | #define GPIO_1 0x00000002 | 83 | #define GPIO_1 0x00000002 |