aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-dvb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx88/cx88-dvb.c')
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c58
1 files changed, 56 insertions, 2 deletions
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index 518bcfe18bcb..b14296923250 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -53,6 +53,9 @@
53#include "stv0288.h" 53#include "stv0288.h"
54#include "stb6000.h" 54#include "stb6000.h"
55#include "cx24116.h" 55#include "cx24116.h"
56#include "stv0900.h"
57#include "stb6100.h"
58#include "stb6100_proc.h"
56 59
57MODULE_DESCRIPTION("driver for cx2388x based DVB cards"); 60MODULE_DESCRIPTION("driver for cx2388x based DVB cards");
58MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>"); 61MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>");
@@ -573,6 +576,15 @@ static int cx24116_set_ts_param(struct dvb_frontend *fe,
573 return 0; 576 return 0;
574} 577}
575 578
579static int stv0900_set_ts_param(struct dvb_frontend *fe,
580 int is_punctured)
581{
582 struct cx8802_dev *dev = fe->dvb->priv;
583 dev->ts_gen_cntrl = 0;
584
585 return 0;
586}
587
576static int cx24116_reset_device(struct dvb_frontend *fe) 588static int cx24116_reset_device(struct dvb_frontend *fe)
577{ 589{
578 struct cx8802_dev *dev = fe->dvb->priv; 590 struct cx8802_dev *dev = fe->dvb->priv;
@@ -601,6 +613,23 @@ static struct cx24116_config tevii_s460_config = {
601 .reset_device = cx24116_reset_device, 613 .reset_device = cx24116_reset_device,
602}; 614};
603 615
616static struct stv0900_config prof_7301_stv0900_config = {
617 .demod_address = 0x6a,
618/* demod_mode = 0,*/
619 .xtal = 27000000,
620 .clkmode = 3,/* 0-CLKI, 2-XTALI, else AUTO */
621 .diseqc_mode = 2,/* 2/3 PWM */
622 .tun1_maddress = 0,/* 0x60 */
623 .tun1_adc = 0,/* 2 Vpp */
624 .path1_mode = 3,
625 .set_ts_params = stv0900_set_ts_param,
626};
627
628static struct stb6100_config prof_7301_stb6100_config = {
629 .tuner_address = 0x60,
630 .refclock = 27000000,
631};
632
604static struct stv0299_config tevii_tuner_sharp_config = { 633static struct stv0299_config tevii_tuner_sharp_config = {
605 .demod_address = 0x68, 634 .demod_address = 0x68,
606 .inittab = sharp_z0194a_inittab, 635 .inittab = sharp_z0194a_inittab,
@@ -1149,6 +1178,31 @@ static int dvb_register(struct cx8802_dev *dev)
1149 goto frontend_detach; 1178 goto frontend_detach;
1150 } 1179 }
1151 break; 1180 break;
1181 case CX88_BOARD_PROF_7301:{
1182 struct dvb_tuner_ops *tuner_ops = NULL;
1183
1184 fe0->dvb.frontend = dvb_attach(stv0900_attach,
1185 &prof_7301_stv0900_config,
1186 &core->i2c_adap, 0);
1187 if (fe0->dvb.frontend != NULL) {
1188 if (!dvb_attach(stb6100_attach, fe0->dvb.frontend,
1189 &prof_7301_stb6100_config,
1190 &core->i2c_adap))
1191 goto frontend_detach;
1192
1193 tuner_ops = &fe0->dvb.frontend->ops.tuner_ops;
1194 tuner_ops->set_frequency = stb6100_set_freq;
1195 tuner_ops->get_frequency = stb6100_get_freq;
1196 tuner_ops->set_bandwidth = stb6100_set_bandw;
1197 tuner_ops->get_bandwidth = stb6100_get_bandw;
1198
1199 core->prev_set_voltage =
1200 fe0->dvb.frontend->ops.set_voltage;
1201 fe0->dvb.frontend->ops.set_voltage =
1202 tevii_dvbs_set_voltage;
1203 }
1204 break;
1205 }
1152 default: 1206 default:
1153 printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n", 1207 printk(KERN_ERR "%s/2: The frontend of your DVB/ATSC card isn't supported yet\n",
1154 core->name); 1208 core->name);
@@ -1170,11 +1224,11 @@ static int dvb_register(struct cx8802_dev *dev)
1170 fe1->dvb.frontend->ops.ts_bus_ctrl = cx88_dvb_bus_ctrl; 1224 fe1->dvb.frontend->ops.ts_bus_ctrl = cx88_dvb_bus_ctrl;
1171 1225
1172 /* Put the analog decoder in standby to keep it quiet */ 1226 /* Put the analog decoder in standby to keep it quiet */
1173 call_all(core, tuner, s_standby); 1227 call_all(core, core, s_power, 0);
1174 1228
1175 /* register everything */ 1229 /* register everything */
1176 return videobuf_dvb_register_bus(&dev->frontends, THIS_MODULE, dev, 1230 return videobuf_dvb_register_bus(&dev->frontends, THIS_MODULE, dev,
1177 &dev->pci->dev, adapter_nr, mfe_shared); 1231 &dev->pci->dev, adapter_nr, mfe_shared, NULL);
1178 1232
1179frontend_detach: 1233frontend_detach:
1180 core->gate_ctrl = NULL; 1234 core->gate_ctrl = NULL;