Patrick Boettcher | fb41f5a | 2005-07-07 17:58:23 -0700 | [diff] [blame] | 1 | /* DVB USB library compliant Linux driver for the WideView/ Yakumo/ Hama/ |
Rasmus Rohde | d3c35ac | 2007-07-21 15:37:35 -0300 | [diff] [blame] | 2 | * Typhoon/ Yuan/ Miglia DVB-T USB2.0 receiver. |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 3 | * |
Patrick Boettcher | 99e44da | 2016-01-24 12:56:58 -0200 | [diff] [blame] | 4 | * Copyright (C) 2004-5 Patrick Boettcher (patrick.boettcher@posteo.de) |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 5 | * |
Patrick Boettcher | d590f9c | 2005-07-07 17:58:33 -0700 | [diff] [blame] | 6 | * Thanks to Steve Chang from WideView for providing support for the WT-220U. |
| 7 | * |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 8 | * This program is free software; you can redistribute it and/or modify it |
| 9 | * under the terms of the GNU General Public License as published by the Free |
| 10 | * Software Foundation, version 2. |
| 11 | * |
| 12 | * see Documentation/dvb/README.dvb-usb for more information |
| 13 | */ |
| 14 | #include "dtt200u.h" |
| 15 | |
| 16 | /* debug */ |
| 17 | int dvb_usb_dtt200u_debug; |
| 18 | module_param_named(debug,dvb_usb_dtt200u_debug, int, 0644); |
| 19 | MODULE_PARM_DESC(debug, "set debugging level (1=info,xfer=2 (or-able))." DVB_USB_DEBUG_STATUS); |
| 20 | |
Janne Grunau | 78e9200 | 2008-04-09 19:13:13 -0300 | [diff] [blame] | 21 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); |
| 22 | |
Patrick Boettcher | d590f9c | 2005-07-07 17:58:33 -0700 | [diff] [blame] | 23 | static int dtt200u_power_ctrl(struct dvb_usb_device *d, int onoff) |
| 24 | { |
| 25 | u8 b = SET_INIT; |
| 26 | |
| 27 | if (onoff) |
| 28 | dvb_usb_generic_write(d,&b,2); |
| 29 | |
| 30 | return 0; |
| 31 | } |
| 32 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 33 | static int dtt200u_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 34 | { |
Patrick Boettcher | d590f9c | 2005-07-07 17:58:33 -0700 | [diff] [blame] | 35 | u8 b_streaming[2] = { SET_STREAMING, onoff }; |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 36 | u8 b_rst_pid = RESET_PID_FILTER; |
| 37 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 38 | dvb_usb_generic_write(adap->dev, b_streaming, 2); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 39 | |
Patrick Boettcher | d590f9c | 2005-07-07 17:58:33 -0700 | [diff] [blame] | 40 | if (onoff == 0) |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 41 | dvb_usb_generic_write(adap->dev, &b_rst_pid, 1); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 42 | return 0; |
| 43 | } |
| 44 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 45 | static int dtt200u_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid, int onoff) |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 46 | { |
| 47 | u8 b_pid[4]; |
| 48 | pid = onoff ? pid : 0; |
| 49 | |
| 50 | b_pid[0] = SET_PID_FILTER; |
| 51 | b_pid[1] = index; |
| 52 | b_pid[2] = pid & 0xff; |
Patrick Boettcher | d590f9c | 2005-07-07 17:58:33 -0700 | [diff] [blame] | 53 | b_pid[3] = (pid >> 8) & 0x1f; |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 54 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 55 | return dvb_usb_generic_write(adap->dev, b_pid, 4); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 56 | } |
| 57 | |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 58 | static int dtt200u_rc_query(struct dvb_usb_device *d) |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 59 | { |
Patrick Boettcher | d590f9c | 2005-07-07 17:58:33 -0700 | [diff] [blame] | 60 | u8 key[5],cmd = GET_RC_CODE; |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 61 | u32 scancode; |
| 62 | |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 63 | dvb_usb_generic_rw(d,&cmd,1,key,5,0); |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 64 | if (key[0] == 1) { |
Sean Young | 2ceeca0 | 2016-09-21 06:54:19 -0300 | [diff] [blame^] | 65 | enum rc_type proto = RC_TYPE_NEC; |
| 66 | |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 67 | scancode = key[1]; |
| 68 | if ((u8) ~key[1] != key[2]) { |
| 69 | /* Extended NEC */ |
| 70 | scancode = scancode << 8; |
| 71 | scancode |= key[2]; |
Sean Young | 2ceeca0 | 2016-09-21 06:54:19 -0300 | [diff] [blame^] | 72 | proto = RC_TYPE_NECX; |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 73 | } |
| 74 | scancode = scancode << 8; |
| 75 | scancode |= key[3]; |
| 76 | |
| 77 | /* Check command checksum is ok */ |
| 78 | if ((u8) ~key[3] == key[4]) |
Sean Young | 2ceeca0 | 2016-09-21 06:54:19 -0300 | [diff] [blame^] | 79 | rc_keydown(d->rc_dev, proto, scancode, 0); |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 80 | else |
| 81 | rc_keyup(d->rc_dev); |
| 82 | } else if (key[0] == 2) { |
| 83 | rc_repeat(d->rc_dev); |
| 84 | } else { |
| 85 | rc_keyup(d->rc_dev); |
| 86 | } |
| 87 | |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 88 | if (key[0] != 0) |
Andy Shevchenko | 5bdb787 | 2012-09-26 09:55:14 -0300 | [diff] [blame] | 89 | deb_info("key: %*ph\n", 5, key); |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 90 | |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 91 | return 0; |
| 92 | } |
| 93 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 94 | static int dtt200u_frontend_attach(struct dvb_usb_adapter *adap) |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 95 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 96 | adap->fe_adap[0].fe = dtt200u_fe_attach(adap->dev); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 97 | return 0; |
| 98 | } |
| 99 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 100 | static struct dvb_usb_device_properties dtt200u_properties; |
| 101 | static struct dvb_usb_device_properties wt220u_fc_properties; |
| 102 | static struct dvb_usb_device_properties wt220u_properties; |
| 103 | static struct dvb_usb_device_properties wt220u_zl0353_properties; |
Rasmus Rohde | d3c35ac | 2007-07-21 15:37:35 -0300 | [diff] [blame] | 104 | static struct dvb_usb_device_properties wt220u_miglia_properties; |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 105 | |
| 106 | static int dtt200u_usb_probe(struct usb_interface *intf, |
| 107 | const struct usb_device_id *id) |
| 108 | { |
Janne Grunau | 78e9200 | 2008-04-09 19:13:13 -0300 | [diff] [blame] | 109 | if (0 == dvb_usb_device_init(intf, &dtt200u_properties, |
| 110 | THIS_MODULE, NULL, adapter_nr) || |
| 111 | 0 == dvb_usb_device_init(intf, &wt220u_properties, |
| 112 | THIS_MODULE, NULL, adapter_nr) || |
| 113 | 0 == dvb_usb_device_init(intf, &wt220u_fc_properties, |
| 114 | THIS_MODULE, NULL, adapter_nr) || |
| 115 | 0 == dvb_usb_device_init(intf, &wt220u_zl0353_properties, |
| 116 | THIS_MODULE, NULL, adapter_nr) || |
| 117 | 0 == dvb_usb_device_init(intf, &wt220u_miglia_properties, |
| 118 | THIS_MODULE, NULL, adapter_nr)) |
Patrick Boettcher | d590f9c | 2005-07-07 17:58:33 -0700 | [diff] [blame] | 119 | return 0; |
| 120 | |
| 121 | return -ENODEV; |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 122 | } |
| 123 | |
| 124 | static struct usb_device_id dtt200u_usb_table [] = { |
Patrick Boettcher | 62703b9 | 2005-09-09 13:02:46 -0700 | [diff] [blame] | 125 | { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_DTT200U_COLD) }, |
| 126 | { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_DTT200U_WARM) }, |
| 127 | { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_COLD) }, |
| 128 | { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_WARM) }, |
Patrick Boettcher | d46e645 | 2006-03-28 16:15:05 -0300 | [diff] [blame] | 129 | { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_ZL0353_COLD) }, |
| 130 | { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_ZL0353_WARM) }, |
Alexander Tuschen | 19e2257 | 2006-07-16 15:03:17 -0300 | [diff] [blame] | 131 | { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_FC_COLD) }, |
| 132 | { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_FC_WARM) }, |
Jochen Issing | ded38d2 | 2006-08-19 16:03:21 -0300 | [diff] [blame] | 133 | { USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_WT220U_ZAP250_COLD) }, |
Rasmus Rohde | d3c35ac | 2007-07-21 15:37:35 -0300 | [diff] [blame] | 134 | { USB_DEVICE(USB_VID_MIGLIA, USB_PID_WT220U_ZAP250_COLD) }, |
Patrick Boettcher | 62703b9 | 2005-09-09 13:02:46 -0700 | [diff] [blame] | 135 | { 0 }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 136 | }; |
| 137 | MODULE_DEVICE_TABLE(usb, dtt200u_usb_table); |
| 138 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 139 | static struct dvb_usb_device_properties dtt200u_properties = { |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 140 | .usb_ctrl = CYPRESS_FX2, |
| 141 | .firmware = "dvb-usb-dtt200u-01.fw", |
| 142 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 143 | .num_adapters = 1, |
| 144 | .adapter = { |
| 145 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 146 | .num_frontends = 1, |
| 147 | .fe = {{ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 148 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_NEED_PID_FILTERING, |
| 149 | .pid_filter_count = 15, |
| 150 | |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 151 | .streaming_ctrl = dtt200u_streaming_ctrl, |
| 152 | .pid_filter = dtt200u_pid_filter, |
| 153 | .frontend_attach = dtt200u_frontend_attach, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 154 | /* parameter for the MPEG2-data transfer */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 155 | .stream = { |
| 156 | .type = USB_BULK, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 157 | .count = 7, |
| 158 | .endpoint = 0x02, |
| 159 | .u = { |
| 160 | .bulk = { |
| 161 | .buffersize = 4096, |
| 162 | } |
| 163 | } |
| 164 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 165 | }}, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 166 | } |
| 167 | }, |
| 168 | .power_ctrl = dtt200u_power_ctrl, |
| 169 | |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 170 | .rc.core = { |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 171 | .rc_interval = 300, |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 172 | .rc_codes = RC_MAP_DTT200U, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 173 | .rc_query = dtt200u_rc_query, |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 174 | .allowed_protos = RC_BIT_NEC, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 175 | }, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 176 | |
| 177 | .generic_bulk_ctrl_endpoint = 0x01, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 178 | |
| 179 | .num_device_descs = 1, |
| 180 | .devices = { |
Patrick Boettcher | d590f9c | 2005-07-07 17:58:33 -0700 | [diff] [blame] | 181 | { .name = "WideView/Yuan/Yakumo/Hama/Typhoon DVB-T USB2.0 (WT-200U)", |
Patrick Boettcher | fb41f5a | 2005-07-07 17:58:23 -0700 | [diff] [blame] | 182 | .cold_ids = { &dtt200u_usb_table[0], NULL }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 183 | .warm_ids = { &dtt200u_usb_table[1], NULL }, |
| 184 | }, |
Al Viro | dad08df | 2006-02-01 06:02:50 -0500 | [diff] [blame] | 185 | { NULL }, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 186 | } |
| 187 | }; |
| 188 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 189 | static struct dvb_usb_device_properties wt220u_properties = { |
Patrick Boettcher | d590f9c | 2005-07-07 17:58:33 -0700 | [diff] [blame] | 190 | .usb_ctrl = CYPRESS_FX2, |
Patrick Boettcher | 6ce17c5 | 2006-01-09 15:25:45 -0200 | [diff] [blame] | 191 | .firmware = "dvb-usb-wt220u-02.fw", |
Patrick Boettcher | d590f9c | 2005-07-07 17:58:33 -0700 | [diff] [blame] | 192 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 193 | .num_adapters = 1, |
| 194 | .adapter = { |
| 195 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 196 | .num_frontends = 1, |
| 197 | .fe = {{ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 198 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_NEED_PID_FILTERING, |
| 199 | .pid_filter_count = 15, |
| 200 | |
Patrick Boettcher | d590f9c | 2005-07-07 17:58:33 -0700 | [diff] [blame] | 201 | .streaming_ctrl = dtt200u_streaming_ctrl, |
| 202 | .pid_filter = dtt200u_pid_filter, |
| 203 | .frontend_attach = dtt200u_frontend_attach, |
Patrick Boettcher | d590f9c | 2005-07-07 17:58:33 -0700 | [diff] [blame] | 204 | /* parameter for the MPEG2-data transfer */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 205 | .stream = { |
| 206 | .type = USB_BULK, |
Patrick Boettcher | d590f9c | 2005-07-07 17:58:33 -0700 | [diff] [blame] | 207 | .count = 7, |
| 208 | .endpoint = 0x02, |
| 209 | .u = { |
| 210 | .bulk = { |
| 211 | .buffersize = 4096, |
| 212 | } |
| 213 | } |
| 214 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 215 | }}, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 216 | } |
| 217 | }, |
| 218 | .power_ctrl = dtt200u_power_ctrl, |
| 219 | |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 220 | .rc.core = { |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 221 | .rc_interval = 300, |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 222 | .rc_codes = RC_MAP_DTT200U, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 223 | .rc_query = dtt200u_rc_query, |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 224 | .allowed_protos = RC_BIT_NEC, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 225 | }, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 226 | |
| 227 | .generic_bulk_ctrl_endpoint = 0x01, |
Patrick Boettcher | d590f9c | 2005-07-07 17:58:33 -0700 | [diff] [blame] | 228 | |
| 229 | .num_device_descs = 1, |
| 230 | .devices = { |
Patrick Boettcher | 62703b9 | 2005-09-09 13:02:46 -0700 | [diff] [blame] | 231 | { .name = "WideView WT-220U PenType Receiver (Typhoon/Freecom)", |
Jochen Issing | ded38d2 | 2006-08-19 16:03:21 -0300 | [diff] [blame] | 232 | .cold_ids = { &dtt200u_usb_table[2], &dtt200u_usb_table[8], NULL }, |
Patrick Boettcher | d590f9c | 2005-07-07 17:58:33 -0700 | [diff] [blame] | 233 | .warm_ids = { &dtt200u_usb_table[3], NULL }, |
| 234 | }, |
Al Viro | dad08df | 2006-02-01 06:02:50 -0500 | [diff] [blame] | 235 | { NULL }, |
Patrick Boettcher | d590f9c | 2005-07-07 17:58:33 -0700 | [diff] [blame] | 236 | } |
| 237 | }; |
| 238 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 239 | static struct dvb_usb_device_properties wt220u_fc_properties = { |
Alexander Tuschen | 19e2257 | 2006-07-16 15:03:17 -0300 | [diff] [blame] | 240 | .usb_ctrl = CYPRESS_FX2, |
| 241 | .firmware = "dvb-usb-wt220u-fc03.fw", |
| 242 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 243 | .num_adapters = 1, |
| 244 | .adapter = { |
| 245 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 246 | .num_frontends = 1, |
| 247 | .fe = {{ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 248 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_NEED_PID_FILTERING, |
| 249 | .pid_filter_count = 15, |
| 250 | |
Alexander Tuschen | 19e2257 | 2006-07-16 15:03:17 -0300 | [diff] [blame] | 251 | .streaming_ctrl = dtt200u_streaming_ctrl, |
| 252 | .pid_filter = dtt200u_pid_filter, |
| 253 | .frontend_attach = dtt200u_frontend_attach, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 254 | /* parameter for the MPEG2-data transfer */ |
| 255 | .stream = { |
| 256 | .type = USB_BULK, |
| 257 | .count = 7, |
| 258 | .endpoint = 0x06, |
| 259 | .u = { |
| 260 | .bulk = { |
| 261 | .buffersize = 4096, |
| 262 | } |
| 263 | } |
| 264 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 265 | }}, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 266 | } |
| 267 | }, |
| 268 | .power_ctrl = dtt200u_power_ctrl, |
Alexander Tuschen | 19e2257 | 2006-07-16 15:03:17 -0300 | [diff] [blame] | 269 | |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 270 | .rc.core = { |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 271 | .rc_interval = 300, |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 272 | .rc_codes = RC_MAP_DTT200U, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 273 | .rc_query = dtt200u_rc_query, |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 274 | .allowed_protos = RC_BIT_NEC, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 275 | }, |
Alexander Tuschen | 19e2257 | 2006-07-16 15:03:17 -0300 | [diff] [blame] | 276 | |
| 277 | .generic_bulk_ctrl_endpoint = 0x01, |
| 278 | |
Alexander Tuschen | 19e2257 | 2006-07-16 15:03:17 -0300 | [diff] [blame] | 279 | .num_device_descs = 1, |
| 280 | .devices = { |
| 281 | { .name = "WideView WT-220U PenType Receiver (Typhoon/Freecom)", |
| 282 | .cold_ids = { &dtt200u_usb_table[6], NULL }, |
| 283 | .warm_ids = { &dtt200u_usb_table[7], NULL }, |
| 284 | }, |
| 285 | { NULL }, |
| 286 | } |
| 287 | }; |
| 288 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 289 | static struct dvb_usb_device_properties wt220u_zl0353_properties = { |
Patrick Boettcher | d46e645 | 2006-03-28 16:15:05 -0300 | [diff] [blame] | 290 | .usb_ctrl = CYPRESS_FX2, |
| 291 | .firmware = "dvb-usb-wt220u-zl0353-01.fw", |
| 292 | |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 293 | .num_adapters = 1, |
| 294 | .adapter = { |
| 295 | { |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 296 | .num_frontends = 1, |
| 297 | .fe = {{ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 298 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | DVB_USB_ADAP_NEED_PID_FILTERING, |
| 299 | .pid_filter_count = 15, |
| 300 | |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 301 | .streaming_ctrl = dtt200u_streaming_ctrl, |
| 302 | .pid_filter = dtt200u_pid_filter, |
| 303 | .frontend_attach = dtt200u_frontend_attach, |
| 304 | /* parameter for the MPEG2-data transfer */ |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 305 | .stream = { |
| 306 | .type = USB_BULK, |
Patrick Boettcher | 01451e7 | 2006-10-13 11:34:46 -0300 | [diff] [blame] | 307 | .count = 7, |
| 308 | .endpoint = 0x02, |
| 309 | .u = { |
| 310 | .bulk = { |
| 311 | .buffersize = 4096, |
| 312 | } |
| 313 | } |
| 314 | }, |
Michael Krufky | 77eed21 | 2011-09-06 09:31:57 -0300 | [diff] [blame] | 315 | }}, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 316 | } |
| 317 | }, |
| 318 | .power_ctrl = dtt200u_power_ctrl, |
| 319 | |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 320 | .rc.core = { |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 321 | .rc_interval = 300, |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 322 | .rc_codes = RC_MAP_DTT200U, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 323 | .rc_query = dtt200u_rc_query, |
Jonathan McDowell | a4d020e | 2016-05-20 12:08:35 -0300 | [diff] [blame] | 324 | .allowed_protos = RC_BIT_NEC, |
Mauro Carvalho Chehab | f72a27b | 2010-07-31 18:04:09 -0300 | [diff] [blame] | 325 | }, |
Patrick Boettcher | 4d43e13 | 2006-09-30 06:53:48 -0300 | [diff] [blame] | 326 | |
| 327 | .generic_bulk_ctrl_endpoint = 0x01, |
Patrick Boettcher | d46e645 | 2006-03-28 16:15:05 -0300 | [diff] [blame] | 328 | |
| 329 | .num_device_descs = 1, |
| 330 | .devices = { |
| 331 | { .name = "WideView WT-220U PenType Receiver (based on ZL353)", |
| 332 | .cold_ids = { &dtt200u_usb_table[4], NULL }, |
| 333 | .warm_ids = { &dtt200u_usb_table[5], NULL }, |
| 334 | }, |
| 335 | { NULL }, |
| 336 | } |
| 337 | }; |
| 338 | |
Rasmus Rohde | d3c35ac | 2007-07-21 15:37:35 -0300 | [diff] [blame] | 339 | static struct dvb_usb_device_properties wt220u_miglia_properties = { |
| 340 | .usb_ctrl = CYPRESS_FX2, |
| 341 | .firmware = "dvb-usb-wt220u-miglia-01.fw", |
| 342 | |
| 343 | .num_adapters = 1, |
| 344 | .generic_bulk_ctrl_endpoint = 0x01, |
| 345 | |
| 346 | .num_device_descs = 1, |
| 347 | .devices = { |
| 348 | { .name = "WideView WT-220U PenType Receiver (Miglia)", |
| 349 | .cold_ids = { &dtt200u_usb_table[9], NULL }, |
| 350 | /* This device turns into WT220U_ZL0353_WARM when fw |
| 351 | has been uploaded */ |
| 352 | .warm_ids = { NULL }, |
| 353 | }, |
| 354 | { NULL }, |
| 355 | } |
| 356 | }; |
| 357 | |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 358 | /* usb specific object needed to register this driver with the usb subsystem */ |
| 359 | static struct usb_driver dtt200u_usb_driver = { |
Patrick Boettcher | d590f9c | 2005-07-07 17:58:33 -0700 | [diff] [blame] | 360 | .name = "dvb_usb_dtt200u", |
Patrick Boettcher | 62703b9 | 2005-09-09 13:02:46 -0700 | [diff] [blame] | 361 | .probe = dtt200u_usb_probe, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 362 | .disconnect = dvb_usb_device_exit, |
Patrick Boettcher | 62703b9 | 2005-09-09 13:02:46 -0700 | [diff] [blame] | 363 | .id_table = dtt200u_usb_table, |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 364 | }; |
| 365 | |
Greg Kroah-Hartman | ecb3b2b | 2011-11-18 09:46:12 -0800 | [diff] [blame] | 366 | module_usb_driver(dtt200u_usb_driver); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 367 | |
Patrick Boettcher | 99e44da | 2016-01-24 12:56:58 -0200 | [diff] [blame] | 368 | MODULE_AUTHOR("Patrick Boettcher <patrick.boettcher@posteo.de>"); |
Rasmus Rohde | d3c35ac | 2007-07-21 15:37:35 -0300 | [diff] [blame] | 369 | MODULE_DESCRIPTION("Driver for the WideView/Yakumo/Hama/Typhoon/Club3D/Miglia DVB-T USB2.0 devices"); |
Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame] | 370 | MODULE_VERSION("1.0"); |
| 371 | MODULE_LICENSE("GPL"); |