em28xx-dvb.c (c4de673b775e4db48cd2db6277e0c6714332ca0c) em28xx-dvb.c (ec573362afa202acca640629b321ac09b6911448)
1/*
2 DVB device driver for em28xx
3
4 (c) 2008-2011 Mauro Carvalho Chehab <mchehab@infradead.org>
5
6 (c) 2008 Devin Heitmueller <devin.heitmueller@gmail.com>
7 - Fixes for the driver to properly work with HVR-950
8 - Fixes for the driver to properly work with Pinnacle PCTV HD Pro Stick

--- 37 unchanged lines hidden (view full) ---

46#include "drxd.h"
47#include "cxd2820r.h"
48#include "tda18271c2dd.h"
49#include "drxk.h"
50#include "tda10071.h"
51#include "a8293.h"
52#include "qt1010.h"
53#include "mb86a20s.h"
1/*
2 DVB device driver for em28xx
3
4 (c) 2008-2011 Mauro Carvalho Chehab <mchehab@infradead.org>
5
6 (c) 2008 Devin Heitmueller <devin.heitmueller@gmail.com>
7 - Fixes for the driver to properly work with HVR-950
8 - Fixes for the driver to properly work with Pinnacle PCTV HD Pro Stick

--- 37 unchanged lines hidden (view full) ---

46#include "drxd.h"
47#include "cxd2820r.h"
48#include "tda18271c2dd.h"
49#include "drxk.h"
50#include "tda10071.h"
51#include "a8293.h"
52#include "qt1010.h"
53#include "mb86a20s.h"
54#include "m88ds3103.h"
55#include "m88ts2022.h"
54
55MODULE_DESCRIPTION("driver for em28xx based DVB cards");
56MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>");
57MODULE_LICENSE("GPL");
58
59static unsigned int debug;
60module_param(debug, int, 0644);
61MODULE_PARM_DESC(debug, "enable debug messages [dvb]");

--- 741 unchanged lines hidden (view full) ---

803};
804
805static struct tda18271_config c3tech_duo_tda18271_config = {
806 .std_map = &mb86a20s_tda18271_config,
807 .gate = TDA18271_GATE_DIGITAL,
808 .small_i2c = TDA18271_03_BYTE_CHUNK_INIT,
809};
810
56
57MODULE_DESCRIPTION("driver for em28xx based DVB cards");
58MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@infradead.org>");
59MODULE_LICENSE("GPL");
60
61static unsigned int debug;
62module_param(debug, int, 0644);
63MODULE_PARM_DESC(debug, "enable debug messages [dvb]");

--- 741 unchanged lines hidden (view full) ---

805};
806
807static struct tda18271_config c3tech_duo_tda18271_config = {
808 .std_map = &mb86a20s_tda18271_config,
809 .gate = TDA18271_GATE_DIGITAL,
810 .small_i2c = TDA18271_03_BYTE_CHUNK_INIT,
811};
812
813static const struct m88ds3103_config pctv_461e_m88ds3103_config = {
814 .i2c_addr = 0x68,
815 .clock = 27000000,
816 .i2c_wr_max = 33,
817 .clock_out = 0,
818 .ts_mode = M88DS3103_TS_PARALLEL_16,
819 .agc = 0x99,
820};
811
821
822static const struct m88ts2022_config em28xx_m88ts2022_config = {
823 .i2c_addr = 0x60,
824 .clock = 27000000,
825};
826
812/* ------------------------------------------------------------------ */
813
814static int em28xx_attach_xc3028(u8 addr, struct em28xx *dev)
815{
816 struct dvb_frontend *fe;
817 struct xc2028_config cfg;
818
819 memset(&cfg, 0, sizeof(cfg));

--- 505 unchanged lines hidden (view full) ---

1325 /* Attach the demodulator. */
1326 if (!dvb_attach(tda18271_attach, dvb->fe[0], 0x60,
1327 &dev->i2c_adap[dev->def_i2c_bus],
1328 &kworld_ub435q_v2_config)) {
1329 result = -EINVAL;
1330 goto out_free;
1331 }
1332 break;
827/* ------------------------------------------------------------------ */
828
829static int em28xx_attach_xc3028(u8 addr, struct em28xx *dev)
830{
831 struct dvb_frontend *fe;
832 struct xc2028_config cfg;
833
834 memset(&cfg, 0, sizeof(cfg));

--- 505 unchanged lines hidden (view full) ---

1340 /* Attach the demodulator. */
1341 if (!dvb_attach(tda18271_attach, dvb->fe[0], 0x60,
1342 &dev->i2c_adap[dev->def_i2c_bus],
1343 &kworld_ub435q_v2_config)) {
1344 result = -EINVAL;
1345 goto out_free;
1346 }
1347 break;
1348 case EM28178_BOARD_PCTV_461E:
1349 {
1350 /* demod I2C adapter */
1351 struct i2c_adapter *i2c_adapter;
1352
1353 /* attach demod */
1354 dvb->fe[0] = dvb_attach(m88ds3103_attach,
1355 &pctv_461e_m88ds3103_config,
1356 &dev->i2c_adap[dev->def_i2c_bus],
1357 &i2c_adapter);
1358 if (dvb->fe[0] == NULL) {
1359 result = -ENODEV;
1360 goto out_free;
1361 }
1362
1363 /* attach tuner */
1364 if (!dvb_attach(m88ts2022_attach, dvb->fe[0],
1365 i2c_adapter,
1366 &em28xx_m88ts2022_config)) {
1367 dvb_frontend_detach(dvb->fe[0]);
1368 result = -ENODEV;
1369 goto out_free;
1370 }
1371
1372 /* delegate signal strength measurement to tuner */
1373 dvb->fe[0]->ops.read_signal_strength =
1374 dvb->fe[0]->ops.tuner_ops.get_rf_strength;
1375
1376 /* attach SEC */
1377 if (!dvb_attach(a8293_attach, dvb->fe[0],
1378 &dev->i2c_adap[dev->def_i2c_bus],
1379 &em28xx_a8293_config)) {
1380 dvb_frontend_detach(dvb->fe[0]);
1381 result = -ENODEV;
1382 goto out_free;
1383 }
1384 }
1385 break;
1333 default:
1334 em28xx_errdev("/2: The frontend of your DVB/ATSC card"
1335 " isn't supported yet\n");
1336 break;
1337 }
1338 if (NULL == dvb->fe[0]) {
1339 em28xx_errdev("/2: frontend initialization failed\n");
1340 result = -EINVAL;

--- 81 unchanged lines hidden ---
1386 default:
1387 em28xx_errdev("/2: The frontend of your DVB/ATSC card"
1388 " isn't supported yet\n");
1389 break;
1390 }
1391 if (NULL == dvb->fe[0]) {
1392 em28xx_errdev("/2: frontend initialization failed\n");
1393 result = -EINVAL;

--- 81 unchanged lines hidden ---