aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2006-09-14 14:41:13 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 11:30:36 -0400
commitaa481a654771217645188b64d82acfc38c2da892 (patch)
treee7faefe2776e2cc6ea89ae30ff96685c86715d3c /drivers
parent1c2d034e3c0ce4c1c89f1636a9f4aa7615cc7474 (diff)
V4L/DVB (4638): Basic DVB-T and analog TV support for the HVR1300.
This is the first in a series of patches to add full WinTV-HVR1300 support to Linux. This first patch will enable analog TV support and DVB-T support. Later patches will add the hardware MPEG encoder support. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/cx88/cx88-cards.c57
-rw-r--r--drivers/media/video/cx88/cx88-core.c1
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c14
-rw-r--r--drivers/media/video/cx88/cx88-input.c2
-rw-r--r--drivers/media/video/cx88/cx88.h2
5 files changed, 76 insertions, 0 deletions
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index 29ba5d53ce34..4a9998f4a618 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -1280,6 +1280,29 @@ struct cx88_board cx88_boards[] = {
1280 .gpio3 = 0x02000000, 1280 .gpio3 = 0x02000000,
1281 }}, 1281 }},
1282 }, 1282 },
1283 [CX88_BOARD_HAUPPAUGE_HVR1300] = {
1284 .name = "Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder",
1285 .tuner_type = TUNER_PHILIPS_FMD1216ME_MK3,
1286 .radio_type = UNSET,
1287 .tuner_addr = ADDR_UNSET,
1288 .radio_addr = ADDR_UNSET,
1289 .tda9887_conf = TDA9887_PRESENT,
1290 .input = {{
1291 .type = CX88_VMUX_TELEVISION,
1292 .vmux = 0,
1293 .gpio0 = 0xe780,
1294 },{
1295 .type = CX88_VMUX_COMPOSITE1,
1296 .vmux = 1,
1297 .gpio0 = 0xe780,
1298 },{
1299 .type = CX88_VMUX_SVIDEO,
1300 .vmux = 2,
1301 .gpio0 = 0xe780,
1302 }},
1303 /* fixme: Add radio support */
1304 .dvb = 1,
1305 },
1283}; 1306};
1284const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards); 1307const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards);
1285 1308
@@ -1542,6 +1565,18 @@ struct cx88_subid cx88_subids[] = {
1542 .subvendor = 0xc180, 1565 .subvendor = 0xc180,
1543 .subdevice = 0xc980, 1566 .subdevice = 0xc980,
1544 .card = CX88_BOARD_TE_DTV_250_OEM_SWANN, 1567 .card = CX88_BOARD_TE_DTV_250_OEM_SWANN,
1568 },{
1569 .subvendor = 0x0070,
1570 .subdevice = 0x9600,
1571 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
1572 },{
1573 .subvendor = 0x0070,
1574 .subdevice = 0x9601,
1575 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
1576 },{
1577 .subvendor = 0x0070,
1578 .subdevice = 0x9602,
1579 .card = CX88_BOARD_HAUPPAUGE_HVR1300,
1545 }, 1580 },
1546}; 1581};
1547const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids); 1582const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
@@ -1597,6 +1632,11 @@ static void hauppauge_eeprom(struct cx88_core *core, u8 *eeprom_data)
1597 case 92000: /* Nova-SE2 (OEM, No Video or IR) */ 1632 case 92000: /* Nova-SE2 (OEM, No Video or IR) */
1598 case 94009: /* WinTV-HVR1100 (Video and IR Retail) */ 1633 case 94009: /* WinTV-HVR1100 (Video and IR Retail) */
1599 case 94501: /* WinTV-HVR1100 (Video and IR OEM) */ 1634 case 94501: /* WinTV-HVR1100 (Video and IR OEM) */
1635 case 96009: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX) */
1636 case 96019: /* WinTV-HVR1300 (PAL Video, MPEG Video and IR RX/TX) */
1637 case 96559: /* WinTV-HVR1300 (PAL Video, MPEG Video no IR) */
1638 case 96569: /* WinTV-HVR1300 () */
1639 case 96659: /* WinTV-HVR1300 () */
1600 case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */ 1640 case 98559: /* WinTV-HVR1100LP (Video no IR, Retail - Low Profile) */
1601 /* known */ 1641 /* known */
1602 break; 1642 break;
@@ -1723,6 +1763,22 @@ void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)
1723 core->name, i, cx88_boards[i].name); 1763 core->name, i, cx88_boards[i].name);
1724} 1764}
1725 1765
1766void cx88_card_setup_pre_i2c(struct cx88_core *core)
1767{
1768 switch (core->board) {
1769 case CX88_BOARD_HAUPPAUGE_HVR1300:
1770 /* Bring the 702 demod up before i2c scanning/attach or devices are hidden */
1771 /* We leave here with the 702 on the bus */
1772 cx_write(MO_GP0_IO, 0x0000e780);
1773 udelay(1000);
1774 cx_clear(MO_GP0_IO, 0x00000080);
1775 udelay(50);
1776 cx_set(MO_GP0_IO, 0x00000080); /* 702 out of reset */
1777 udelay(1000);
1778 break;
1779 }
1780}
1781
1726void cx88_card_setup(struct cx88_core *core) 1782void cx88_card_setup(struct cx88_core *core)
1727{ 1783{
1728 static u8 eeprom[256]; 1784 static u8 eeprom[256];
@@ -1752,6 +1808,7 @@ void cx88_card_setup(struct cx88_core *core)
1752 case CX88_BOARD_HAUPPAUGE_HVR1100: 1808 case CX88_BOARD_HAUPPAUGE_HVR1100:
1753 case CX88_BOARD_HAUPPAUGE_HVR1100LP: 1809 case CX88_BOARD_HAUPPAUGE_HVR1100LP:
1754 case CX88_BOARD_HAUPPAUGE_HVR3000: 1810 case CX88_BOARD_HAUPPAUGE_HVR3000:
1811 case CX88_BOARD_HAUPPAUGE_HVR1300:
1755 if (0 == core->i2c_rc) 1812 if (0 == core->i2c_rc)
1756 hauppauge_eeprom(core,eeprom); 1813 hauppauge_eeprom(core,eeprom);
1757 break; 1814 break;
diff --git a/drivers/media/video/cx88/cx88-core.c b/drivers/media/video/cx88/cx88-core.c
index 888ccb671e6c..f379ede3049a 100644
--- a/drivers/media/video/cx88/cx88-core.c
+++ b/drivers/media/video/cx88/cx88-core.c
@@ -1133,6 +1133,7 @@ struct cx88_core* cx88_core_get(struct pci_dev *pci)
1133 1133
1134 /* init hardware */ 1134 /* init hardware */
1135 cx88_reset(core); 1135 cx88_reset(core);
1136 cx88_card_setup_pre_i2c(core);
1136 cx88_i2c_init(core,pci); 1137 cx88_i2c_init(core,pci);
1137 cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL); 1138 cx88_call_i2c_clients (core, TUNER_SET_STANDBY, NULL);
1138 cx88_card_setup(core); 1139 cx88_card_setup(core);
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index a5812e2e25c1..c87041dee21e 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -319,6 +319,10 @@ static struct cx22702_config hauppauge_hvr1100_config = {
319 .demod_address = 0x63, 319 .demod_address = 0x63,
320 .output_mode = CX22702_SERIAL_OUTPUT, 320 .output_mode = CX22702_SERIAL_OUTPUT,
321}; 321};
322static struct cx22702_config hauppauge_hvr1300_config = {
323 .demod_address = 0x63,
324 .output_mode = CX22702_SERIAL_OUTPUT,
325};
322 326
323static int or51132_set_ts_param(struct dvb_frontend* fe, 327static int or51132_set_ts_param(struct dvb_frontend* fe,
324 int is_punctured) 328 int is_punctured)
@@ -544,6 +548,16 @@ static int dvb_register(struct cx8802_dev *dev)
544 &dvb_pll_fmd1216me); 548 &dvb_pll_fmd1216me);
545 } 549 }
546 break; 550 break;
551 case CX88_BOARD_HAUPPAUGE_HVR1300:
552 dev->dvb.frontend = dvb_attach(cx22702_attach,
553 &hauppauge_hvr1300_config,
554 &dev->core->i2c_adap);
555 if (dev->dvb.frontend != NULL) {
556 dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
557 &dev->core->i2c_adap,
558 &dvb_pll_fmd1216me);
559 }
560 break;
547 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS: 561 case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
548 dev->dvb.frontend = dvb_attach(mt352_attach, 562 dev->dvb.frontend = dvb_attach(mt352_attach,
549 &dvico_fusionhdtv, 563 &dvico_fusionhdtv,
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c
index 3049bd5b5a48..83ebf7a3c054 100644
--- a/drivers/media/video/cx88/cx88-input.c
+++ b/drivers/media/video/cx88/cx88-input.c
@@ -195,6 +195,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
195 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1: 195 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
196 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: 196 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
197 case CX88_BOARD_HAUPPAUGE_HVR1100: 197 case CX88_BOARD_HAUPPAUGE_HVR1100:
198 case CX88_BOARD_HAUPPAUGE_HVR1300:
198 ir_codes = ir_codes_hauppauge_new; 199 ir_codes = ir_codes_hauppauge_new;
199 ir_type = IR_TYPE_RC5; 200 ir_type = IR_TYPE_RC5;
200 ir->sampling = 1; 201 ir->sampling = 1;
@@ -417,6 +418,7 @@ void cx88_ir_irq(struct cx88_core *core)
417 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1: 418 case CX88_BOARD_HAUPPAUGE_NOVASE2_S1:
418 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1: 419 case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
419 case CX88_BOARD_HAUPPAUGE_HVR1100: 420 case CX88_BOARD_HAUPPAUGE_HVR1100:
421 case CX88_BOARD_HAUPPAUGE_HVR1300:
420 ircode = ir_decode_biphase(ir->samples, ir->scount, 5, 7); 422 ircode = ir_decode_biphase(ir->samples, ir->scount, 5, 7);
421 ir_dprintk("biphase decoded: %x\n", ircode); 423 ir_dprintk("biphase decoded: %x\n", ircode);
422 if ((ircode & 0xfffff000) != 0x3000) 424 if ((ircode & 0xfffff000) != 0x3000)
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h
index 1c87c2ed216c..89f12e273b7f 100644
--- a/drivers/media/video/cx88/cx88.h
+++ b/drivers/media/video/cx88/cx88.h
@@ -200,6 +200,7 @@ extern struct sram_channel cx88_sram_channels[];
200#define CX88_BOARD_HAUPPAUGE_HVR3000 53 200#define CX88_BOARD_HAUPPAUGE_HVR3000 53
201#define CX88_BOARD_NORWOOD_MICRO 54 201#define CX88_BOARD_NORWOOD_MICRO 54
202#define CX88_BOARD_TE_DTV_250_OEM_SWANN 55 202#define CX88_BOARD_TE_DTV_250_OEM_SWANN 55
203#define CX88_BOARD_HAUPPAUGE_HVR1300 56
203 204
204enum cx88_itype { 205enum cx88_itype {
205 CX88_VMUX_COMPOSITE1 = 1, 206 CX88_VMUX_COMPOSITE1 = 1,
@@ -548,6 +549,7 @@ extern const unsigned int cx88_idcount;
548 549
549extern void cx88_card_list(struct cx88_core *core, struct pci_dev *pci); 550extern void cx88_card_list(struct cx88_core *core, struct pci_dev *pci);
550extern void cx88_card_setup(struct cx88_core *core); 551extern void cx88_card_setup(struct cx88_core *core);
552extern void cx88_card_setup_pre_i2c(struct cx88_core *core);
551 553
552/* ----------------------------------------------------------- */ 554/* ----------------------------------------------------------- */
553/* cx88-tvaudio.c */ 555/* cx88-tvaudio.c */