aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88
diff options
context:
space:
mode:
authorIgor M. Liplianin <liplianin@me.by>2008-09-04 16:24:14 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:37:03 -0400
commitaf832623c2a44525df6e4ae0142fb0385479546c (patch)
treedae316e09fe1069dcad2b1682b94e76ac531f2ce /drivers/media/video/cx88
parent13c97bf56724b4f2d3dac139fb4cb081a3c401dc (diff)
V4L/DVB (8989): Added support for TeVii S460 DVB-S/S2 card
Added support for TeVii S460 DVB-S/S2 card. The card based on cx24116 demodulator. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx88')
-rw-r--r--drivers/media/video/cx88/cx88-cards.c23
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c40
-rw-r--r--drivers/media/video/cx88/cx88.h1
3 files changed, 64 insertions, 0 deletions
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index 538967e32284..23948daae85e 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -1709,6 +1709,18 @@ static const struct cx88_board cx88_boards[] = {
1709 } }, 1709 } },
1710 .mpeg = CX88_MPEG_DVB, 1710 .mpeg = CX88_MPEG_DVB,
1711 }, 1711 },
1712 [CX88_BOARD_TEVII_S460] = {
1713 .name = "TeVii S460 DVB-S/S2",
1714 .tuner_type = UNSET,
1715 .radio_type = UNSET,
1716 .tuner_addr = ADDR_UNSET,
1717 .radio_addr = ADDR_UNSET,
1718 .input = {{
1719 .type = CX88_VMUX_DVB,
1720 .vmux = 0,
1721 } },
1722 .mpeg = CX88_MPEG_DVB,
1723 },
1712}; 1724};
1713 1725
1714/* ------------------------------------------------------------------ */ 1726/* ------------------------------------------------------------------ */
@@ -2078,6 +2090,10 @@ static const struct cx88_subid cx88_subids[] = {
2078 .subvendor = 0x0070, 2090 .subvendor = 0x0070,
2079 .subdevice = 0x6906, 2091 .subdevice = 0x6906,
2080 .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE, 2092 .card = CX88_BOARD_HAUPPAUGE_HVR4000LITE,
2093 }, {
2094 .subvendor = 0xD460,
2095 .subdevice = 0x9022,
2096 .card = CX88_BOARD_TEVII_S460,
2081 }, 2097 },
2082}; 2098};
2083 2099
@@ -2649,7 +2665,14 @@ static void cx88_card_setup(struct cx88_core *core)
2649 tea5767_cfg.priv = &ctl; 2665 tea5767_cfg.priv = &ctl;
2650 2666
2651 cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tea5767_cfg); 2667 cx88_call_i2c_clients(core, TUNER_SET_CONFIG, &tea5767_cfg);
2668 break;
2652 } 2669 }
2670 case CX88_BOARD_TEVII_S460:
2671 cx_write(MO_SRST_IO, 0);
2672 msleep(100);
2673 cx_write(MO_SRST_IO, 1);
2674 msleep(100);
2675 break;
2653 } /*end switch() */ 2676 } /*end switch() */
2654 2677
2655 2678
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index 7a5a4a2c69ca..5ff6e9d28713 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -376,6 +376,31 @@ static int geniatech_dvbs_set_voltage(struct dvb_frontend *fe,
376 return 0; 376 return 0;
377} 377}
378 378
379static int tevii_dvbs_set_voltage(struct dvb_frontend *fe,
380 fe_sec_voltage_t voltage)
381{
382 struct cx8802_dev *dev= fe->dvb->priv;
383 struct cx88_core *core = dev->core;
384
385 switch (voltage) {
386 case SEC_VOLTAGE_13:
387 printk("LNB Voltage SEC_VOLTAGE_13\n");
388 cx_write(MO_GP0_IO, 0x00006040);
389 break;
390 case SEC_VOLTAGE_18:
391 printk("LNB Voltage SEC_VOLTAGE_18\n");
392 cx_write(MO_GP0_IO, 0x00006060);
393 break;
394 case SEC_VOLTAGE_OFF:
395 printk("LNB Voltage SEC_VOLTAGE_off\n");
396 break;
397 }
398
399 if (core->prev_set_voltage)
400 return core->prev_set_voltage(fe, voltage);
401 return 0;
402}
403
379static int cx88_pci_nano_callback(void *ptr, int command, int arg) 404static int cx88_pci_nano_callback(void *ptr, int command, int arg)
380{ 405{
381 struct cx88_core *core = ptr; 406 struct cx88_core *core = ptr;
@@ -548,6 +573,12 @@ static struct cx24116_config hauppauge_hvr4000_config = {
548 .reset_device = cx24116_reset_device, 573 .reset_device = cx24116_reset_device,
549}; 574};
550 575
576static struct cx24116_config tevii_s460_config = {
577 .demod_address = 0x55,
578 .set_ts_params = cx24116_set_ts_param,
579 .reset_device = cx24116_reset_device,
580};
581
551static int dvb_register(struct cx8802_dev *dev) 582static int dvb_register(struct cx8802_dev *dev)
552{ 583{
553 struct cx88_core *core = dev->core; 584 struct cx88_core *core = dev->core;
@@ -918,6 +949,15 @@ static int dvb_register(struct cx8802_dev *dev)
918 0x08, 0x00, 0x00); 949 0x08, 0x00, 0x00);
919 } 950 }
920 break; 951 break;
952 case CX88_BOARD_TEVII_S460:
953 dev->dvb.frontend = dvb_attach(cx24116_attach,
954 &tevii_s460_config,
955 &core->i2c_adap);
956 if (dev->dvb.frontend != NULL) {
957 core->prev_set_voltage = dev->dvb.frontend->ops.set_voltage;
958 dev->dvb.frontend->ops.set_voltage = tevii_dvbs_set_voltage;
959 }
960 break;
921 default: 961 default:
922 printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n", 962 printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n",
923 core->name); 963 core->name);
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h
index edcdabaf7bca..2b82c6aac89a 100644
--- a/drivers/media/video/cx88/cx88.h
+++ b/drivers/media/video/cx88/cx88.h
@@ -223,6 +223,7 @@ extern struct sram_channel cx88_sram_channels[];
223#define CX88_BOARD_KWORLD_ATSC_120 67 223#define CX88_BOARD_KWORLD_ATSC_120 67
224#define CX88_BOARD_HAUPPAUGE_HVR4000 68 224#define CX88_BOARD_HAUPPAUGE_HVR4000 68
225#define CX88_BOARD_HAUPPAUGE_HVR4000LITE 69 225#define CX88_BOARD_HAUPPAUGE_HVR4000LITE 69
226#define CX88_BOARD_TEVII_S460 70
226 227
227enum cx88_itype { 228enum cx88_itype {
228 CX88_VMUX_COMPOSITE1 = 1, 229 CX88_VMUX_COMPOSITE1 = 1,