Thomas Gleixner | fc7669c | 2019-06-04 10:11:01 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 2 | /* DVB USB compliant linux driver for mobile DVB-T USB devices based on |
| 3 | * reference designs made by DiBcom (http://www.dibcom.fr/) (DiB3000M-B) |
| 4 | * |
Patrick Boettcher | 99e44da | 2016-01-24 12:56:58 -0200 | [diff] [blame] | 5 | * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@posteo.de) |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 6 | * |
| 7 | * based on GPL code from DiBcom, which has |
Patrick Boettcher | 99e44da | 2016-01-24 12:56:58 -0200 | [diff] [blame] | 8 | * Copyright (C) 2004 Amaury Demol for DiBcom |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 9 | * |
Mauro Carvalho Chehab | 577a7ad | 2020-03-04 15:54:10 +0100 | [diff] [blame] | 10 | * see Documentation/driver-api/media/drivers/dvb-usb.rst for more information |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 11 | */ |
| 12 | #include "dibusb.h" |
| 13 | |
Janne Grunau | 78e92006 | 2008-04-09 19:13:13 -0300 | [diff] [blame] | 14 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); |
| 15 | |
Michael Krufky | 6c08d929 | 2007-06-12 12:43:25 -0300 | [diff] [blame] | 16 | static int dib3000mb_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) |
| 17 | { |
| 18 | struct dvb_usb_adapter *adap = fe->dvb->priv; |
| 19 | struct dibusb_state *st = adap->priv; |
| 20 | |
| 21 | return st->ops.tuner_pass_ctrl(fe, enable, st->tuner_addr); |
| 22 | } |
| 23 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 24 | static int dibusb_dib3000mb_frontend_attach(struct dvb_usb_adapter *adap) |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 25 | { |
| 26 | struct dib3000_config demod_cfg; |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 27 | struct dibusb_state *st = adap->priv; |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 28 | |
| 29 | demod_cfg.demod_address = 0x8; |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 30 | |
Michael Krufky | d4dd5ce | 2011-09-17 14:38:50 -0300 | [diff] [blame] | 31 | adap->fe_adap[0].fe = dvb_attach(dib3000mb_attach, &demod_cfg, |
| 32 | &adap->dev->i2c_adap, &st->ops); |
| 33 | if ((adap->fe_adap[0].fe) == NULL) |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 34 | return -ENODEV; |
Adrian Bunk | 56760f0 | 2006-08-15 11:38:40 -0300 | [diff] [blame] | 35 | |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 36 | adap->fe_adap[0].fe->ops.i2c_gate_ctrl = dib3000mb_i2c_gate_ctrl; |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 37 | |
| 38 | return 0; |
| 39 | } |
| 40 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 41 | static int dibusb_thomson_tuner_attach(struct dvb_usb_adapter *adap) |
Patrick Boettcher | 8945c8c | 2005-07-07 17:58:07 -0700 | [diff] [blame] | 42 | { |
Michael Krufky | 6c08d929 | 2007-06-12 12:43:25 -0300 | [diff] [blame] | 43 | struct dibusb_state *st = adap->priv; |
| 44 | |
| 45 | st->tuner_addr = 0x61; |
| 46 | |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 47 | dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x61, &adap->dev->i2c_adap, |
Michael Krufky | 47a9991 | 2007-06-12 16:10:51 -0300 | [diff] [blame] | 48 | DVB_PLL_TUA6010XS); |
Michael Krufky | fbfee86 | 2007-05-09 15:58:17 -0300 | [diff] [blame] | 49 | return 0; |
| 50 | } |
| 51 | |
| 52 | static int dibusb_panasonic_tuner_attach(struct dvb_usb_adapter *adap) |
| 53 | { |
Michael Krufky | 6c08d929 | 2007-06-12 12:43:25 -0300 | [diff] [blame] | 54 | struct dibusb_state *st = adap->priv; |
| 55 | |
| 56 | st->tuner_addr = 0x60; |
| 57 | |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 58 | dvb_attach(dvb_pll_attach, adap->fe_adap[0].fe, 0x60, &adap->dev->i2c_adap, |
Michael Krufky | 47a9991 | 2007-06-12 16:10:51 -0300 | [diff] [blame] | 59 | DVB_PLL_TDA665X); |
Patrick Boettcher | 8945c8c | 2005-07-07 17:58:07 -0700 | [diff] [blame] | 60 | return 0; |
| 61 | } |
| 62 | |
| 63 | /* Some of the Artec 1.1 device aren't equipped with the default tuner |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 64 | * (Thomson Cable), but with a Panasonic ENV77H11D5. This function figures |
| 65 | * this out. */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 66 | static int dibusb_tuner_probe_and_attach(struct dvb_usb_adapter *adap) |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 67 | { |
| 68 | u8 b[2] = { 0,0 }, b2[1]; |
| 69 | int ret = 0; |
| 70 | struct i2c_msg msg[2] = { |
| 71 | { .flags = 0, .buf = b, .len = 2 }, |
| 72 | { .flags = I2C_M_RD, .buf = b2, .len = 1 }, |
| 73 | }; |
Michael Krufky | 6c08d929 | 2007-06-12 12:43:25 -0300 | [diff] [blame] | 74 | struct dibusb_state *st = adap->priv; |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 75 | |
| 76 | /* the Panasonic sits on I2C addrass 0x60, the Thomson on 0x61 */ |
Michael Krufky | 096bb77 | 2007-06-22 17:41:07 -0300 | [diff] [blame] | 77 | msg[0].addr = msg[1].addr = st->tuner_addr = 0x60; |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 78 | |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 79 | if (adap->fe_adap[0].fe->ops.i2c_gate_ctrl) |
Michael Krufky | 4594303 | 2011-09-16 09:35:06 -0300 | [diff] [blame] | 80 | adap->fe_adap[0].fe->ops.i2c_gate_ctrl(adap->fe_adap[0].fe, 1); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 81 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 82 | if (i2c_transfer(&adap->dev->i2c_adap, msg, 2) != 2) { |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 83 | err("tuner i2c write failed."); |
Colin Ian King | 96f3a93 | 2020-02-10 18:51:33 +0100 | [diff] [blame] | 84 | return -EREMOTEIO; |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 85 | } |
| 86 | |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 87 | if (adap->fe_adap[0].fe->ops.i2c_gate_ctrl) |
Michael Krufky | 4594303 | 2011-09-16 09:35:06 -0300 | [diff] [blame] | 88 | adap->fe_adap[0].fe->ops.i2c_gate_ctrl(adap->fe_adap[0].fe, 0); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 89 | |
| 90 | if (b2[0] == 0xfe) { |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 91 | info("This device has the Thomson Cable onboard. Which is default."); |
Michael Krufky | fbfee86 | 2007-05-09 15:58:17 -0300 | [diff] [blame] | 92 | ret = dibusb_thomson_tuner_attach(adap); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 93 | } else { |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 94 | info("This device has the Panasonic ENV77H11D5 onboard."); |
Michael Krufky | fbfee86 | 2007-05-09 15:58:17 -0300 | [diff] [blame] | 95 | ret = dibusb_panasonic_tuner_attach(adap); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 96 | } |
| 97 | |
| 98 | return ret; |
| 99 | } |
| 100 | |
| 101 | /* USB Driver stuff */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 102 | static struct dvb_usb_device_properties dibusb1_1_properties; |
| 103 | static struct dvb_usb_device_properties dibusb1_1_an2235_properties; |
| 104 | static struct dvb_usb_device_properties dibusb2_0b_properties; |
| 105 | static struct dvb_usb_device_properties artec_t1_usb2_properties; |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 106 | |
| 107 | static int dibusb_probe(struct usb_interface *intf, |
| 108 | const struct usb_device_id *id) |
| 109 | { |
Janne Grunau | 78e92006 | 2008-04-09 19:13:13 -0300 | [diff] [blame] | 110 | if (0 == dvb_usb_device_init(intf, &dibusb1_1_properties, |
| 111 | THIS_MODULE, NULL, adapter_nr) || |
| 112 | 0 == dvb_usb_device_init(intf, &dibusb1_1_an2235_properties, |
| 113 | THIS_MODULE, NULL, adapter_nr) || |
| 114 | 0 == dvb_usb_device_init(intf, &dibusb2_0b_properties, |
| 115 | THIS_MODULE, NULL, adapter_nr) || |
| 116 | 0 == dvb_usb_device_init(intf, &artec_t1_usb2_properties, |
| 117 | THIS_MODULE, NULL, adapter_nr)) |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 118 | return 0; |
| 119 | |
| 120 | return -EINVAL; |
| 121 | } |
| 122 | |
| 123 | /* do not change the order of the ID table */ |
| 124 | static struct usb_device_id dibusb_dib3000mb_table [] = { |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 125 | /* 00 */ { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_AVERMEDIA_DVBT_USB_COLD) }, |
| 126 | /* 01 */ { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_AVERMEDIA_DVBT_USB_WARM) }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 127 | /* 02 */ { USB_DEVICE(USB_VID_COMPRO, USB_PID_COMPRO_DVBU2000_COLD) }, |
| 128 | /* 03 */ { USB_DEVICE(USB_VID_COMPRO, USB_PID_COMPRO_DVBU2000_WARM) }, |
| 129 | /* 04 */ { USB_DEVICE(USB_VID_COMPRO_UNK, USB_PID_COMPRO_DVBU2000_UNK_COLD) }, |
| 130 | /* 05 */ { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_MOD3000_COLD) }, |
| 131 | /* 06 */ { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_MOD3000_WARM) }, |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 132 | /* 07 */ { USB_DEVICE(USB_VID_EMPIA, USB_PID_KWORLD_VSTREAM_COLD) }, |
| 133 | /* 08 */ { USB_DEVICE(USB_VID_EMPIA, USB_PID_KWORLD_VSTREAM_WARM) }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 134 | /* 09 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_GRANDTEC_DVBT_USB_COLD) }, |
| 135 | /* 10 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_GRANDTEC_DVBT_USB_WARM) }, |
| 136 | /* 11 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_DIBCOM_MOD3000_COLD) }, |
| 137 | /* 12 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_DIBCOM_MOD3000_WARM) }, |
| 138 | /* 13 */ { USB_DEVICE(USB_VID_HYPER_PALTEK, USB_PID_UNK_HYPER_PALTEK_COLD) }, |
| 139 | /* 14 */ { USB_DEVICE(USB_VID_HYPER_PALTEK, USB_PID_UNK_HYPER_PALTEK_WARM) }, |
| 140 | /* 15 */ { USB_DEVICE(USB_VID_VISIONPLUS, USB_PID_TWINHAN_VP7041_COLD) }, |
| 141 | /* 16 */ { USB_DEVICE(USB_VID_VISIONPLUS, USB_PID_TWINHAN_VP7041_WARM) }, |
| 142 | /* 17 */ { USB_DEVICE(USB_VID_TWINHAN, USB_PID_TWINHAN_VP7041_COLD) }, |
| 143 | /* 18 */ { USB_DEVICE(USB_VID_TWINHAN, USB_PID_TWINHAN_VP7041_WARM) }, |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 144 | /* 19 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_COLD) }, |
| 145 | /* 20 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_WARM) }, |
| 146 | /* 21 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_AN2235_COLD) }, |
| 147 | /* 22 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_AN2235_WARM) }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 148 | /* 23 */ { USB_DEVICE(USB_VID_ADSTECH, USB_PID_ADSTECH_USB2_COLD) }, |
Patrick Boettcher | 8945c8c | 2005-07-07 17:58:07 -0700 | [diff] [blame] | 149 | |
| 150 | /* device ID with default DIBUSB2_0-firmware and with the hacked firmware */ |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 151 | /* 24 */ { USB_DEVICE(USB_VID_ADSTECH, USB_PID_ADSTECH_USB2_WARM) }, |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 152 | /* 25 */ { USB_DEVICE(USB_VID_KYE, USB_PID_KYE_DVB_T_COLD) }, |
| 153 | /* 26 */ { USB_DEVICE(USB_VID_KYE, USB_PID_KYE_DVB_T_WARM) }, |
Johannes Stezenbach | 68293dd | 2005-07-07 17:58:06 -0700 | [diff] [blame] | 154 | |
Patrick Boettcher | e69339d | 2005-09-09 13:02:42 -0700 | [diff] [blame] | 155 | /* 27 */ { USB_DEVICE(USB_VID_KWORLD, USB_PID_KWORLD_VSTREAM_COLD) }, |
| 156 | |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 157 | /* 28 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_USB2_COLD) }, |
| 158 | /* 29 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_USB2_WARM) }, |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 159 | |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 160 | /* |
| 161 | * XXX: As Artec just 'forgot' to program the EEPROM on some Artec T1 devices |
| 162 | * we don't catch these faulty IDs (namely 'Cypress FX1 USB controller') that |
| 163 | * have been left on the device. If you don't have such a device but an Artec |
| 164 | * device that's supposed to work with this driver but is not detected by it, |
| 165 | * free to enable CONFIG_DVB_USB_DIBUSB_MB_FAULTY via your kernel config. |
| 166 | */ |
Johannes Stezenbach | 68293dd | 2005-07-07 17:58:06 -0700 | [diff] [blame] | 167 | |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 168 | #ifdef CONFIG_DVB_USB_DIBUSB_MB_FAULTY |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 169 | /* 30 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_ULTIMA_TVBOX_ANCHOR_COLD) }, |
Johannes Stezenbach | 68293dd | 2005-07-07 17:58:06 -0700 | [diff] [blame] | 170 | #endif |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 171 | |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 172 | { } /* Terminating entry */ |
| 173 | }; |
| 174 | MODULE_DEVICE_TABLE (usb, dibusb_dib3000mb_table); |
| 175 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 176 | static struct dvb_usb_device_properties dibusb1_1_properties = { |
| 177 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 178 | |
| 179 | .usb_ctrl = CYPRESS_AN2135, |
| 180 | |
| 181 | .firmware = "dvb-usb-dibusb-5.0.0.11.fw", |
| 182 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 183 | .num_adapters = 1, |
| 184 | .adapter = { |
| 185 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 186 | .num_frontends = 1, |
| 187 | .fe = {{ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 188 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 189 | .pid_filter_count = 16, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 190 | |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 191 | .streaming_ctrl = dibusb_streaming_ctrl, |
| 192 | .pid_filter = dibusb_pid_filter, |
| 193 | .pid_filter_ctrl = dibusb_pid_filter_ctrl, |
| 194 | .frontend_attach = dibusb_dib3000mb_frontend_attach, |
| 195 | .tuner_attach = dibusb_tuner_probe_and_attach, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 196 | |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 197 | /* parameter for the MPEG2-data transfer */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 198 | .stream = { |
| 199 | .type = USB_BULK, |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 200 | .count = 7, |
| 201 | .endpoint = 0x02, |
| 202 | .u = { |
| 203 | .bulk = { |
| 204 | .buffersize = 4096, |
| 205 | } |
| 206 | } |
| 207 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 208 | }}, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 209 | .size_of_priv = sizeof(struct dibusb_state), |
| 210 | } |
| 211 | }, |
| 212 | |
| 213 | .power_ctrl = dibusb_power_ctrl, |
| 214 | |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 215 | .rc.legacy = { |
| 216 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 217 | .rc_map_table = rc_map_dibusb_table, |
| 218 | .rc_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 219 | .rc_query = dibusb_rc_query, |
| 220 | }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 221 | |
| 222 | .i2c_algo = &dibusb_i2c_algo, |
| 223 | |
| 224 | .generic_bulk_ctrl_endpoint = 0x01, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 225 | |
Patrick Boettcher | 2f7f96b | 2005-07-07 17:58:16 -0700 | [diff] [blame] | 226 | .num_device_descs = 9, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 227 | .devices = { |
| 228 | { "AVerMedia AverTV DVBT USB1.1", |
| 229 | { &dibusb_dib3000mb_table[0], NULL }, |
| 230 | { &dibusb_dib3000mb_table[1], NULL }, |
| 231 | }, |
| 232 | { "Compro Videomate DVB-U2000 - DVB-T USB1.1 (please confirm to linux-dvb)", |
| 233 | { &dibusb_dib3000mb_table[2], &dibusb_dib3000mb_table[4], NULL}, |
| 234 | { &dibusb_dib3000mb_table[3], NULL }, |
| 235 | }, |
| 236 | { "DiBcom USB1.1 DVB-T reference design (MOD3000)", |
| 237 | { &dibusb_dib3000mb_table[5], NULL }, |
| 238 | { &dibusb_dib3000mb_table[6], NULL }, |
| 239 | }, |
| 240 | { "KWorld V-Stream XPERT DTV - DVB-T USB1.1", |
| 241 | { &dibusb_dib3000mb_table[7], NULL }, |
| 242 | { &dibusb_dib3000mb_table[8], NULL }, |
| 243 | }, |
| 244 | { "Grandtec USB1.1 DVB-T", |
| 245 | { &dibusb_dib3000mb_table[9], &dibusb_dib3000mb_table[11], NULL }, |
| 246 | { &dibusb_dib3000mb_table[10], &dibusb_dib3000mb_table[12], NULL }, |
| 247 | }, |
André Goddard Rosa | af901ca | 2009-11-14 13:09:05 -0200 | [diff] [blame] | 248 | { "Unknown USB1.1 DVB-T device ???? please report the name to the author", |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 249 | { &dibusb_dib3000mb_table[13], NULL }, |
| 250 | { &dibusb_dib3000mb_table[14], NULL }, |
| 251 | }, |
| 252 | { "TwinhanDTV USB-Ter USB1.1 / Magic Box I / HAMA USB1.1 DVB-T device", |
| 253 | { &dibusb_dib3000mb_table[15], &dibusb_dib3000mb_table[17], NULL}, |
| 254 | { &dibusb_dib3000mb_table[16], &dibusb_dib3000mb_table[18], NULL}, |
| 255 | }, |
| 256 | { "Artec T1 USB1.1 TVBOX with AN2135", |
| 257 | { &dibusb_dib3000mb_table[19], NULL }, |
| 258 | { &dibusb_dib3000mb_table[20], NULL }, |
| 259 | }, |
Patrick Boettcher | 2f7f96b | 2005-07-07 17:58:16 -0700 | [diff] [blame] | 260 | { "VideoWalker DVB-T USB", |
| 261 | { &dibusb_dib3000mb_table[25], NULL }, |
| 262 | { &dibusb_dib3000mb_table[26], NULL }, |
| 263 | }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 264 | } |
| 265 | }; |
| 266 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 267 | static struct dvb_usb_device_properties dibusb1_1_an2235_properties = { |
| 268 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 269 | .usb_ctrl = CYPRESS_AN2235, |
| 270 | |
| 271 | .firmware = "dvb-usb-dibusb-an2235-01.fw", |
| 272 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 273 | .num_adapters = 1, |
| 274 | .adapter = { |
| 275 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 276 | .num_frontends = 1, |
| 277 | .fe = {{ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 278 | .caps = DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF | DVB_USB_ADAP_HAS_PID_FILTER, |
| 279 | .pid_filter_count = 16, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 280 | |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 281 | .streaming_ctrl = dibusb_streaming_ctrl, |
| 282 | .pid_filter = dibusb_pid_filter, |
| 283 | .pid_filter_ctrl = dibusb_pid_filter_ctrl, |
| 284 | .frontend_attach = dibusb_dib3000mb_frontend_attach, |
| 285 | .tuner_attach = dibusb_tuner_probe_and_attach, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 286 | |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 287 | /* parameter for the MPEG2-data transfer */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 288 | .stream = { |
| 289 | .type = USB_BULK, |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 290 | .count = 7, |
| 291 | .endpoint = 0x02, |
| 292 | .u = { |
| 293 | .bulk = { |
| 294 | .buffersize = 4096, |
| 295 | } |
| 296 | } |
| 297 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 298 | }}, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 299 | .size_of_priv = sizeof(struct dibusb_state), |
| 300 | }, |
| 301 | }, |
| 302 | .power_ctrl = dibusb_power_ctrl, |
| 303 | |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 304 | .rc.legacy = { |
| 305 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 306 | .rc_map_table = rc_map_dibusb_table, |
| 307 | .rc_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 308 | .rc_query = dibusb_rc_query, |
| 309 | }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 310 | |
| 311 | .i2c_algo = &dibusb_i2c_algo, |
| 312 | |
| 313 | .generic_bulk_ctrl_endpoint = 0x01, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 314 | |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 315 | #ifdef CONFIG_DVB_USB_DIBUSB_MB_FAULTY |
Johannes Stezenbach | 68293dd | 2005-07-07 17:58:06 -0700 | [diff] [blame] | 316 | .num_device_descs = 2, |
| 317 | #else |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 318 | .num_device_descs = 1, |
Johannes Stezenbach | 68293dd | 2005-07-07 17:58:06 -0700 | [diff] [blame] | 319 | #endif |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 320 | .devices = { |
| 321 | { "Artec T1 USB1.1 TVBOX with AN2235", |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 322 | { &dibusb_dib3000mb_table[21], NULL }, |
Alistair Buxton | 83905b0 | 2006-09-10 12:09:22 -0300 | [diff] [blame] | 323 | { &dibusb_dib3000mb_table[22], NULL }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 324 | }, |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 325 | #ifdef CONFIG_DVB_USB_DIBUSB_MB_FAULTY |
Johannes Stezenbach | 68293dd | 2005-07-07 17:58:06 -0700 | [diff] [blame] | 326 | { "Artec T1 USB1.1 TVBOX with AN2235 (faulty USB IDs)", |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 327 | { &dibusb_dib3000mb_table[30], NULL }, |
Johannes Stezenbach | 68293dd | 2005-07-07 17:58:06 -0700 | [diff] [blame] | 328 | { NULL }, |
| 329 | }, |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 330 | { NULL }, |
Johannes Stezenbach | 68293dd | 2005-07-07 17:58:06 -0700 | [diff] [blame] | 331 | #endif |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 332 | } |
| 333 | }; |
| 334 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 335 | static struct dvb_usb_device_properties dibusb2_0b_properties = { |
| 336 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
Patrick Boettcher | c251ef6 | 2005-07-07 17:58:14 -0700 | [diff] [blame] | 337 | |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 338 | .usb_ctrl = CYPRESS_FX2, |
| 339 | |
Patrick Boettcher | 8945c8c | 2005-07-07 17:58:07 -0700 | [diff] [blame] | 340 | .firmware = "dvb-usb-adstech-usb2-02.fw", |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 341 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 342 | .num_adapters = 1, |
| 343 | .adapter = { |
| 344 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 345 | .num_frontends = 1, |
| 346 | .fe = {{ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 347 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 348 | .pid_filter_count = 16, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 349 | |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 350 | .streaming_ctrl = dibusb2_0_streaming_ctrl, |
| 351 | .pid_filter = dibusb_pid_filter, |
| 352 | .pid_filter_ctrl = dibusb_pid_filter_ctrl, |
| 353 | .frontend_attach = dibusb_dib3000mb_frontend_attach, |
| 354 | .tuner_attach = dibusb_thomson_tuner_attach, |
| 355 | |
| 356 | /* parameter for the MPEG2-data transfer */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 357 | .stream = { |
| 358 | .type = USB_BULK, |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 359 | .count = 7, |
| 360 | .endpoint = 0x06, |
| 361 | .u = { |
| 362 | .bulk = { |
| 363 | .buffersize = 4096, |
| 364 | } |
| 365 | } |
| 366 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 367 | }}, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 368 | .size_of_priv = sizeof(struct dibusb_state), |
| 369 | } |
| 370 | }, |
| 371 | .power_ctrl = dibusb2_0_power_ctrl, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 372 | |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 373 | .rc.legacy = { |
| 374 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 375 | .rc_map_table = rc_map_dibusb_table, |
| 376 | .rc_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 377 | .rc_query = dibusb_rc_query, |
| 378 | }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 379 | |
| 380 | .i2c_algo = &dibusb_i2c_algo, |
| 381 | |
| 382 | .generic_bulk_ctrl_endpoint = 0x01, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 383 | |
Patrick Boettcher | e69339d | 2005-09-09 13:02:42 -0700 | [diff] [blame] | 384 | .num_device_descs = 2, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 385 | .devices = { |
Patrick Boettcher | e69339d | 2005-09-09 13:02:42 -0700 | [diff] [blame] | 386 | { "KWorld/ADSTech Instant DVB-T USB2.0", |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 387 | { &dibusb_dib3000mb_table[23], NULL }, |
Patrick Boettcher | 8945c8c | 2005-07-07 17:58:07 -0700 | [diff] [blame] | 388 | { &dibusb_dib3000mb_table[24], NULL }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 389 | }, |
Patrick Boettcher | e69339d | 2005-09-09 13:02:42 -0700 | [diff] [blame] | 390 | { "KWorld Xpert DVB-T USB2.0", |
| 391 | { &dibusb_dib3000mb_table[27], NULL }, |
| 392 | { NULL } |
| 393 | }, |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 394 | { NULL }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 395 | } |
| 396 | }; |
| 397 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 398 | static struct dvb_usb_device_properties artec_t1_usb2_properties = { |
| 399 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 400 | |
| 401 | .usb_ctrl = CYPRESS_FX2, |
| 402 | |
| 403 | .firmware = "dvb-usb-dibusb-6.0.0.8.fw", |
| 404 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 405 | .num_adapters = 1, |
| 406 | .adapter = { |
| 407 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 408 | .num_frontends = 1, |
| 409 | .fe = {{ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 410 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 411 | .pid_filter_count = 16, |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 412 | |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 413 | .streaming_ctrl = dibusb2_0_streaming_ctrl, |
| 414 | .pid_filter = dibusb_pid_filter, |
| 415 | .pid_filter_ctrl = dibusb_pid_filter_ctrl, |
| 416 | .frontend_attach = dibusb_dib3000mb_frontend_attach, |
| 417 | .tuner_attach = dibusb_tuner_probe_and_attach, |
| 418 | /* parameter for the MPEG2-data transfer */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 419 | .stream = { |
| 420 | .type = USB_BULK, |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 421 | .count = 7, |
| 422 | .endpoint = 0x06, |
| 423 | .u = { |
| 424 | .bulk = { |
| 425 | .buffersize = 4096, |
| 426 | } |
| 427 | } |
| 428 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 429 | }}, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 430 | .size_of_priv = sizeof(struct dibusb_state), |
| 431 | } |
| 432 | }, |
| 433 | .power_ctrl = dibusb2_0_power_ctrl, |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 434 | |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 435 | .rc.legacy = { |
| 436 | .rc_interval = DEFAULT_RC_INTERVAL, |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 437 | .rc_map_table = rc_map_dibusb_table, |
| 438 | .rc_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 439 | .rc_query = dibusb_rc_query, |
| 440 | }, |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 441 | |
| 442 | .i2c_algo = &dibusb_i2c_algo, |
| 443 | |
| 444 | .generic_bulk_ctrl_endpoint = 0x01, |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 445 | |
| 446 | .num_device_descs = 1, |
| 447 | .devices = { |
| 448 | { "Artec T1 USB2.0", |
| 449 | { &dibusb_dib3000mb_table[28], NULL }, |
| 450 | { &dibusb_dib3000mb_table[29], NULL }, |
| 451 | }, |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 452 | { NULL }, |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 453 | } |
| 454 | }; |
| 455 | |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 456 | static struct usb_driver dibusb_driver = { |
Patrick Boettcher | 63b5c1c | 2005-07-07 17:58:30 -0700 | [diff] [blame] | 457 | .name = "dvb_usb_dibusb_mb", |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 458 | .probe = dibusb_probe, |
| 459 | .disconnect = dvb_usb_device_exit, |
| 460 | .id_table = dibusb_dib3000mb_table, |
| 461 | }; |
| 462 | |
Greg Kroah-Hartman | ecb3b2b | 2011-11-18 09:46:12 -0800 | [diff] [blame] | 463 | module_usb_driver(dibusb_driver); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 464 | |
Patrick Boettcher | 99e44da | 2016-01-24 12:56:58 -0200 | [diff] [blame] | 465 | MODULE_AUTHOR("Patrick Boettcher <patrick.boettcher@posteo.de>"); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 466 | MODULE_DESCRIPTION("Driver for DiBcom USB DVB-T devices (DiB3000M-B based)"); |
| 467 | MODULE_VERSION("1.0"); |
| 468 | MODULE_LICENSE("GPL"); |