24 #include <linux/list.h>
25 #include <linux/module.h>
26 #include <linux/kernel.h>
69 static unsigned int antenna_pwr;
74 static int use_frontend;
76 MODULE_PARM_DESC(use_frontend,
"for cards with multiple frontends (0: terrestrial, 1: satellite)");
84 #define dprintk(fmt, arg...) do { if (debug) \
85 printk(KERN_DEBUG "%s/dvb: " fmt, dev->name , ## arg); } while(0)
88 #define wprintk(fmt, arg...) \
89 printk(KERN_WARNING "%s/dvb: " fmt, dev->name, ## arg)
115 dprintk(
"%s %s\n", __func__, ok ?
"on" :
"off");
124 static u8 clock_config [] = {
CLOCK_CTL, 0x3d, 0x28 };
129 static u8 fsm_ctl_cfg[] = { 0x7b, 0x04 };
130 static u8 gpp_ctl_cfg [] = {
GPP_CTL, 0x0f };
131 static u8 scan_ctl_cfg [] = {
SCAN_CTL, 0x0d };
135 dprintk(
"%s called\n", __func__);
137 mt352_write(fe, clock_config,
sizeof(clock_config));
139 mt352_write(fe, reset,
sizeof(reset));
140 mt352_write(fe, adc_ctl_1_cfg,
sizeof(adc_ctl_1_cfg));
141 mt352_write(fe, agc_cfg,
sizeof(agc_cfg));
142 mt352_write(fe, capt_range_cfg,
sizeof(capt_range_cfg));
143 mt352_write(fe, gpp_ctl_cfg,
sizeof(gpp_ctl_cfg));
145 mt352_write(fe, fsm_ctl_cfg,
sizeof(fsm_ctl_cfg));
146 mt352_write(fe, scan_ctl_cfg,
sizeof(scan_ctl_cfg));
147 mt352_write(fe, irq_cfg,
sizeof(irq_cfg));
154 static u8 clock_config [] = {
CLOCK_CTL, 0x38, 0x2d };
155 static u8 reset [] = {
RESET, 0x80 };
160 mt352_write(fe, clock_config,
sizeof(clock_config));
162 mt352_write(fe, reset,
sizeof(reset));
163 mt352_write(fe, adc_ctl_1_cfg,
sizeof(adc_ctl_1_cfg));
164 mt352_write(fe, agc_cfg,
sizeof(agc_cfg));
165 mt352_write(fe, capt_range_cfg,
sizeof(capt_range_cfg));
170 static int mt352_avermedia_xc3028_init(
struct dvb_frontend *fe)
172 static u8 clock_config [] = {
CLOCK_CTL, 0x38, 0x2d };
173 static u8 reset [] = {
RESET, 0x80 };
178 mt352_write(fe, clock_config,
sizeof(clock_config));
180 mt352_write(fe, reset,
sizeof(reset));
181 mt352_write(fe, adc_ctl_1_cfg,
sizeof(adc_ctl_1_cfg));
182 mt352_write(fe, agc_cfg,
sizeof(agc_cfg));
183 mt352_write(fe, capt_range_cfg,
sizeof(capt_range_cfg));
187 static int mt352_pinnacle_tuner_set_params(
struct dvb_frontend *fe)
190 u8 off[] = { 0x00, 0xf1};
191 u8 on[] = { 0x00, 0x71};
192 struct i2c_msg msg = {.addr=0x43, .flags=0, .buf=off, .len =
sizeof(off)};
200 f.frequency = c->
frequency / 1000 * 16 / 1000;
201 if (fe->
ops.i2c_gate_ctrl)
202 fe->
ops.i2c_gate_ctrl(fe, 1);
206 if (fe->
ops.i2c_gate_ctrl)
207 fe->
ops.i2c_gate_ctrl(fe, 1);
210 pinnacle_antenna_pwr(dev, antenna_pwr);
213 return mt352_pinnacle_init(fe);
217 .demod_address = 0x3c >> 1,
221 .demod_init = mt352_pinnacle_init,
225 .demod_address = 0xf,
226 .demod_init = mt352_aver777_init,
229 static struct mt352_config avermedia_xc3028_mt352_dev = {
230 .demod_address = (0x1e >> 1),
236 .dvbt_6 = { .if_freq = 3300, .agc_mode = 3, .std = 4,
237 .if_lvl = 7, .rfagc_top = 0x37, },
241 .std_map = &mb86a20s_tda18271_std_map,
248 .demod_address = 0x10,
255 unsigned char initmsg[] = {0x45, 0x97};
257 unsigned char msg_disable[] = {0x45, 0x81};
258 struct i2c_msg msg = {.
addr = 0x4b, .flags = 0, .buf = initmsg, .len = 2};
261 wprintk(
"could not access the I2C gate\n");
267 msg.
buf = msg_disable;
269 wprintk(
"could not access the I2C gate\n");
280 static int philips_tda1004x_request_firmware(
struct dvb_frontend *fe,
291 static int philips_tda6651_pll_set(
struct dvb_frontend *fe)
298 struct i2c_msg tuner_msg = {.
addr =
addr,.flags = 0,.buf = tuner_buf,.len =
300 int tuner_frequency = 0;
304 tuner_frequency = c->
frequency + 36166000;
305 if (tuner_frequency < 87000000)
307 else if (tuner_frequency < 130000000)
309 else if (tuner_frequency < 160000000)
311 else if (tuner_frequency < 200000000)
313 else if (tuner_frequency < 290000000)
315 else if (tuner_frequency < 420000000)
317 else if (tuner_frequency < 480000000)
319 else if (tuner_frequency < 620000000)
321 else if (tuner_frequency < 830000000)
323 else if (tuner_frequency < 895000000)
361 tuner_frequency = (((c->
frequency / 1000) * 6) + 217496) / 1000;
364 tuner_buf[0] = (tuner_frequency >> 8) & 0x7f;
365 tuner_buf[1] = tuner_frequency & 0xff;
367 tuner_buf[3] = (cp << 5) | (filter << 3) | band;
369 if (fe->
ops.i2c_gate_ctrl)
370 fe->
ops.i2c_gate_ctrl(fe, 1);
372 wprintk(
"could not write to tuner at addr: 0x%02x\n",
384 u8 addr = state->
config->tuner_address;
385 static u8 tu1216_init[] = { 0x0b, 0xf5, 0x85, 0xab };
386 struct i2c_msg tuner_msg = {.
addr =
addr,.flags = 0,.buf = tu1216_init,.len =
sizeof(tu1216_init) };
389 if (fe->
ops.i2c_gate_ctrl)
390 fe->
ops.i2c_gate_ctrl(fe, 1);
401 .demod_address = 0x8,
407 .tuner_address = 0x60,
408 .request_firmware = philips_tda1004x_request_firmware
413 .demod_address = 0x8,
419 .tuner_address = 0x61,
420 .request_firmware = philips_tda1004x_request_firmware
425 static int philips_td1316_tuner_init(
struct dvb_frontend *fe)
429 u8 addr = state->
config->tuner_address;
430 static u8 msg[] = { 0x0b, 0xf5, 0x86, 0xab };
434 if (fe->
ops.i2c_gate_ctrl)
435 fe->
ops.i2c_gate_ctrl(fe, 1);
441 static int philips_td1316_tuner_set_params(
struct dvb_frontend *fe)
443 return philips_tda6651_pll_set(fe);
446 static int philips_td1316_tuner_sleep(
struct dvb_frontend *fe)
450 u8 addr = state->
config->tuner_address;
451 static u8 msg[] = { 0x0b, 0xdc, 0x86, 0xa4 };
455 if (fe->
ops.i2c_gate_ctrl)
456 fe->
ops.i2c_gate_ctrl(fe, 1);
464 static int philips_europa_tuner_init(
struct dvb_frontend *fe)
467 static u8 msg[] = { 0x00, 0x40};
468 struct i2c_msg init_msg = {.
addr = 0x43,.flags = 0,.buf =
msg,.len =
sizeof(
msg) };
471 if (philips_td1316_tuner_init(fe))
480 static int philips_europa_tuner_sleep(
struct dvb_frontend *fe)
484 static u8 msg[] = { 0x00, 0x14 };
485 struct i2c_msg analog_msg = {.
addr = 0x43,.flags = 0,.buf =
msg,.len =
sizeof(
msg) };
487 if (philips_td1316_tuner_sleep(fe))
491 if (fe->
ops.i2c_gate_ctrl)
492 fe->
ops.i2c_gate_ctrl(fe, 1);
497 static int philips_europa_demod_sleep(
struct dvb_frontend *fe)
501 if (dev->original_demod_sleep)
502 dev->original_demod_sleep(fe);
503 fe->
ops.i2c_gate_ctrl(fe, 1);
509 .demod_address = 0x8,
515 .tuner_address = 0x61,
516 .request_firmware = philips_tda1004x_request_firmware
520 .demod_address = 0x08,
526 .tuner_address = 0x61,
527 .request_firmware = philips_tda1004x_request_firmware
531 .demod_address = 0x8,
537 .tuner_address = 0x63,
538 .request_firmware = philips_tda1004x_request_firmware
545 static int tda8290_i2c_gate_ctrl(
struct dvb_frontend* fe,
int enable)
550 static u8 tda8290_close[] = { 0x21, 0xc0};
551 static u8 tda8290_open[] = { 0x21, 0x80};
554 tda8290_msg.
buf = tda8290_close;
556 tda8290_msg.
buf = tda8290_open;
560 wprintk(
"could not access tda8290 I2C gate\n");
567 static int philips_tda827x_tuner_init(
struct dvb_frontend *fe)
572 switch (state->
config->antenna_switch) {
574 case 1:
dprintk(
"setting GPIO21 to 0 (TV antenna?)\n");
577 case 2:
dprintk(
"setting GPIO21 to 1 (Radio antenna?)\n");
584 static int philips_tda827x_tuner_sleep(
struct dvb_frontend *fe)
589 switch (state->
config->antenna_switch) {
591 case 1:
dprintk(
"setting GPIO21 to 1 (Radio antenna?)\n");
594 case 2:
dprintk(
"setting GPIO21 to 0 (TV antenna?)\n");
601 static int configure_tda827x_fe(
struct saa7134_dev *dev,
611 if (fe0->
dvb.frontend) {
613 fe0->
dvb.frontend->ops.i2c_gate_ctrl = tda8290_i2c_gate_ctrl;
619 wprintk(
"no tda827x tuner found at addr: %02x\n",
628 .init = philips_tda827x_tuner_init,
629 .sleep = philips_tda827x_tuner_sleep,
635 .init = philips_tda827x_tuner_init,
636 .sleep = philips_tda827x_tuner_sleep,
642 .init = philips_tda827x_tuner_init,
643 .sleep = philips_tda827x_tuner_sleep,
649 .init = philips_tda827x_tuner_init,
650 .sleep = philips_tda827x_tuner_sleep,
658 .demod_address = 0x08,
665 .tuner_address = 0x60,
666 .request_firmware = philips_tda1004x_request_firmware
670 .demod_address = 0x08,
678 .tuner_address = 0x61,
680 .request_firmware = philips_tda1004x_request_firmware
684 .demod_address = 0x08,
692 .tuner_address = 0x61,
693 .request_firmware = philips_tda1004x_request_firmware
697 .demod_address = 0x08,
705 .tuner_address = 0x60,
706 .request_firmware = philips_tda1004x_request_firmware
710 .demod_address = 0x08,
718 .tuner_address = 0x61,
720 .request_firmware = philips_tda1004x_request_firmware
724 .demod_address = 0x08,
732 .tuner_address = 0x61,
733 .request_firmware = philips_tda1004x_request_firmware
737 .demod_address = 0x08,
745 .tuner_address = 0x61,
746 .request_firmware = philips_tda1004x_request_firmware
750 .demod_address = 0x08,
758 .tuner_address = 0x61,
760 .request_firmware = philips_tda1004x_request_firmware
764 .demod_address = 0x09,
771 .tuner_address = 0x60,
772 .request_firmware = philips_tda1004x_request_firmware
776 .demod_address = 0x08,
783 .tuner_address = 0x60,
784 .request_firmware = philips_tda1004x_request_firmware
788 .demod_address = 0x08,
796 .tuner_address = 0x60,
797 .request_firmware = philips_tda1004x_request_firmware
801 .demod_address = 0x08,
809 .tuner_address = 0x61,
811 .request_firmware = philips_tda1004x_request_firmware
815 .demod_address = 0x08,
823 .tuner_address = 0x61,
825 .request_firmware = philips_tda1004x_request_firmware
829 .demod_address = 0x08,
837 .tuner_address = 0x61,
839 .request_firmware = philips_tda1004x_request_firmware
843 .demod_address = 0x08,
851 .tuner_address = 0x60,
853 .request_firmware = philips_tda1004x_request_firmware
857 .demod_address = 0x08,
865 .tuner_address = 0x61,
867 .request_firmware = philips_tda1004x_request_firmware
871 .demod_address = 0x0b,
879 .tuner_address = 0x61,
881 .request_firmware = philips_tda1004x_request_firmware
885 .demod_address = 0x0b,
893 .tuner_address = 0x61,
895 .request_firmware = philips_tda1004x_request_firmware
905 philips_tda827x_tuner_init(fe);
916 philips_tda827x_tuner_sleep(fe);
921 .init = ads_duo_tuner_init,
922 .sleep = ads_duo_tuner_sleep,
927 .demod_address = 0x08,
934 .tuner_address = 0x61,
935 .request_firmware = philips_tda1004x_request_firmware
939 .demod_address = 0x1e>>1,
942 .disable_i2c_gate_ctrl = 1,
946 .i2c_address = 0xc2>>1,
952 .demod_address = 0x1e>>1,
956 .disable_i2c_gate_ctrl = 1,
960 .demod_address = 0x0f,
963 .disable_i2c_gate_ctrl = 1,
976 .demod_address = 0x0e,
983 .demod_address = 0x0e,
997 if (fe->
ops.i2c_gate_ctrl) {
998 fe->
ops.i2c_gate_ctrl(fe, 1);
999 if (dev->original_set_voltage)
1000 res = dev->original_set_voltage(fe, voltage);
1001 fe->
ops.i2c_gate_ctrl(fe, 0);
1010 if (fe->
ops.i2c_gate_ctrl) {
1011 fe->
ops.i2c_gate_ctrl(fe, 1);
1012 if (dev->original_set_high_voltage)
1013 res = dev->original_set_high_voltage(fe, arg);
1014 fe->
ops.i2c_gate_ctrl(fe, 0);
1022 u8 wbuf[2] = { 0x1f, 00 };
1024 struct i2c_msg msg[] = { { .
addr = 0x08, .flags = 0, .buf = wbuf, .len = 1 },
1025 { .addr = 0x08, .flags =
I2C_M_RD, .buf = &rbuf, .len = 1 } };
1031 wbuf[1] = rbuf | 0x10;
1033 wbuf[1] = rbuf & 0xef;
1039 static int md8800_set_high_voltage2(
struct dvb_frontend *fe,
long arg)
1042 wprintk(
"%s: sorry can't set high LNB supply voltage from here\n", __func__);
1051 .demod_address = 0x0a,
1055 .demod_address = 0x0a,
1061 .demod_address = 0x0e,
1062 .voltage_inverted = 1,
1066 .tuner_address = 0x60,
1069 static struct mt312_config zl10313_compro_s350_config = {
1070 .demod_address = 0x0e,
1079 .spectral_inversion = 1,
1085 .demod_address = 0x10 >> 1,
1093 .disable_gate_access = 1,
1097 .atsc_6 = { .if_freq = 3250, .agc_mode = 3, .std = 4,
1098 .if_lvl = 1, .rfagc_top = 0x58, },
1099 .qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 5,
1100 .if_lvl = 1, .rfagc_top = 0x58, },
1104 .std_map = &hauppauge_tda18271_std_map,
1115 .demod_address = 0x10 >> 1,
1123 .disable_gate_access = 1,
1131 .demod_address = 0x10 >> 1,
1139 .disable_gate_access = 1,
1143 .dvbt_6 = { .if_freq = 3300, .agc_mode = 3, .std = 4,
1144 .if_lvl = 1, .rfagc_top = 0x37, },
1145 .dvbt_7 = { .if_freq = 3800, .agc_mode = 3, .std = 5,
1146 .if_lvl = 1, .rfagc_top = 0x37, },
1147 .dvbt_8 = { .if_freq = 4300, .agc_mode = 3, .std = 6,
1148 .if_lvl = 1, .rfagc_top = 0x37, },
1152 .std_map = &dtv1000s_tda18271_std_map,
1158 .demod_address = 0x1d,
1162 .if_clk_freq = 30400,
1177 .atsc_6 = { .if_freq = 3250, .agc_mode = 3, .std = 3,
1178 .if_lvl = 6, .rfagc_top = 0x37 },
1179 .qam_6 = { .if_freq = 4000, .agc_mode = 3, .std = 0,
1180 .if_lvl = 6, .rfagc_top = 0x37 },
1184 .std_map = &kworld_tda18271_std_map,
1188 .rf_cal_on_startup = 1
1210 int attach_xc3028 = 0;
1215 INIT_LIST_HEAD(&dev->frontends.felist);
1225 dev->
ts.nr_bufs = 32;
1226 dev->
ts.nr_packets = 32*4;
1235 switch (dev->
board) {
1237 dprintk(
"pinnacle 300i dvb setup\n");
1240 if (fe0->
dvb.frontend) {
1241 fe0->
dvb.frontend->ops.tuner_ops.set_params = mt352_pinnacle_tuner_set_params;
1246 dprintk(
"avertv 777 dvb setup\n");
1249 if (fe0->
dvb.frontend) {
1252 TUNER_PHILIPS_TD1316);
1256 dprintk(
"AverMedia A16D dvb setup\n");
1258 &avermedia_xc3028_mt352_dev,
1266 if (fe0->
dvb.frontend) {
1269 TUNER_PHILIPS_FMD1216ME_MK3);
1274 &philips_tu1216_60_config,
1276 if (fe0->
dvb.frontend) {
1277 fe0->
dvb.frontend->ops.tuner_ops.init = philips_tu1216_init;
1278 fe0->
dvb.frontend->ops.tuner_ops.set_params = philips_tda6651_pll_set;
1283 if (configure_tda827x_fe(dev, &tda827x_lifeview_config,
1284 &tda827x_cfg_0) < 0)
1285 goto detach_frontend;
1291 &philips_europa_config,
1293 if (fe0->
dvb.frontend) {
1294 dev->original_demod_sleep = fe0->
dvb.frontend->ops.sleep;
1295 fe0->
dvb.frontend->ops.sleep = philips_europa_demod_sleep;
1296 fe0->
dvb.frontend->ops.tuner_ops.init = philips_europa_tuner_init;
1297 fe0->
dvb.frontend->ops.tuner_ops.sleep = philips_europa_tuner_sleep;
1298 fe0->
dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params;
1303 &technotrend_budget_t3000_config,
1305 if (fe0->
dvb.frontend) {
1306 dev->original_demod_sleep = fe0->
dvb.frontend->ops.sleep;
1307 fe0->
dvb.frontend->ops.sleep = philips_europa_demod_sleep;
1308 fe0->
dvb.frontend->ops.tuner_ops.init = philips_europa_tuner_init;
1309 fe0->
dvb.frontend->ops.tuner_ops.sleep = philips_europa_tuner_sleep;
1310 fe0->
dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params;
1315 &philips_tu1216_61_config,
1317 if (fe0->
dvb.frontend) {
1318 fe0->
dvb.frontend->ops.tuner_ops.init = philips_tu1216_init;
1319 fe0->
dvb.frontend->ops.tuner_ops.set_params = philips_tda6651_pll_set;
1323 if (configure_tda827x_fe(dev, &kworld_dvb_t_210_config,
1324 &tda827x_cfg_2) < 0)
1325 goto detach_frontend;
1329 &hcw_tda10048_config,
1331 if (fe0->
dvb.frontend !=
NULL) {
1337 &hcw_tda18271_config);
1341 if (configure_tda827x_fe(dev, &philips_tiger_config,
1342 &tda827x_cfg_0) < 0)
1343 goto detach_frontend;
1346 if (configure_tda827x_fe(dev, &pinnacle_pctv_310i_config,
1347 &tda827x_cfg_1) < 0)
1348 goto detach_frontend;
1351 if (configure_tda827x_fe(dev, &hauppauge_hvr_1110_config,
1352 &tda827x_cfg_1) < 0)
1353 goto detach_frontend;
1357 &hcw_lgdt3305_config,
1359 if (fe0->
dvb.frontend) {
1365 &hcw_tda18271_config);
1369 if (configure_tda827x_fe(dev, &asus_p7131_dual_config,
1370 &tda827x_cfg_0) < 0)
1371 goto detach_frontend;
1374 if (configure_tda827x_fe(dev, &tda827x_lifeview_config,
1375 &tda827x_cfg_0) < 0)
1376 goto detach_frontend;
1379 if (!use_frontend) {
1380 if (configure_tda827x_fe(dev, &lifeview_trio_config,
1381 &tda827x_cfg_0) < 0)
1382 goto detach_frontend;
1385 if (fe0->
dvb.frontend) {
1388 wprintk(
"%s: Lifeview Trio, No tda826x found!\n", __func__);
1389 goto detach_frontend;
1392 0x08, 0, 0) ==
NULL) {
1393 wprintk(
"%s: Lifeview Trio, No ISL6421 found!\n", __func__);
1394 goto detach_frontend;
1402 &ads_tech_duo_config,
1404 if (fe0->
dvb.frontend) {
1407 &ads_duo_cfg) ==
NULL) {
1408 wprintk(
"no tda827x tuner found at addr: %02x\n",
1410 goto detach_frontend;
1413 wprintk(
"failed to attach tda10046\n");
1416 if (configure_tda827x_fe(dev, &tevion_dvbt220rf_config,
1417 &tda827x_cfg_0) < 0)
1418 goto detach_frontend;
1421 if (!use_frontend) {
1422 if (configure_tda827x_fe(dev, &md8800_dvbt_config,
1423 &tda827x_cfg_0) < 0)
1424 goto detach_frontend;
1428 if (fe0->
dvb.frontend) {
1432 struct i2c_msg msg = {.
addr = 0x08, .flags = 0, .len = 1};
1436 wprintk(
"%s: Medion Quadro, no tda826x "
1437 "found !\n", __func__);
1438 goto detach_frontend;
1440 if (dev_id != 0x08) {
1442 fe->
ops.i2c_gate_ctrl(fe, 1);
1445 wprintk(
"%s: Medion Quadro, no ISL6405 "
1446 "found !\n", __func__);
1447 goto detach_frontend;
1449 if (dev_id == 0x07) {
1455 fe->
ops.i2c_gate_ctrl(fe, 0);
1456 dev->original_set_voltage = fe->
ops.set_voltage;
1457 fe->
ops.set_voltage = md8800_set_voltage;
1458 dev->original_set_high_voltage = fe->
ops.enable_high_lnb_voltage;
1459 fe->
ops.enable_high_lnb_voltage = md8800_set_high_voltage;
1461 fe->
ops.set_voltage = md8800_set_voltage2;
1462 fe->
ops.enable_high_lnb_voltage = md8800_set_high_voltage2;
1470 if (fe0->
dvb.frontend)
1478 if (fe0->
dvb.frontend)
1481 TUNER_PHILIPS_TUV1236D);
1488 &kworld_s5h1411_config,
1490 if (fe0->
dvb.frontend !=
NULL) {
1496 &kworld_pc150u_tda18271_config);
1502 if (fe0->
dvb.frontend) {
1505 wprintk(
"%s: No tda826x found!\n", __func__);
1506 goto detach_frontend;
1510 wprintk(
"%s: No ISL6421 found!\n", __func__);
1511 goto detach_frontend;
1519 if (fe0->
dvb.frontend) {
1520 dev->original_demod_sleep = fe0->
dvb.frontend->ops.sleep;
1521 fe0->
dvb.frontend->ops.sleep = philips_europa_demod_sleep;
1525 TUNER_PHILIPS_FMD1216ME_MK3);
1530 &philips_europa_config,
1532 if (fe0->
dvb.frontend) {
1533 fe0->
dvb.frontend->ops.tuner_ops.init = philips_td1316_tuner_init;
1534 fe0->
dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params;
1538 if (configure_tda827x_fe(dev, &cinergy_ht_config,
1539 &tda827x_cfg_0) < 0)
1540 goto detach_frontend;
1543 if (configure_tda827x_fe(dev, &cinergy_ht_pci_config,
1544 &tda827x_cfg_0) < 0)
1545 goto detach_frontend;
1548 if (configure_tda827x_fe(dev, &philips_tiger_s_config,
1549 &tda827x_cfg_2) < 0)
1550 goto detach_frontend;
1553 if (configure_tda827x_fe(dev, &asus_p7131_4871_config,
1554 &tda827x_cfg_2) < 0)
1555 goto detach_frontend;
1558 if (configure_tda827x_fe(dev, &asus_p7131_hybrid_lna_config,
1559 &tda827x_cfg_2) < 0)
1560 goto detach_frontend;
1563 if (configure_tda827x_fe(dev, &avermedia_super_007_config,
1564 &tda827x_cfg_0) < 0)
1565 goto detach_frontend;
1568 if (configure_tda827x_fe(dev, &twinhan_dtv_dvb_3056_config,
1569 &tda827x_cfg_2_sw42) < 0)
1570 goto detach_frontend;
1575 if (fe0->
dvb.frontend) {
1578 wprintk(
"%s: No tda826x found!\n", __func__);
1579 goto detach_frontend;
1583 wprintk(
"%s: No lnbp21 found!\n", __func__);
1584 goto detach_frontend;
1589 if (configure_tda827x_fe(dev, &md8800_dvbt_config,
1590 &tda827x_cfg_0) < 0)
1591 goto detach_frontend;
1594 if (configure_tda827x_fe(dev, &philips_tiger_s_config,
1595 &tda827x_cfg_2) < 0)
1596 goto detach_frontend;
1599 dprintk(
"AverMedia E506R dvb setup\n");
1604 &avermedia_xc3028_mt352_dev,
1611 if (fe0->
dvb.frontend) {
1615 wprintk(
"%s: MD7134 DVB-S, no SD1878 "
1616 "found !\n", __func__);
1617 goto detach_frontend;
1620 fe = fe0->
dvb.frontend;
1621 fe->
ops.i2c_gate_ctrl(fe, 1);
1624 wprintk(
"%s: MD7134 DVB-S, no ISL6405 "
1625 "found !\n", __func__);
1626 goto detach_frontend;
1628 fe->
ops.i2c_gate_ctrl(fe, 0);
1629 dev->original_set_voltage = fe->
ops.set_voltage;
1630 fe->
ops.set_voltage = md8800_set_voltage;
1631 dev->original_set_high_voltage = fe->
ops.enable_high_lnb_voltage;
1632 fe->
ops.enable_high_lnb_voltage = md8800_set_high_voltage;
1640 &avermedia_xc3028_mt352_dev,
1645 if (!use_frontend) {
1646 if (configure_tda827x_fe(dev, &asus_tiger_3in1_config,
1647 &tda827x_cfg_2) < 0)
1648 goto detach_frontend;
1652 if (fe0->
dvb.frontend) {
1654 fe0->
dvb.frontend, 0x60,
1656 wprintk(
"%s: Asus Tiger 3in1, no "
1657 "tda826x found!\n", __func__);
1658 goto detach_frontend;
1662 wprintk(
"%s: Asus Tiger 3in1, no lnbp21"
1663 " found!\n", __func__);
1664 goto detach_frontend;
1670 if (!use_frontend) {
1671 if (configure_tda827x_fe(dev, &asus_ps3_100_config,
1672 &tda827x_cfg_2) < 0)
1673 goto detach_frontend;
1677 if (fe0->
dvb.frontend) {
1679 fe0->
dvb.frontend, 0x60,
1681 wprintk(
"%s: Asus My Cinema PS3-100, no "
1682 "tda826x found!\n", __func__);
1683 goto detach_frontend;
1687 wprintk(
"%s: Asus My Cinema PS3-100, no lnbp21"
1688 " found!\n", __func__);
1689 goto detach_frontend;
1695 if (configure_tda827x_fe(dev, &philips_tiger_config,
1696 &tda827x_cfg_0) < 0)
1697 goto detach_frontend;
1703 if (fe0->
dvb.frontend) {
1706 TUNER_PHILIPS_FMD1216MEX_MK3);
1713 if (fe0->
dvb.frontend) {
1715 &dev->
i2c_adap, &behold_x7_tunerconfig);
1722 if (fe0->
dvb.frontend) {
1724 &dev->
i2c_adap, &behold_x7_tunerconfig);
1731 &avertv_a700_mt312, &dev->
i2c_adap);
1732 if (fe0->
dvb.frontend) {
1735 wprintk(
"%s: No zl10036 found!\n",
1742 &zl10313_compro_s350_config, &dev->
i2c_adap);
1743 if (fe0->
dvb.frontend)
1746 wprintk(
"%s: No zl10039 found!\n",
1752 &videomate_t750_zl10353_config,
1754 if (fe0->
dvb.frontend !=
NULL) {
1758 &videomate_t750_qt1010_config) ==
NULL)
1759 wprintk(
"error attaching QT1010\n");
1764 &zolid_tda10048_config,
1766 if (fe0->
dvb.frontend !=
NULL) {
1772 &zolid_tda18271_config);
1777 &dtv1000s_tda10048_config,
1779 if (fe0->
dvb.frontend !=
NULL) {
1785 &dtv1000s_tda18271_config);
1793 &kworld_mb86a20s_config,
1795 if (fe0->
dvb.frontend !=
NULL) {
1799 fe0->
dvb.frontend->ops.i2c_gate_ctrl = kworld_sbtvd_gate_ctrl;
1802 &kworld_tda18271_config);
1809 &prohdtv_pro2_lgs8g75_config,
1811 if (fe0->
dvb.frontend !=
NULL) {
1817 &prohdtv_pro2_tda18271_config);
1821 wprintk(
"Huh? unknown DVB card?\n");
1825 if (attach_xc3028) {
1832 if (!fe0->
dvb.frontend)
1833 goto detach_frontend;
1839 goto detach_frontend;
1843 if (
NULL == fe0->
dvb.frontend) {
1845 goto detach_frontend;
1852 &dev->
pci->dev, adapter_nr, 0);
1858 if (fe0->
dvb.frontend->ops.init)
1859 fe0->
dvb.frontend->ops.init(fe0->
dvb.frontend);
1860 if (fe0->
dvb.frontend->ops.sleep)
1861 fe0->
dvb.frontend->ops.sleep(fe0->
dvb.frontend);
1862 if (fe0->
dvb.frontend->ops.tuner_ops.sleep)
1863 fe0->
dvb.frontend->ops.tuner_ops.sleep(fe0->
dvb.frontend);
1887 static int on = TDA9887_PRESENT | TDA9887_PORT2_INACTIVE;
1889 tda9887_cfg.
tuner = TUNER_TDA9887;
1890 tda9887_cfg.priv = &on;
1895 if ((dev->
eedata[2] == 0x07) && use_frontend) {
1898 struct i2c_msg msg = {.
addr = 0x08, .buf = &
data, .flags = 0, .len = 1};
1900 fe = fe0->
dvb.frontend;
1901 if (fe->
ops.i2c_gate_ctrl) {
1902 fe->
ops.i2c_gate_ctrl(fe, 1);
1904 fe->
ops.i2c_gate_ctrl(fe, 0);
1918 static int __init dvb_register(
void)
1923 static void __exit dvb_unregister(
void)