Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 1 | /* DVB USB compliant linux driver for mobile DVB-T USB devices based on |
| 2 | * reference designs made by DiBcom (http://www.dibcom.fr/) (DiB3000M-B) |
| 3 | * |
| 4 | * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@desy.de) |
| 5 | * |
| 6 | * based on GPL code from DiBcom, which has |
| 7 | * Copyright (C) 2004 Amaury Demol for DiBcom (ademol@dibcom.fr) |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify it |
| 10 | * under the terms of the GNU General Public License as published by the Free |
| 11 | * Software Foundation, version 2. |
| 12 | * |
| 13 | * see Documentation/dvb/README.dvb-usb for more information |
| 14 | */ |
| 15 | #include "dibusb.h" |
| 16 | |
Michael Krufky | 6c08d929 | 2007-06-12 12:43:25 -0300 | [diff] [blame] | 17 | static int dib3000mb_i2c_gate_ctrl(struct dvb_frontend* fe, int enable) |
| 18 | { |
| 19 | struct dvb_usb_adapter *adap = fe->dvb->priv; |
| 20 | struct dibusb_state *st = adap->priv; |
| 21 | |
| 22 | return st->ops.tuner_pass_ctrl(fe, enable, st->tuner_addr); |
| 23 | } |
| 24 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 25 | static int dibusb_dib3000mb_frontend_attach(struct dvb_usb_adapter *adap) |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 26 | { |
| 27 | struct dib3000_config demod_cfg; |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 28 | struct dibusb_state *st = adap->priv; |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 29 | |
| 30 | demod_cfg.demod_address = 0x8; |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 31 | |
Michael Krufky | 79d3a8b | 2007-05-09 14:52:52 -0300 | [diff] [blame] | 32 | if ((adap->fe = dvb_attach(dib3000mb_attach, &demod_cfg, |
| 33 | &adap->dev->i2c_adap, &st->ops)) == 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 | 6c08d929 | 2007-06-12 12:43:25 -0300 | [diff] [blame] | 36 | adap->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 | fbfee86 | 2007-05-09 15:58:17 -0300 | [diff] [blame] | 47 | dvb_attach(dvb_pll_attach, adap->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 | fbfee86 | 2007-05-09 15:58:17 -0300 | [diff] [blame] | 58 | dvb_attach(dvb_pll_attach, adap->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 | 6c08d929 | 2007-06-12 12:43:25 -0300 | [diff] [blame] | 79 | if (adap->fe->ops.i2c_gate_ctrl) |
| 80 | adap->fe->ops.i2c_gate_ctrl(adap->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."); |
| 84 | ret = -EREMOTEIO; |
| 85 | } |
| 86 | |
Michael Krufky | 6c08d929 | 2007-06-12 12:43:25 -0300 | [diff] [blame] | 87 | if (adap->fe->ops.i2c_gate_ctrl) |
| 88 | adap->fe->ops.i2c_gate_ctrl(adap->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 | { |
Patrick Boettcher | 47dc3d6 | 2005-09-09 13:02:47 -0700 | [diff] [blame] | 110 | if (dvb_usb_device_init(intf,&dibusb1_1_properties,THIS_MODULE,NULL) == 0 || |
| 111 | dvb_usb_device_init(intf,&dibusb1_1_an2235_properties,THIS_MODULE,NULL) == 0 || |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 112 | dvb_usb_device_init(intf,&dibusb2_0b_properties,THIS_MODULE,NULL) == 0 || |
| 113 | dvb_usb_device_init(intf,&artec_t1_usb2_properties,THIS_MODULE,NULL) == 0) |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 114 | return 0; |
| 115 | |
| 116 | return -EINVAL; |
| 117 | } |
| 118 | |
| 119 | /* do not change the order of the ID table */ |
| 120 | static struct usb_device_id dibusb_dib3000mb_table [] = { |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 121 | /* 00 */ { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_AVERMEDIA_DVBT_USB_COLD) }, |
| 122 | /* 01 */ { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_AVERMEDIA_DVBT_USB_WARM) }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 123 | /* 02 */ { USB_DEVICE(USB_VID_COMPRO, USB_PID_COMPRO_DVBU2000_COLD) }, |
| 124 | /* 03 */ { USB_DEVICE(USB_VID_COMPRO, USB_PID_COMPRO_DVBU2000_WARM) }, |
| 125 | /* 04 */ { USB_DEVICE(USB_VID_COMPRO_UNK, USB_PID_COMPRO_DVBU2000_UNK_COLD) }, |
| 126 | /* 05 */ { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_MOD3000_COLD) }, |
| 127 | /* 06 */ { USB_DEVICE(USB_VID_DIBCOM, USB_PID_DIBCOM_MOD3000_WARM) }, |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 128 | /* 07 */ { USB_DEVICE(USB_VID_EMPIA, USB_PID_KWORLD_VSTREAM_COLD) }, |
| 129 | /* 08 */ { USB_DEVICE(USB_VID_EMPIA, USB_PID_KWORLD_VSTREAM_WARM) }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 130 | /* 09 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_GRANDTEC_DVBT_USB_COLD) }, |
| 131 | /* 10 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_GRANDTEC_DVBT_USB_WARM) }, |
| 132 | /* 11 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_DIBCOM_MOD3000_COLD) }, |
| 133 | /* 12 */ { USB_DEVICE(USB_VID_GRANDTEC, USB_PID_DIBCOM_MOD3000_WARM) }, |
| 134 | /* 13 */ { USB_DEVICE(USB_VID_HYPER_PALTEK, USB_PID_UNK_HYPER_PALTEK_COLD) }, |
| 135 | /* 14 */ { USB_DEVICE(USB_VID_HYPER_PALTEK, USB_PID_UNK_HYPER_PALTEK_WARM) }, |
| 136 | /* 15 */ { USB_DEVICE(USB_VID_VISIONPLUS, USB_PID_TWINHAN_VP7041_COLD) }, |
| 137 | /* 16 */ { USB_DEVICE(USB_VID_VISIONPLUS, USB_PID_TWINHAN_VP7041_WARM) }, |
| 138 | /* 17 */ { USB_DEVICE(USB_VID_TWINHAN, USB_PID_TWINHAN_VP7041_COLD) }, |
| 139 | /* 18 */ { USB_DEVICE(USB_VID_TWINHAN, USB_PID_TWINHAN_VP7041_WARM) }, |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 140 | /* 19 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_COLD) }, |
| 141 | /* 20 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_WARM) }, |
| 142 | /* 21 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_AN2235_COLD) }, |
| 143 | /* 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] | 144 | /* 23 */ { USB_DEVICE(USB_VID_ADSTECH, USB_PID_ADSTECH_USB2_COLD) }, |
Patrick Boettcher | 8945c8c | 2005-07-07 17:58:07 -0700 | [diff] [blame] | 145 | |
| 146 | /* device ID with default DIBUSB2_0-firmware and with the hacked firmware */ |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 147 | /* 24 */ { USB_DEVICE(USB_VID_ADSTECH, USB_PID_ADSTECH_USB2_WARM) }, |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 148 | /* 25 */ { USB_DEVICE(USB_VID_KYE, USB_PID_KYE_DVB_T_COLD) }, |
| 149 | /* 26 */ { USB_DEVICE(USB_VID_KYE, USB_PID_KYE_DVB_T_WARM) }, |
Johannes Stezenbach | 68293dd | 2005-07-07 17:58:06 -0700 | [diff] [blame] | 150 | |
Patrick Boettcher | e69339d | 2005-09-09 13:02:42 -0700 | [diff] [blame] | 151 | /* 27 */ { USB_DEVICE(USB_VID_KWORLD, USB_PID_KWORLD_VSTREAM_COLD) }, |
| 152 | |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 153 | /* 28 */ { USB_DEVICE(USB_VID_ULTIMA_ELECTRONIC, USB_PID_ULTIMA_TVBOX_USB2_COLD) }, |
| 154 | /* 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] | 155 | |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 156 | /* |
| 157 | * XXX: As Artec just 'forgot' to program the EEPROM on some Artec T1 devices |
| 158 | * we don't catch these faulty IDs (namely 'Cypress FX1 USB controller') that |
| 159 | * have been left on the device. If you don't have such a device but an Artec |
| 160 | * device that's supposed to work with this driver but is not detected by it, |
| 161 | * free to enable CONFIG_DVB_USB_DIBUSB_MB_FAULTY via your kernel config. |
| 162 | */ |
Johannes Stezenbach | 68293dd | 2005-07-07 17:58:06 -0700 | [diff] [blame] | 163 | |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 164 | #ifdef CONFIG_DVB_USB_DIBUSB_MB_FAULTY |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 165 | /* 30 */ { USB_DEVICE(USB_VID_ANCHOR, USB_PID_ULTIMA_TVBOX_ANCHOR_COLD) }, |
Johannes Stezenbach | 68293dd | 2005-07-07 17:58:06 -0700 | [diff] [blame] | 166 | #endif |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 167 | |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 168 | { } /* Terminating entry */ |
| 169 | }; |
| 170 | MODULE_DEVICE_TABLE (usb, dibusb_dib3000mb_table); |
| 171 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 172 | static struct dvb_usb_device_properties dibusb1_1_properties = { |
| 173 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 174 | |
| 175 | .usb_ctrl = CYPRESS_AN2135, |
| 176 | |
| 177 | .firmware = "dvb-usb-dibusb-5.0.0.11.fw", |
| 178 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 179 | .num_adapters = 1, |
| 180 | .adapter = { |
| 181 | { |
| 182 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 183 | .pid_filter_count = 16, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 184 | |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 185 | .streaming_ctrl = dibusb_streaming_ctrl, |
| 186 | .pid_filter = dibusb_pid_filter, |
| 187 | .pid_filter_ctrl = dibusb_pid_filter_ctrl, |
| 188 | .frontend_attach = dibusb_dib3000mb_frontend_attach, |
| 189 | .tuner_attach = dibusb_tuner_probe_and_attach, |
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 | /* parameter for the MPEG2-data transfer */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 192 | .stream = { |
| 193 | .type = USB_BULK, |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 194 | .count = 7, |
| 195 | .endpoint = 0x02, |
| 196 | .u = { |
| 197 | .bulk = { |
| 198 | .buffersize = 4096, |
| 199 | } |
| 200 | } |
| 201 | }, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 202 | .size_of_priv = sizeof(struct dibusb_state), |
| 203 | } |
| 204 | }, |
| 205 | |
| 206 | .power_ctrl = dibusb_power_ctrl, |
| 207 | |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 208 | .rc_interval = DEFAULT_RC_INTERVAL, |
| 209 | .rc_key_map = dibusb_rc_keys, |
Sergei Haller | a841e1f | 2006-05-14 10:47:21 -0300 | [diff] [blame] | 210 | .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 211 | .rc_query = dibusb_rc_query, |
| 212 | |
| 213 | .i2c_algo = &dibusb_i2c_algo, |
| 214 | |
| 215 | .generic_bulk_ctrl_endpoint = 0x01, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 216 | |
Patrick Boettcher | 2f7f96b | 2005-07-07 17:58:16 -0700 | [diff] [blame] | 217 | .num_device_descs = 9, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 218 | .devices = { |
| 219 | { "AVerMedia AverTV DVBT USB1.1", |
| 220 | { &dibusb_dib3000mb_table[0], NULL }, |
| 221 | { &dibusb_dib3000mb_table[1], NULL }, |
| 222 | }, |
| 223 | { "Compro Videomate DVB-U2000 - DVB-T USB1.1 (please confirm to linux-dvb)", |
| 224 | { &dibusb_dib3000mb_table[2], &dibusb_dib3000mb_table[4], NULL}, |
| 225 | { &dibusb_dib3000mb_table[3], NULL }, |
| 226 | }, |
| 227 | { "DiBcom USB1.1 DVB-T reference design (MOD3000)", |
| 228 | { &dibusb_dib3000mb_table[5], NULL }, |
| 229 | { &dibusb_dib3000mb_table[6], NULL }, |
| 230 | }, |
| 231 | { "KWorld V-Stream XPERT DTV - DVB-T USB1.1", |
| 232 | { &dibusb_dib3000mb_table[7], NULL }, |
| 233 | { &dibusb_dib3000mb_table[8], NULL }, |
| 234 | }, |
| 235 | { "Grandtec USB1.1 DVB-T", |
| 236 | { &dibusb_dib3000mb_table[9], &dibusb_dib3000mb_table[11], NULL }, |
| 237 | { &dibusb_dib3000mb_table[10], &dibusb_dib3000mb_table[12], NULL }, |
| 238 | }, |
| 239 | { "Unkown USB1.1 DVB-T device ???? please report the name to the author", |
| 240 | { &dibusb_dib3000mb_table[13], NULL }, |
| 241 | { &dibusb_dib3000mb_table[14], NULL }, |
| 242 | }, |
| 243 | { "TwinhanDTV USB-Ter USB1.1 / Magic Box I / HAMA USB1.1 DVB-T device", |
| 244 | { &dibusb_dib3000mb_table[15], &dibusb_dib3000mb_table[17], NULL}, |
| 245 | { &dibusb_dib3000mb_table[16], &dibusb_dib3000mb_table[18], NULL}, |
| 246 | }, |
| 247 | { "Artec T1 USB1.1 TVBOX with AN2135", |
| 248 | { &dibusb_dib3000mb_table[19], NULL }, |
| 249 | { &dibusb_dib3000mb_table[20], NULL }, |
| 250 | }, |
Patrick Boettcher | 2f7f96b | 2005-07-07 17:58:16 -0700 | [diff] [blame] | 251 | { "VideoWalker DVB-T USB", |
| 252 | { &dibusb_dib3000mb_table[25], NULL }, |
| 253 | { &dibusb_dib3000mb_table[26], NULL }, |
| 254 | }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 255 | } |
| 256 | }; |
| 257 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 258 | static struct dvb_usb_device_properties dibusb1_1_an2235_properties = { |
| 259 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 260 | .usb_ctrl = CYPRESS_AN2235, |
| 261 | |
| 262 | .firmware = "dvb-usb-dibusb-an2235-01.fw", |
| 263 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 264 | .num_adapters = 1, |
| 265 | .adapter = { |
| 266 | { |
| 267 | .caps = DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF | DVB_USB_ADAP_HAS_PID_FILTER, |
| 268 | .pid_filter_count = 16, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 269 | |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 270 | .streaming_ctrl = dibusb_streaming_ctrl, |
| 271 | .pid_filter = dibusb_pid_filter, |
| 272 | .pid_filter_ctrl = dibusb_pid_filter_ctrl, |
| 273 | .frontend_attach = dibusb_dib3000mb_frontend_attach, |
| 274 | .tuner_attach = dibusb_tuner_probe_and_attach, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 275 | |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 276 | /* parameter for the MPEG2-data transfer */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 277 | .stream = { |
| 278 | .type = USB_BULK, |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 279 | .count = 7, |
| 280 | .endpoint = 0x02, |
| 281 | .u = { |
| 282 | .bulk = { |
| 283 | .buffersize = 4096, |
| 284 | } |
| 285 | } |
| 286 | }, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 287 | .size_of_priv = sizeof(struct dibusb_state), |
| 288 | }, |
| 289 | }, |
| 290 | .power_ctrl = dibusb_power_ctrl, |
| 291 | |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 292 | .rc_interval = DEFAULT_RC_INTERVAL, |
| 293 | .rc_key_map = dibusb_rc_keys, |
Sergei Haller | a841e1f | 2006-05-14 10:47:21 -0300 | [diff] [blame] | 294 | .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 295 | .rc_query = dibusb_rc_query, |
| 296 | |
| 297 | .i2c_algo = &dibusb_i2c_algo, |
| 298 | |
| 299 | .generic_bulk_ctrl_endpoint = 0x01, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 300 | |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 301 | #ifdef CONFIG_DVB_USB_DIBUSB_MB_FAULTY |
Johannes Stezenbach | 68293dd | 2005-07-07 17:58:06 -0700 | [diff] [blame] | 302 | .num_device_descs = 2, |
| 303 | #else |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 304 | .num_device_descs = 1, |
Johannes Stezenbach | 68293dd | 2005-07-07 17:58:06 -0700 | [diff] [blame] | 305 | #endif |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 306 | .devices = { |
| 307 | { "Artec T1 USB1.1 TVBOX with AN2235", |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 308 | { &dibusb_dib3000mb_table[21], NULL }, |
Alistair Buxton | 83905b0 | 2006-09-10 12:09:22 -0300 | [diff] [blame] | 309 | { &dibusb_dib3000mb_table[22], NULL }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 310 | }, |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 311 | #ifdef CONFIG_DVB_USB_DIBUSB_MB_FAULTY |
Johannes Stezenbach | 68293dd | 2005-07-07 17:58:06 -0700 | [diff] [blame] | 312 | { "Artec T1 USB1.1 TVBOX with AN2235 (faulty USB IDs)", |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 313 | { &dibusb_dib3000mb_table[30], NULL }, |
Johannes Stezenbach | 68293dd | 2005-07-07 17:58:06 -0700 | [diff] [blame] | 314 | { NULL }, |
| 315 | }, |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 316 | { NULL }, |
Johannes Stezenbach | 68293dd | 2005-07-07 17:58:06 -0700 | [diff] [blame] | 317 | #endif |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 318 | } |
| 319 | }; |
| 320 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 321 | static struct dvb_usb_device_properties dibusb2_0b_properties = { |
| 322 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
Patrick Boettcher | c251ef6 | 2005-07-07 17:58:14 -0700 | [diff] [blame] | 323 | |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 324 | .usb_ctrl = CYPRESS_FX2, |
| 325 | |
Patrick Boettcher | 8945c8c | 2005-07-07 17:58:07 -0700 | [diff] [blame] | 326 | .firmware = "dvb-usb-adstech-usb2-02.fw", |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 327 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 328 | .num_adapters = 1, |
| 329 | .adapter = { |
| 330 | { |
| 331 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 332 | .pid_filter_count = 16, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 333 | |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 334 | .streaming_ctrl = dibusb2_0_streaming_ctrl, |
| 335 | .pid_filter = dibusb_pid_filter, |
| 336 | .pid_filter_ctrl = dibusb_pid_filter_ctrl, |
| 337 | .frontend_attach = dibusb_dib3000mb_frontend_attach, |
| 338 | .tuner_attach = dibusb_thomson_tuner_attach, |
| 339 | |
| 340 | /* parameter for the MPEG2-data transfer */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 341 | .stream = { |
| 342 | .type = USB_BULK, |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 343 | .count = 7, |
| 344 | .endpoint = 0x06, |
| 345 | .u = { |
| 346 | .bulk = { |
| 347 | .buffersize = 4096, |
| 348 | } |
| 349 | } |
| 350 | }, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 351 | .size_of_priv = sizeof(struct dibusb_state), |
| 352 | } |
| 353 | }, |
| 354 | .power_ctrl = dibusb2_0_power_ctrl, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 355 | |
| 356 | .rc_interval = DEFAULT_RC_INTERVAL, |
| 357 | .rc_key_map = dibusb_rc_keys, |
Sergei Haller | a841e1f | 2006-05-14 10:47:21 -0300 | [diff] [blame] | 358 | .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 359 | .rc_query = dibusb_rc_query, |
| 360 | |
| 361 | .i2c_algo = &dibusb_i2c_algo, |
| 362 | |
| 363 | .generic_bulk_ctrl_endpoint = 0x01, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 364 | |
Patrick Boettcher | e69339d | 2005-09-09 13:02:42 -0700 | [diff] [blame] | 365 | .num_device_descs = 2, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 366 | .devices = { |
Patrick Boettcher | e69339d | 2005-09-09 13:02:42 -0700 | [diff] [blame] | 367 | { "KWorld/ADSTech Instant DVB-T USB2.0", |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 368 | { &dibusb_dib3000mb_table[23], NULL }, |
Patrick Boettcher | 8945c8c | 2005-07-07 17:58:07 -0700 | [diff] [blame] | 369 | { &dibusb_dib3000mb_table[24], NULL }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 370 | }, |
Patrick Boettcher | e69339d | 2005-09-09 13:02:42 -0700 | [diff] [blame] | 371 | { "KWorld Xpert DVB-T USB2.0", |
| 372 | { &dibusb_dib3000mb_table[27], NULL }, |
| 373 | { NULL } |
| 374 | }, |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 375 | { NULL }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 376 | } |
| 377 | }; |
| 378 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 379 | static struct dvb_usb_device_properties artec_t1_usb2_properties = { |
| 380 | .caps = DVB_USB_IS_AN_I2C_ADAPTER, |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 381 | |
| 382 | .usb_ctrl = CYPRESS_FX2, |
| 383 | |
| 384 | .firmware = "dvb-usb-dibusb-6.0.0.8.fw", |
| 385 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 386 | .num_adapters = 1, |
| 387 | .adapter = { |
| 388 | { |
| 389 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
| 390 | .pid_filter_count = 16, |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 391 | |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 392 | .streaming_ctrl = dibusb2_0_streaming_ctrl, |
| 393 | .pid_filter = dibusb_pid_filter, |
| 394 | .pid_filter_ctrl = dibusb_pid_filter_ctrl, |
| 395 | .frontend_attach = dibusb_dib3000mb_frontend_attach, |
| 396 | .tuner_attach = dibusb_tuner_probe_and_attach, |
| 397 | /* parameter for the MPEG2-data transfer */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 398 | .stream = { |
| 399 | .type = USB_BULK, |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 400 | .count = 7, |
| 401 | .endpoint = 0x06, |
| 402 | .u = { |
| 403 | .bulk = { |
| 404 | .buffersize = 4096, |
| 405 | } |
| 406 | } |
| 407 | }, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 408 | .size_of_priv = sizeof(struct dibusb_state), |
| 409 | } |
| 410 | }, |
| 411 | .power_ctrl = dibusb2_0_power_ctrl, |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 412 | |
| 413 | .rc_interval = DEFAULT_RC_INTERVAL, |
| 414 | .rc_key_map = dibusb_rc_keys, |
Sergei Haller | a841e1f | 2006-05-14 10:47:21 -0300 | [diff] [blame] | 415 | .rc_key_map_size = 111, /* wow, that is ugly ... I want to load it to the driver dynamically */ |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 416 | .rc_query = dibusb_rc_query, |
| 417 | |
| 418 | .i2c_algo = &dibusb_i2c_algo, |
| 419 | |
| 420 | .generic_bulk_ctrl_endpoint = 0x01, |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 421 | |
| 422 | .num_device_descs = 1, |
| 423 | .devices = { |
| 424 | { "Artec T1 USB2.0", |
| 425 | { &dibusb_dib3000mb_table[28], NULL }, |
| 426 | { &dibusb_dib3000mb_table[29], NULL }, |
| 427 | }, |
Marc Koschewski | 1157020 | 2006-01-09 18:21:36 -0200 | [diff] [blame] | 428 | { NULL }, |
Patrick Boettcher | f6f4b72 | 2005-11-08 21:35:52 -0800 | [diff] [blame] | 429 | } |
| 430 | }; |
| 431 | |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 432 | static struct usb_driver dibusb_driver = { |
Patrick Boettcher | 63b5c1c | 2005-07-07 17:58:30 -0700 | [diff] [blame] | 433 | .name = "dvb_usb_dibusb_mb", |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 434 | .probe = dibusb_probe, |
| 435 | .disconnect = dvb_usb_device_exit, |
| 436 | .id_table = dibusb_dib3000mb_table, |
| 437 | }; |
| 438 | |
| 439 | /* module stuff */ |
| 440 | static int __init dibusb_module_init(void) |
| 441 | { |
| 442 | int result; |
| 443 | if ((result = usb_register(&dibusb_driver))) { |
| 444 | err("usb_register failed. Error number %d",result); |
| 445 | return result; |
| 446 | } |
| 447 | |
| 448 | return 0; |
| 449 | } |
| 450 | |
| 451 | static void __exit dibusb_module_exit(void) |
| 452 | { |
| 453 | /* deregister this driver from the USB subsystem */ |
| 454 | usb_deregister(&dibusb_driver); |
| 455 | } |
| 456 | |
| 457 | module_init (dibusb_module_init); |
| 458 | module_exit (dibusb_module_exit); |
| 459 | |
| 460 | MODULE_AUTHOR("Patrick Boettcher <patrick.boettcher@desy.de>"); |
| 461 | MODULE_DESCRIPTION("Driver for DiBcom USB DVB-T devices (DiB3000M-B based)"); |
| 462 | MODULE_VERSION("1.0"); |
| 463 | MODULE_LICENSE("GPL"); |