Lines Matching +full:pci +full:- +full:host +full:- +full:cam +full:- +full:generic

1 // SPDX-License-Identifier: GPL-2.0-or-later
12 #include <linux/pci.h>
14 #include <media/drv-intf/cx25840.h>
19 #include "netup-eeprom.h"
20 #include "netup-init.h"
21 #include "altera-ci.h"
24 #include "cx23888-ir.h"
29 "NetUP Dual DVB-T/C CI card revision");
35 "\t\t\tHVR-1250 (reported safe)\n"
41 /* ------------------------------------------------------------------ */
46 .name = "UNKNOWN/GENERIC",
64 .name = "Hauppauge WinTV-HVR1800lp",
85 .name = "Hauppauge WinTV-HVR1800",
117 .name = "Hauppauge WinTV-HVR1250",
157 .name = "Hauppauge WinTV-HVR1500Q",
161 .name = "Hauppauge WinTV-HVR1500",
188 .name = "Hauppauge WinTV-HVR1200",
192 .name = "Hauppauge WinTV-HVR1700",
196 .name = "Hauppauge WinTV-HVR1400",
205 .name = "DViCO FusionHDTV DVB-T Dual Express",
297 .name = "DVBWorld DVB-S2 2005",
302 .name = "NetUP Dual DVB-S2 CI",
307 .name = "Hauppauge WinTV-HVR1270",
311 .name = "Hauppauge WinTV-HVR1275",
315 .name = "Hauppauge WinTV-HVR1255",
344 .name = "Hauppauge WinTV-HVR1255",
367 .name = "Hauppauge WinTV-HVR1210",
371 .name = "Mygica X8506 DMB-TH",
401 .name = "Magic-Pro ProHDTV Extreme 2",
431 .name = "Hauppauge WinTV-HVR1850",
465 .name = "Hauppauge WinTV-HVR1290",
469 .name = "Mygica X8558 PRO DMB-TH",
522 .name = "NetUP Dual DVB-T/C-CI RF",
536 .name = "MPX-885",
561 .name = "Mygica X8502/X8507 ISDB-T",
604 .name = "Prof Revolution DVB-S2 8000",
608 .name = "Hauppauge WinTV-HVR4400/HVR5500",
650 .name = "DViCO FusionHDTV DVB-T Dual Express2",
655 .name = "Hauppauge ImpactVCB-e",
684 .name = "Technotrend TT-budget CT2-4500 CI",
702 .name = "Hauppauge WinTV-HVR5525",
778 .name = "Hauppauge WinTV-QuadHD-DVB",
794 .name = "Hauppauge WinTV-QuadHD-DVB(885)",
800 .name = "Hauppauge WinTV-QuadHD-ATSC",
815 .name = "Hauppauge WinTV-QuadHD-ATSC(885)",
821 .name = "Hauppauge WinTV-HVR-1265(161111)",
841 .name = "Hauppauge WinTV-Starburst2",
864 .name = "AVerMedia H789-C",
891 /* ------------------------------------------------------------------ */
892 /* PCI subsystem IDs */
1118 … = CX23885_BOARD_HAUPPAUGE_HVR4400, /* Hauppauge WinTV HVR-4400 (Model 121xxx, Hybrid DVB-T/S2, …
1122 … = CX23885_BOARD_HAUPPAUGE_HVR4400, /* Hauppauge WinTV HVR-5500 (Model 121xxx, Hybrid DVB-T/C/S2…
1126 ….card = CX23885_BOARD_HAUPPAUGE_STARBURST, /* Hauppauge WinTV Starburst (Model 121x00, DVB-S2…
1130 … = CX23885_BOARD_HAUPPAUGE_HVR4400, /* Hauppauge WinTV HVR-5500 (Model 121xxx, Hybrid DVB-T/C/S2…
1206 …CX23885_BOARD_HAUPPAUGE_HVR1265_K4, /* Hauppauge WinTV HVR-1265 (Model 161xx1, Hybrid ATSC/QAM-B) …
1227 if (0 == dev->pci->subsystem_vendor && in cx23885_card_list()
1228 0 == dev->pci->subsystem_device) { in cx23885_card_list()
1233 "%s: -- tux\n", in cx23885_card_list()
1234 dev->name, dev->name, dev->name, dev->name, dev->name); in cx23885_card_list()
1240 dev->name, dev->name, dev->name, dev->name); in cx23885_card_list()
1243 dev->name); in cx23885_card_list()
1245 pr_info("%s: card=%d -> %s\n", in cx23885_card_list()
1246 dev->name, i, cx23885_boards[i].name); in cx23885_card_list()
1266 dev->name, in viewcast_eeprom()
1267 cx23885_boards[dev->board].name, in viewcast_eeprom()
1280 /* WinTV-HVR1270 (PCIe, Retail, half height) in hauppauge_eeprom()
1283 /* WinTV-HVR1210 (PCIe, Retail, half height) in hauppauge_eeprom()
1284 * DVB-T and basic analog, IR Blast */ in hauppauge_eeprom()
1286 /* WinTV-HVR1270 (PCIe, Retail, half height) in hauppauge_eeprom()
1289 /* WinTV-HVR1210 (PCIe, Retail, half height) in hauppauge_eeprom()
1290 * DVB-T and basic analog, IR Recv */ in hauppauge_eeprom()
1292 /* WinTV-HVR1275 (PCIe, Retail, half height) in hauppauge_eeprom()
1295 /* WinTV-HVR1210 (PCIe, Retail, half height) in hauppauge_eeprom()
1296 * DVB-T and basic analog, IR Recv */ in hauppauge_eeprom()
1298 /* WinTV-HVR1270 (PCIe, Retail, full height) in hauppauge_eeprom()
1301 /* WinTV-HVR1210 (PCIe, Retail, full height) in hauppauge_eeprom()
1302 * DVB-T and basic analog, IR Blast */ in hauppauge_eeprom()
1304 /* WinTV-HVR1270 (PCIe, Retail, full height) in hauppauge_eeprom()
1307 /* WinTV-HVR1210 (PCIe, Retail, full height) in hauppauge_eeprom()
1308 * DVB-T and basic analog, IR Recv */ in hauppauge_eeprom()
1310 /* WinTV-HVR1275 (PCIe, Retail, full height) in hauppauge_eeprom()
1313 /* WinTV-HVR1210 (PCIe, Retail, full height) in hauppauge_eeprom()
1314 * DVB-T and basic analog, IR Recv */ in hauppauge_eeprom()
1316 /* WinTV-HVR1200 (PCIe, Retail, full height) in hauppauge_eeprom()
1317 * DVB-T and basic analog */ in hauppauge_eeprom()
1319 /* WinTV-ImpactVCB-e (PCIe, Retail, half height) in hauppauge_eeprom()
1322 /* WinTV-HVR1200 (PCIe, OEM, half height) in hauppauge_eeprom()
1323 * DVB-T and basic analog */ in hauppauge_eeprom()
1325 /* WinTV-HVR1200 (PCIe, OEM, half height) in hauppauge_eeprom()
1326 * DVB-T and basic analog */ in hauppauge_eeprom()
1328 /* WinTV-HVR1200 (PCIe, OEM, full height) in hauppauge_eeprom()
1329 * DVB-T and basic analog */ in hauppauge_eeprom()
1331 /* WinTV-HVR1200 (PCIe, OEM, half height) in hauppauge_eeprom()
1332 * DVB-T and basic analog */ in hauppauge_eeprom()
1334 /* WinTV-HVR1200 (PCIe, OEM, full height) in hauppauge_eeprom()
1335 * DVB-T and basic analog */ in hauppauge_eeprom()
1337 /* WinTV-HVR1200 (PCIe, OEM, full height) in hauppauge_eeprom()
1338 * DVB-T and basic analog */ in hauppauge_eeprom()
1340 /* WinTV-HVR1200 (PCIe, OEM, half height) in hauppauge_eeprom()
1341 * DVB-T and basic analog */ in hauppauge_eeprom()
1343 /* WinTV-HVR1200 (PCIe, OEM, full height) in hauppauge_eeprom()
1344 * DVB-T and basic analog */ in hauppauge_eeprom()
1346 /* WinTV-HVR1800lp (PCIe, Retail, No IR, Dual in hauppauge_eeprom()
1349 /* WinTV-HVR1500 (Express Card, OEM, No IR, ATSC in hauppauge_eeprom()
1352 /* WinTV-HVR1500 (Express Card, Retail, No IR, ATSC in hauppauge_eeprom()
1355 /* WinTV-HVR1500Q (Express Card, OEM, No IR, ATSC/QAM in hauppauge_eeprom()
1358 /* WinTV-HVR1500Q (Express Card, Retail, No IR, ATSC/QAM in hauppauge_eeprom()
1361 /* WinTV-HVR1800 (PCIe, Retail, 3.5mm in, IR, No FM, in hauppauge_eeprom()
1364 /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM, in hauppauge_eeprom()
1367 /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, FM, in hauppauge_eeprom()
1370 /* WinTV-HVR1800 (PCIe, OEM, RCA in, No IR, No FM, in hauppauge_eeprom()
1373 /* WinTV-HVR1800 (PCIe, OEM, No IR, No FM, in hauppauge_eeprom()
1376 /* WinTV-HVR1250 (PCIe, Retail, IR, full height, in hauppauge_eeprom()
1379 /* WinTV-HVR1250 (PCIe, Retail, IR, half height, in hauppauge_eeprom()
1382 /* WinTV-HVR1250 (PCIe, No IR, half height, in hauppauge_eeprom()
1385 /* WinTV-HVR1250 (PCIe, OEM, No IR, half height, in hauppauge_eeprom()
1388 /* WinTV-HVR1250 (PCIe, OEM, No IR, full height, in hauppauge_eeprom()
1391 /* WinTV-HVR1250 (PCIe, OEM, No IR, half height, in hauppauge_eeprom()
1394 /* WinTV-HVR1400 (Express Card, Retail, IR, in hauppauge_eeprom()
1395 * DVB-T and Basic analog */ in hauppauge_eeprom()
1397 /* WinTV-HVR1700 (PCIe, OEM, No IR, half height) in hauppauge_eeprom()
1398 * DVB-T and MPEG2 HW Encoder */ in hauppauge_eeprom()
1400 /* WinTV-HVR1700 (PCIe, OEM, No IR, full height) in hauppauge_eeprom()
1401 * DVB-T and MPEG2 HW Encoder */ in hauppauge_eeprom()
1404 /* WinTV-HVR1850 (PCIe, Retail, 3.5mm in, IR, FM, in hauppauge_eeprom()
1408 /* WinTV-HVR1290 (PCIe, OEM, RCA in, IR, in hauppauge_eeprom()
1411 /* WinTV-HVR4400 (PCIe, DVB-S2, DVB-C/T) */ in hauppauge_eeprom()
1414 /* WinTV-HVR5500 (PCIe, DVB-S2, DVB-C/T) */ in hauppauge_eeprom()
1417 /* WinTV-HVR5525 (PCIe, DVB-S/S2, DVB-T/T2/C) */ in hauppauge_eeprom()
1420 /* WinTV-HVR-1265 K4 (PCIe, Analog/ATSC/QAM-B) */ in hauppauge_eeprom()
1424 /* WinTV-QuadHD (DVB) Tuner Pair 1 (PCIe, IR, half height, in hauppauge_eeprom()
1425 DVB-T/T2/C, DVB-T/T2/C */ in hauppauge_eeprom()
1429 /* WinTV-QuadHD (DVB) Tuner Pair 2 (PCIe, IR, half height, in hauppauge_eeprom()
1430 DVB-T/T2/C, DVB-T/T2/C */ in hauppauge_eeprom()
1434 /* WinTV-QuadHD (ATSC) Tuner Pair 1 (PCIe, IR, half height, in hauppauge_eeprom()
1435 * ATSC/QAM-B, ATSC/QAM-B */ in hauppauge_eeprom()
1439 /* WinTV-QuadHD (ATSC) Tuner Pair 2 (PCIe, IR, half height, in hauppauge_eeprom()
1440 * ATSC/QAM-B, ATSC/QAM-B */ in hauppauge_eeprom()
1444 dev->name, tv.model); in hauppauge_eeprom()
1449 dev->name, tv.model); in hauppauge_eeprom()
1462 switch (dev->board) { in tbs_card_init()
1473 ((buf[i >> 3] >> (7 - (i & 7))) & 1) | 4); in tbs_card_init()
1484 struct cx23885_dev *dev = port->dev; in cx23885_tuner_callback()
1493 return -EINVAL; in cx23885_tuner_callback()
1496 switch (dev->board) { in cx23885_tuner_callback()
1514 if (port->nr == 1) in cx23885_tuner_callback()
1516 else if (port->nr == 2) in cx23885_tuner_callback()
1524 altera_ci_tuner_reset(dev, port->nr); in cx23885_tuner_callback()
1544 switch (dev->board) { in cx23885_gpio_setup()
1546 /* GPIO-0 cx24227 demodulator reset */ in cx23885_gpio_setup()
1550 /* GPIO-0 cx24227 demodulator */ in cx23885_gpio_setup()
1551 /* GPIO-2 xc3028 tuner */ in cx23885_gpio_setup()
1562 /* GPIO-0 cx24227 demodulator reset */ in cx23885_gpio_setup()
1563 /* GPIO-2 xc5000 tuner reset */ in cx23885_gpio_setup()
1567 /* GPIO-0 656_CLK */ in cx23885_gpio_setup()
1568 /* GPIO-1 656_D0 */ in cx23885_gpio_setup()
1569 /* GPIO-2 8295A Reset */ in cx23885_gpio_setup()
1570 /* GPIO-3-10 cx23417 data0-7 */ in cx23885_gpio_setup()
1571 /* GPIO-11-14 cx23417 addr0-3 */ in cx23885_gpio_setup()
1572 /* GPIO-15-18 cx23417 READY, CS, RD, WR */ in cx23885_gpio_setup()
1573 /* GPIO-19 IR_RX */ in cx23885_gpio_setup()
1598 /* GPIO-0 tda10048 demodulator reset */ in cx23885_gpio_setup()
1599 /* GPIO-2 tda18271 tuner reset */ in cx23885_gpio_setup()
1609 /* GPIO-0 TDA10048 demodulator reset */ in cx23885_gpio_setup()
1610 /* GPIO-2 TDA8295A Reset */ in cx23885_gpio_setup()
1611 /* GPIO-3-10 cx23417 data0-7 */ in cx23885_gpio_setup()
1612 /* GPIO-11-14 cx23417 addr0-3 */ in cx23885_gpio_setup()
1613 /* GPIO-15-18 cx23417 READY, CS, RD, WR */ in cx23885_gpio_setup()
1616 /* GPIO-19 IR_RX */ in cx23885_gpio_setup()
1617 /* GPIO-20 IR_TX 416/DVBT Select */ in cx23885_gpio_setup()
1618 /* GPIO-21 IIS DAT */ in cx23885_gpio_setup()
1619 /* GPIO-22 IIS WCLK */ in cx23885_gpio_setup()
1620 /* GPIO-23 IIS BCLK */ in cx23885_gpio_setup()
1630 /* GPIO-0 Dibcom7000p demodulator reset */ in cx23885_gpio_setup()
1631 /* GPIO-2 xc3028L tuner reset */ in cx23885_gpio_setup()
1632 /* GPIO-13 LED */ in cx23885_gpio_setup()
1642 /* GPIO-0 xc5000 tuner reset i2c bus 0 */ in cx23885_gpio_setup()
1643 /* GPIO-1 s5h1409 demod reset i2c bus 0 */ in cx23885_gpio_setup()
1644 /* GPIO-2 xc5000 tuner reset i2c bus 1 */ in cx23885_gpio_setup()
1645 /* GPIO-3 s5h1409 demod reset i2c bus 0 */ in cx23885_gpio_setup()
1656 /* GPIO-0 portb xc3028 reset */ in cx23885_gpio_setup()
1657 /* GPIO-1 portb zl10353 reset */ in cx23885_gpio_setup()
1658 /* GPIO-2 portc xc3028 reset */ in cx23885_gpio_setup()
1659 /* GPIO-3 portc zl10353 reset */ in cx23885_gpio_setup()
1674 /* GPIO-2 xc3028 tuner reset */ in cx23885_gpio_setup()
1677 /* GPIO-? zl10353 demod reset */ in cx23885_gpio_setup()
1700 /* GPIO-0 INTA from CiMax1 in cx23885_gpio_setup()
1701 GPIO-1 INTB from CiMax2 in cx23885_gpio_setup()
1702 GPIO-2 reset chips in cx23885_gpio_setup()
1703 GPIO-3 to GPIO-10 data/addr for CA in cx23885_gpio_setup()
1704 GPIO-11 ~CS0 to CiMax1 in cx23885_gpio_setup()
1705 GPIO-12 ~CS1 to CiMax2 in cx23885_gpio_setup()
1706 GPIO-13 ADL0 load LSB addr in cx23885_gpio_setup()
1707 GPIO-14 ADL1 load MSB addr in cx23885_gpio_setup()
1708 GPIO-15 ~RDY from CiMax in cx23885_gpio_setup()
1709 GPIO-17 ~RD to CiMax in cx23885_gpio_setup()
1710 GPIO-18 ~WR to CiMax in cx23885_gpio_setup()
1717 cx_write(MC417_CTL, 0x00000037);/* enable GPIO3-18 pins */ in cx23885_gpio_setup()
1718 /* GPIO-15 IN as ~ACK, rest as OUT */ in cx23885_gpio_setup()
1730 /* GPIO-5 RF Control: 0 = RF1 Terrestrial, 1 = RF2 Cable */ in cx23885_gpio_setup()
1731 /* GPIO-6 I2C Gate which can isolate the demod from the bus */ in cx23885_gpio_setup()
1732 /* GPIO-9 Demod reset */ in cx23885_gpio_setup()
1744 /* GPIO-0 (0)Analog / (1)Digital TV */ in cx23885_gpio_setup()
1745 /* GPIO-1 reset XC5000 */ in cx23885_gpio_setup()
1746 /* GPIO-2 demod reset */ in cx23885_gpio_setup()
1754 /* GPIO-0 reset first ATBM8830 */ in cx23885_gpio_setup()
1755 /* GPIO-1 reset second ATBM8830 */ in cx23885_gpio_setup()
1764 /* GPIO-0 656_CLK */ in cx23885_gpio_setup()
1765 /* GPIO-1 656_D0 */ in cx23885_gpio_setup()
1766 /* GPIO-2 Wake# */ in cx23885_gpio_setup()
1767 /* GPIO-3-10 cx23417 data0-7 */ in cx23885_gpio_setup()
1768 /* GPIO-11-14 cx23417 addr0-3 */ in cx23885_gpio_setup()
1769 /* GPIO-15-18 cx23417 READY, CS, RD, WR */ in cx23885_gpio_setup()
1770 /* GPIO-19 IR_RX */ in cx23885_gpio_setup()
1771 /* GPIO-20 C_IR_TX */ in cx23885_gpio_setup()
1772 /* GPIO-21 I2S DAT */ in cx23885_gpio_setup()
1773 /* GPIO-22 I2S WCLK */ in cx23885_gpio_setup()
1774 /* GPIO-23 I2S BCLK */ in cx23885_gpio_setup()
1778 /* GPIO-14 S5H1411/CX24228 Reset */ in cx23885_gpio_setup()
1779 /* GPIO-13 EEPROM write protect */ in cx23885_gpio_setup()
1797 /* GPIO-0 ~INT in in cx23885_gpio_setup()
1798 GPIO-1 TMS out in cx23885_gpio_setup()
1799 GPIO-2 ~reset chips out in cx23885_gpio_setup()
1800 GPIO-3 to GPIO-10 data/addr for CA in/out in cx23885_gpio_setup()
1801 GPIO-11 ~CS out in cx23885_gpio_setup()
1802 GPIO-12 ADDR out in cx23885_gpio_setup()
1803 GPIO-13 ~WR out in cx23885_gpio_setup()
1804 GPIO-14 ~RD out in cx23885_gpio_setup()
1805 GPIO-15 ~RDY in in cx23885_gpio_setup()
1806 GPIO-16 TCK out in cx23885_gpio_setup()
1807 GPIO-17 TDO in in cx23885_gpio_setup()
1808 GPIO-18 TDI out in cx23885_gpio_setup()
1810 cx_set(GP0_IO, 0x00060000); /* GPIO-1,2 as out */ in cx23885_gpio_setup()
1811 /* GPIO-0 as INT, reset & TMS low */ in cx23885_gpio_setup()
1815 cx_write(MC417_CTL, 0x00000037);/* enable GPIO-3..18 pins */ in cx23885_gpio_setup()
1816 /* GPIO-17 is TDO in, GPIO-15 is ~RDY in, rest is out */ in cx23885_gpio_setup()
1825 /* GPIO-8 tda10071 demod reset */ in cx23885_gpio_setup()
1826 /* GPIO-9 si2165 demod reset (only HVR4400/HVR5500)*/ in cx23885_gpio_setup()
1839 /* GPIO-0,1,2 setup direction as output */ in cx23885_gpio_setup()
1866 /* enable GPIO3-18 pins */ in cx23885_gpio_setup()
1877 * GPIO-0 INTA from CiMax, input in cx23885_gpio_setup()
1878 * GPIO-1 reset CiMax, output, high active in cx23885_gpio_setup()
1879 * GPIO-2 reset demod, output, low active in cx23885_gpio_setup()
1880 * GPIO-3 to GPIO-10 data/addr for CAM in cx23885_gpio_setup()
1881 * GPIO-11 ~CS0 to CiMax1 in cx23885_gpio_setup()
1882 * GPIO-12 ~CS1 to CiMax2 in cx23885_gpio_setup()
1883 * GPIO-13 ADL0 load LSB addr in cx23885_gpio_setup()
1884 * GPIO-14 ADL1 load MSB addr in cx23885_gpio_setup()
1885 * GPIO-15 ~RDY from CiMax in cx23885_gpio_setup()
1886 * GPIO-17 ~RD to CiMax in cx23885_gpio_setup()
1887 * GPIO-18 ~WR to CiMax in cx23885_gpio_setup()
1895 cx_write(MC417_CTL, 0x00000037); /* enable GPIO3-18 pins */ in cx23885_gpio_setup()
1897 /* GPIO-15 IN as ~ACK, rest as OUT */ in cx23885_gpio_setup()
1916 * GPIO-00 IR_WIDE in cx23885_gpio_setup()
1917 * GPIO-02 wake# in cx23885_gpio_setup()
1918 * GPIO-03 VAUX Pres. in cx23885_gpio_setup()
1919 * GPIO-07 PROG# in cx23885_gpio_setup()
1920 * GPIO-08 SAT_RESN in cx23885_gpio_setup()
1921 * GPIO-09 TER_RESN in cx23885_gpio_setup()
1922 * GPIO-10 B2_SENSE in cx23885_gpio_setup()
1923 * GPIO-11 B1_SENSE in cx23885_gpio_setup()
1924 * GPIO-15 IR_LED_STATUS in cx23885_gpio_setup()
1925 * GPIO-19 IR_NARROW in cx23885_gpio_setup()
1926 * GPIO-20 Blauster1 in cx23885_gpio_setup()
1949 * GPIO-08 TER1_RESN in cx23885_gpio_setup()
1950 * GPIO-09 TER2_RESN in cx23885_gpio_setup()
1994 switch (dev->board) { in cx23885_ir_init()
2012 dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_888_IR); in cx23885_ir_init()
2013 v4l2_subdev_call(dev->sd_cx25840, core, s_io_pin_config, in cx23885_ir_init()
2021 dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_888_IR); in cx23885_ir_init()
2022 v4l2_subdev_call(dev->sd_cx25840, core, s_io_pin_config, in cx23885_ir_init()
2028 v4l2_subdev_call(dev->sd_ir, ir, tx_g_parameters, &params); in cx23885_ir_init()
2032 v4l2_subdev_call(dev->sd_ir, ir, tx_s_parameters, &params); in cx23885_ir_init()
2034 v4l2_subdev_call(dev->sd_ir, ir, tx_s_parameters, &params); in cx23885_ir_init()
2050 dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_AV_CORE); in cx23885_ir_init()
2051 if (dev->sd_ir == NULL) { in cx23885_ir_init()
2052 ret = -ENODEV; in cx23885_ir_init()
2055 v4l2_subdev_call(dev->sd_cx25840, core, s_io_pin_config, in cx23885_ir_init()
2061 dev->sd_ir = cx23885_find_hw(dev, CX23885_HW_AV_CORE); in cx23885_ir_init()
2062 if (dev->sd_ir == NULL) { in cx23885_ir_init()
2063 ret = -ENODEV; in cx23885_ir_init()
2066 v4l2_subdev_call(dev->sd_cx25840, core, s_io_pin_config, in cx23885_ir_init()
2071 request_module("ir-kbd-i2c"); in cx23885_ir_init()
2080 switch (dev->board) { in cx23885_ir_fini()
2086 dev->sd_ir = NULL; in cx23885_ir_fini()
2103 dev->sd_ir = NULL; in cx23885_ir_fini()
2135 switch (dev->board) { in cx23885_ir_pci_int_enable()
2139 if (dev->sd_ir) in cx23885_ir_pci_int_enable()
2155 if (dev->sd_ir) in cx23885_ir_pci_int_enable()
2163 struct cx23885_tsport *ts1 = &dev->ts1; in cx23885_card_setup()
2164 struct cx23885_tsport *ts2 = &dev->ts2; in cx23885_card_setup()
2168 if (dev->i2c_bus[0].i2c_rc == 0) { in cx23885_card_setup()
2169 dev->i2c_bus[0].i2c_client.addr = 0xa0 >> 1; in cx23885_card_setup()
2170 tveeprom_read(&dev->i2c_bus[0].i2c_client, in cx23885_card_setup()
2174 switch (dev->board) { in cx23885_card_setup()
2176 if (dev->i2c_bus[0].i2c_rc == 0) { in cx23885_card_setup()
2186 if (dev->i2c_bus[0].i2c_rc == 0) in cx23885_card_setup()
2210 if (dev->i2c_bus[0].i2c_rc == 0) in cx23885_card_setup()
2215 dev->i2c_bus[1].i2c_client.addr = 0xa0 >> 1; in cx23885_card_setup()
2216 tveeprom_read(&dev->i2c_bus[1].i2c_client, in cx23885_card_setup()
2218 if (dev->i2c_bus[0].i2c_rc == 0) in cx23885_card_setup()
2223 switch (dev->board) { in cx23885_card_setup()
2226 ts1->gen_ctrl_val = 0x4; /* Parallel */ in cx23885_card_setup()
2227 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2228 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2231 ts2->gen_ctrl_val = 0x10e; in cx23885_card_setup()
2232 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2233 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2238 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2239 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2240 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2243 ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2244 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2245 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2249 /* Defaults for VID B - Analog encoder */ in cx23885_card_setup()
2251 ts1->gen_ctrl_val = 0x10e; in cx23885_card_setup()
2252 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2253 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2256 ts1->vld_misc_val = 0x2000; in cx23885_card_setup()
2257 ts1->hw_sop_ctrl_val = (0x47 << 16 | 188 << 4 | 0xc); in cx23885_card_setup()
2261 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2262 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2263 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2266 ts1->gen_ctrl_val = 0x4; /* Parallel */ in cx23885_card_setup()
2267 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2268 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2278 ts1->gen_ctrl_val = 0x5; /* Parallel */ in cx23885_card_setup()
2279 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2280 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2285 ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2286 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2287 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2288 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2289 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2290 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2294 ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2295 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2296 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2297 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2298 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2299 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2305 ts1->gen_ctrl_val = 0x5; /* Parallel */ in cx23885_card_setup()
2306 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2307 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2310 ts1->gen_ctrl_val = 0x5; /* Parallel */ in cx23885_card_setup()
2311 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2312 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2313 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2314 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2315 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2318 ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2319 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2320 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2321 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2322 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2323 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2326 ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2327 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2328 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2332 ts1->gen_ctrl_val = 0x5; /* Parallel */ in cx23885_card_setup()
2333 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2334 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2335 ts2->gen_ctrl_val = 0x8; /* Serial bus */ in cx23885_card_setup()
2336 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2337 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2340 ts1->gen_ctrl_val = 0x5; /* Parallel */ in cx23885_card_setup()
2341 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2342 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2343 ts2->gen_ctrl_val = 0xe; /* Serial bus */ in cx23885_card_setup()
2344 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2345 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2349 ts1->gen_ctrl_val = 0x5; /* Parallel */ in cx23885_card_setup()
2350 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2351 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2352 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2353 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2354 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2361 ts1->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2362 ts1->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2363 ts1->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2364 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2365 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2366 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2389 ts2->gen_ctrl_val = 0xc; /* Serial bus + punctured clock */ in cx23885_card_setup()
2390 ts2->ts_clk_en_val = 0x1; /* Enable TS_CLK */ in cx23885_card_setup()
2391 ts2->src_sel_val = CX23885_SRC_SEL_PARALLEL_MPEG_VIDEO; in cx23885_card_setup()
2397 switch (dev->board) { in cx23885_card_setup()
2446 dev->sd_cx25840 = v4l2_i2c_new_subdev(&dev->v4l2_dev, in cx23885_card_setup()
2447 &dev->i2c_bus[2].i2c_adap, in cx23885_card_setup()
2449 if (dev->sd_cx25840) { in cx23885_card_setup()
2450 /* set host data for clk_freq configuration */ in cx23885_card_setup()
2451 v4l2_set_subdev_hostdata(dev->sd_cx25840, in cx23885_card_setup()
2452 &dev->clk_freq); in cx23885_card_setup()
2454 dev->sd_cx25840->grp_id = CX23885_HW_AV_CORE; in cx23885_card_setup()
2455 v4l2_subdev_call(dev->sd_cx25840, core, load_fw); in cx23885_card_setup()
2460 switch (dev->board) { in cx23885_card_setup()
2462 v4l2_i2c_new_subdev(&dev->v4l2_dev, in cx23885_card_setup()
2463 &dev->i2c_bus[0].i2c_adap, in cx23885_card_setup()
2468 v4l2_i2c_new_subdev(&dev->v4l2_dev, in cx23885_card_setup()
2469 &dev->i2c_bus[0].i2c_adap, in cx23885_card_setup()
2472 v4l2_i2c_new_subdev(&dev->v4l2_dev, in cx23885_card_setup()
2473 &dev->i2c_bus[0].i2c_adap, in cx23885_card_setup()
2478 /* AUX-PLL 27MHz CLK */ in cx23885_card_setup()
2479 switch (dev->board) { in cx23885_card_setup()
2486 const char *filename = "dvb-netup-altera-01.fw"; in cx23885_card_setup()
2497 netup_get_card_info(&dev->i2c_bus[0].i2c_adap, &cinfo); in cx23885_card_setup()
2503 filename = "dvb-netup-altera-04.fw"; in cx23885_card_setup()
2506 filename = "dvb-netup-altera-01.fw"; in cx23885_card_setup()
2512 ret = request_firmware(&fw, filename, &dev->pci->dev); in cx23885_card_setup()