Johannes Stezenbach | 776338e | 2005-06-23 22:02:35 -0700 | [diff] [blame^] | 1 | Documentation for dvb-usb-framework module and its devices |
| 2 | |
| 3 | Idea behind the dvb-usb-framework |
| 4 | ================================= |
| 5 | |
| 6 | In March 2005 I got the new Twinhan USB2.0 DVB-T device. They provided specs and a firmware. |
| 7 | |
| 8 | Quite keen I wanted to put the driver (with some quirks of course) into dibusb. |
| 9 | After reading some specs and doing some USB snooping, it realized, that the |
| 10 | dibusb-driver would be a complete mess afterwards. So I decided to do it in a |
| 11 | different way: With the help of a dvb-usb-framework. |
| 12 | |
| 13 | The framework provides generic functions (mostly kernel API calls), such as: |
| 14 | |
| 15 | - Transport Stream URB handling in conjunction with dvb-demux-feed-control |
| 16 | (bulk and isoc (TODO) are supported) |
| 17 | - registering the device for the DVB-API |
| 18 | - registering an I2C-adapter if applicable |
| 19 | - remote-control/input-device handling |
| 20 | - firmware requesting and loading (currently just for the Cypress USB |
| 21 | controller) |
| 22 | - other functions/methods which can be shared by several drivers (such as |
| 23 | functions for bulk-control-commands) |
| 24 | |
| 25 | The source code of the particular DVB USB devices does just the communication |
| 26 | with the device via the bus. The connection between the DVB-API-functionality |
| 27 | is done via callbacks, assigned in a static device-description (struct |
| 28 | dvb_usb_device) each device-driver has to have. |
| 29 | |
| 30 | For an example have a look in drivers/media/dvb/dvb-usb/vp7045*. |
| 31 | |
| 32 | Objective is to migrate all the usb-devices (dibusb, cinergyT2, maybe the |
| 33 | ttusb; flexcop-usb already benefits from the generic flexcop-device) to use |
| 34 | the dvb-usb-lib. |
| 35 | |
| 36 | TODO: dynamic enabling and disabling of the pid-filter in regard to number of |
| 37 | feeds requested. |
| 38 | |
| 39 | Supported devices USB1.1 |
| 40 | ======================== |
| 41 | |
| 42 | Produced and reselled by Twinhan: |
| 43 | --------------------------------- |
| 44 | - TwinhanDTV USB-Ter DVB-T Device (VP7041) |
| 45 | http://www.twinhan.com/product_terrestrial_3.asp |
| 46 | |
| 47 | - TwinhanDTV Magic Box (VP7041e) |
| 48 | http://www.twinhan.com/product_terrestrial_4.asp |
| 49 | |
| 50 | - HAMA DVB-T USB device |
| 51 | http://www.hama.de/portal/articleId*110620/action*2598 |
| 52 | |
| 53 | - CTS Portable (Chinese Television System) (2) |
| 54 | http://www.2cts.tv/ctsportable/ |
| 55 | |
| 56 | - Unknown USB DVB-T device with vendor ID Hyper-Paltek |
| 57 | |
| 58 | |
| 59 | Produced and reselled by KWorld: |
| 60 | -------------------------------- |
| 61 | - KWorld V-Stream XPERT DTV DVB-T USB |
| 62 | http://www.kworld.com.tw/en/product/DVBT-USB/DVBT-USB.html |
| 63 | |
| 64 | - JetWay DTV DVB-T USB |
| 65 | http://www.jetway.com.tw/evisn/product/lcd-tv/DVT-USB/dtv-usb.htm |
| 66 | |
| 67 | - ADSTech Instant TV DVB-T USB |
| 68 | http://www.adstech.com/products/PTV-333/intro/PTV-333_intro.asp?pid=PTV-333 |
| 69 | |
| 70 | |
| 71 | Others: |
| 72 | ------- |
| 73 | - Ultima Electronic/Artec T1 USB TVBOX (AN2135, AN2235, AN2235 with Panasonic Tuner) |
| 74 | http://82.161.246.249/products-tvbox.html |
| 75 | |
| 76 | - Compro Videomate DVB-U2000 - DVB-T USB (2) |
| 77 | http://www.comprousa.com/products/vmu2000.htm |
| 78 | |
| 79 | - Grandtec USB DVB-T |
| 80 | http://www.grand.com.tw/ |
| 81 | |
| 82 | - AVerMedia AverTV DVBT USB |
| 83 | http://www.avermedia.com/ |
| 84 | |
| 85 | - DiBcom USB DVB-T reference device (non-public) |
| 86 | |
| 87 | |
| 88 | Supported devices USB2.0-only |
| 89 | ============================= |
| 90 | - Twinhan MagicBox II |
| 91 | http://www.twinhan.com/product_terrestrial_7.asp |
| 92 | |
| 93 | - TwinhanDTV Alpha |
| 94 | http://www.twinhan.com/product_terrestrial_8.asp |
| 95 | |
| 96 | - DigitalNow TinyUSB 2 DVB-t Receiver |
| 97 | http://www.digitalnow.com.au/DigitalNow%20tinyUSB2%20Specifications.html |
| 98 | |
| 99 | - Hanftek UMT-010 |
| 100 | http://www.globalsources.com/si/6008819757082/ProductDetail/Digital-TV/product_id-100046529 |
| 101 | |
| 102 | |
| 103 | Supported devices USB2.0 and USB1.1 |
| 104 | ============================= |
| 105 | - Typhoon/Yakumo/HAMA/Yuan DVB-T mobile USB2.0 |
| 106 | http://www.yakumo.de/produkte/index.php?pid=1&ag=DVB-T |
| 107 | http://www.yuan.com.tw/en/products/vdo_ub300.html |
| 108 | http://www.hama.de/portal/articleId*114663/action*2563 |
| 109 | http://www.anubisline.com/english/articlec.asp?id=50502&catid=002 |
| 110 | |
| 111 | - Artec T1 USB TVBOX (FX2) (2) |
| 112 | |
| 113 | - Hauppauge WinTV NOVA-T USB2 |
| 114 | http://www.hauppauge.com/ |
| 115 | |
| 116 | - KWorld/ADSTech Instant DVB-T USB2.0 (DiB3000M-B) |
| 117 | |
| 118 | - DiBcom USB2.0 DVB-T reference device (non-public) |
| 119 | |
| 120 | - AVerMedia AverTV A800 DVB-T USB2.0 |
| 121 | |
| 122 | 1) It is working almost - work-in-progress. |
| 123 | 2) No test reports received yet. |
| 124 | |
| 125 | 0. History & News: |
| 126 | 2005-04-17 - all dibusb devices ported to make use of the dvb-usb-framework |
| 127 | 2005-04-02 - re-enabled and improved remote control code. |
| 128 | 2005-03-31 - ported the Yakumo/Hama/Typhoon DVB-T USB2.0 device to dvb-usb. |
| 129 | 2005-03-30 - first commit of the dvb-usb-module based on the dibusb-source. First device is a new driver for the |
| 130 | TwinhanDTV Alpha / MagicBox II USB2.0-only DVB-T device. |
| 131 | |
| 132 | (change from dvb-dibusb to dvb-usb) |
| 133 | 2005-03-28 - added support for the AVerMedia AverTV DVB-T USB2.0 device (Thanks to Glen Harris and Jiun-Kuei Jung, AVerMedia) |
| 134 | 2005-03-14 - added support for the Typhoon/Yakumo/HAMA DVB-T mobile USB2.0 |
| 135 | 2005-02-11 - added support for the KWorld/ADSTech Instant DVB-T USB2.0. Thanks a lot to Joachim von Caron |
| 136 | 2005-02-02 - added support for the Hauppauge Win-TV Nova-T USB2 |
| 137 | 2005-01-31 - distorted streaming is gone for USB1.1 devices |
| 138 | 2005-01-13 - moved the mirrored pid_filter_table back to dvb-dibusb |
| 139 | - first almost working version for HanfTek UMT-010 |
| 140 | - found out, that Yakumo/HAMA/Typhoon are predessors of the HanfTek UMT-010 |
| 141 | 2005-01-10 - refactoring completed, now everything is very delightful |
| 142 | - tuner quirks for some weird devices (Artec T1 AN2235 device has sometimes a |
| 143 | Panasonic Tuner assembled). Tunerprobing implemented. Thanks a lot to Gunnar Wittich. |
| 144 | 2004-12-29 - after several days of struggling around bug of no returning URBs fixed. |
| 145 | 2004-12-26 - refactored the dibusb-driver, splitted into separate files |
| 146 | - i2c-probing enabled |
| 147 | 2004-12-06 - possibility for demod i2c-address probing |
| 148 | - new usb IDs (Compro, Artec) |
| 149 | 2004-11-23 - merged changes from DiB3000MC_ver2.1 |
| 150 | - revised the debugging |
| 151 | - possibility to deliver the complete TS for USB2.0 |
| 152 | 2004-11-21 - first working version of the dib3000mc/p frontend driver. |
| 153 | 2004-11-12 - added additional remote control keys. Thanks to Uwe Hanke. |
| 154 | 2004-11-07 - added remote control support. Thanks to David Matthews. |
| 155 | 2004-11-05 - added support for a new devices (Grandtec/Avermedia/Artec) |
| 156 | - merged my changes (for dib3000mb/dibusb) to the FE_REFACTORING, because it became HEAD |
| 157 | - moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems |
| 158 | better settled there (added xfer_ops-struct) |
| 159 | - created a common files for frontends (mc/p/mb) |
| 160 | 2004-09-28 - added support for a new device (Unkown, vendor ID is Hyper-Paltek) |
| 161 | 2004-09-20 - added support for a new device (Compro DVB-U2000), thanks |
| 162 | to Amaury Demol for reporting |
| 163 | - changed usb TS transfer method (several urbs, stopping transfer |
| 164 | before setting a new pid) |
| 165 | 2004-09-13 - added support for a new device (Artec T1 USB TVBOX), thanks |
| 166 | to Christian Motschke for reporting |
| 167 | 2004-09-05 - released the dibusb device and dib3000mb-frontend driver |
| 168 | |
| 169 | (old news for vp7041.c) |
| 170 | 2004-07-15 - found out, by accident, that the device has a TUA6010XS for |
| 171 | PLL |
| 172 | 2004-07-12 - figured out, that the driver should also work with the |
| 173 | CTS Portable (Chinese Television System) |
| 174 | 2004-07-08 - firmware-extraction-2.422-problem solved, driver is now working |
| 175 | properly with firmware extracted from 2.422 |
| 176 | - #if for 2.6.4 (dvb), compile issue |
| 177 | - changed firmware handling, see vp7041.txt sec 1.1 |
| 178 | 2004-07-02 - some tuner modifications, v0.1, cleanups, first public |
| 179 | 2004-06-28 - now using the dvb_dmx_swfilter_packets, everything |
| 180 | runs fine now |
| 181 | 2004-06-27 - able to watch and switching channels (pre-alpha) |
| 182 | - no section filtering yet |
| 183 | 2004-06-06 - first TS received, but kernel oops :/ |
| 184 | 2004-05-14 - firmware loader is working |
| 185 | 2004-05-11 - start writing the driver |
| 186 | |
| 187 | 1. How to use? |
| 188 | 1.1. Firmware |
| 189 | |
| 190 | Most of the USB drivers need to download a firmware to start working. |
| 191 | |
| 192 | for USB1.1 (AN2135) you need: dvb-usb-dibusb-5.0.0.11.fw |
| 193 | for USB2.0 HanfTek: dvb-usb-umt-010-02.fw |
| 194 | for USB2.0 DiBcom: dvb-usb-dibusb-6.0.0.8.fw |
| 195 | for USB2.0 AVerMedia AverTV DVB-T USB2: dvb-usb-avertv-a800-01.fw |
| 196 | for USB2.0 TwinhanDTV Alpha/MagicBox II: dvb-usb-vp7045-01.fw |
| 197 | |
| 198 | The files can be found on http://www.linuxtv.org/download/firmware/ . |
| 199 | |
| 200 | We do not have the permission (yet) to publish the following firmware-files. |
| 201 | You'll need to extract them from the windows drivers. |
| 202 | |
| 203 | You should be able to use "get_dvb_firmware dvb-usb" to get the firmware: |
| 204 | |
| 205 | for USB1.1 (AN2235) (a few Artec T1 devices): dvb-usb-dibusb-an2235-01.fw |
| 206 | for USB2.0 Hauppauge: dvb-usb-nova-t-usb2-01.fw |
| 207 | for USB2.0 ADSTech/Kworld USB2.0: dvb-usb-adstech-usb2-01.fw |
| 208 | for USB2.0 Yakumo/Typhoon/Hama: dvb-usb-dtt200u-01.fw |
| 209 | |
| 210 | 1.2. Compiling |
| 211 | |
| 212 | Since the driver is in the linux kernel, activating the driver in |
| 213 | your favorite config-environment should sufficient. I recommend |
| 214 | to compile the driver as module. Hotplug does the rest. |
| 215 | |
| 216 | If you use dvb-kernel enter the build-2.6 directory run 'make' and 'insmod.sh |
| 217 | load' afterwards. |
| 218 | |
| 219 | 1.3. Loading the drivers |
| 220 | |
| 221 | Hotplug is able to load the driver, when it is needed (because you plugged |
| 222 | in the device). |
| 223 | |
| 224 | If you want to enable debug output, you have to load the driver manually and |
| 225 | from withing the dvb-kernel cvs repository. |
| 226 | |
| 227 | first have a look, which debug level are available: |
| 228 | |
| 229 | modinfo dvb-usb |
| 230 | modinfo dvb-usb-vp7045 |
| 231 | etc. |
| 232 | |
| 233 | modprobe dvb-usb debug=<level> |
| 234 | modprobe dvb-usb-vp7045 debug=<level> |
| 235 | etc. |
| 236 | |
| 237 | should do the trick. |
| 238 | |
| 239 | When the driver is loaded successfully, the firmware file was in |
| 240 | the right place and the device is connected, the "Power"-LED should be |
| 241 | turned on. |
| 242 | |
| 243 | At this point you should be able to start a dvb-capable application. I'm use |
| 244 | (t|s)zap, mplayer and dvbscan to test the basics. VDR-xine provides the |
| 245 | long-term test scenario. |
| 246 | |
| 247 | 2. Known problems and bugs |
| 248 | |
| 249 | - Don't remove the USB device while running an DVB application, your system |
| 250 | will go crazy or die most likely. |
| 251 | |
| 252 | 2.1. Adding support for devices |
| 253 | |
| 254 | TODO |
| 255 | |
| 256 | 2.2. USB1.1 Bandwidth limitation |
| 257 | |
| 258 | A lot of the currently supported devices are USB1.1 and thus they have a |
| 259 | maximum bandwidth of about 5-6 MBit/s when connected to a USB2.0 hub. |
| 260 | This is not enough for receiving the complete transport stream of a |
| 261 | DVB-T channel (which is about 16 MBit/s). Normally this is not a |
| 262 | problem, if you only want to watch TV (this does not apply for HDTV), |
| 263 | but watching a channel while recording another channel on the same |
| 264 | frequency simply does not work very well. This applies to all USB1.1 |
| 265 | DVB-T devices, not just the dvb-usb-devices) |
| 266 | |
| 267 | The bug, where the TS is distorted by a heavy usage of the device is gone |
| 268 | definitely. All dvb-usb-devices I was using (Twinhan, Kworld, DiBcom) are |
| 269 | working like charm now with VDR. Sometimes I even was able to record a channel |
| 270 | and watch another one. |
| 271 | |
| 272 | 2.3. Comments |
| 273 | |
| 274 | Patches, comments and suggestions are very very welcome. |
| 275 | |
| 276 | 3. Acknowledgements |
| 277 | Amaury Demol (ademol@dibcom.fr) and Francois Kanounnikoff from DiBcom for |
| 278 | providing specs, code and help, on which the dvb-dibusb, dib3000mb and |
| 279 | dib3000mc are based. |
| 280 | |
| 281 | David Matthews for identifying a new device type (Artec T1 with AN2235) |
| 282 | and for extending dibusb with remote control event handling. Thank you. |
| 283 | |
| 284 | Alex Woods for frequently answering question about usb and dvb |
| 285 | stuff, a big thank you. |
| 286 | |
| 287 | Bernd Wagner for helping with huge bug reports and discussions. |
| 288 | |
| 289 | Gunnar Wittich and Joachim von Caron for their trust for providing |
| 290 | root-shells on their machines to implement support for new devices. |
| 291 | |
| 292 | Glen Harris for bringing up, that there is a new dibusb-device and Jiun-Kuei |
| 293 | Jung from AVerMedia who kindly provided a special firmware to get the device |
| 294 | up and running in Linux. |
| 295 | |
| 296 | Jennifer Chen, Jeff and Jack from Twinhan for kindly supporting by |
| 297 | writing the vp7045-driver. |
| 298 | |
| 299 | Some guys on the linux-dvb mailing list for encouraging me |
| 300 | |
| 301 | Peter Schildmann >peter.schildmann-nospam-at-web.de< for his |
| 302 | user-level firmware loader, which saves a lot of time |
| 303 | (when writing the vp7041 driver) |
| 304 | |
| 305 | Ulf Hermenau for helping me out with traditional chinese. |
| 306 | |
| 307 | André Smoktun and Christian Frömmel for supporting me with |
| 308 | hardware and listening to my problems very patient. |