dvb-usb.rst 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. Idea behind the dvb-usb-framework
  2. =================================
  3. .. note::
  4. #) This documentation is outdated. Please check at the DVB wiki
  5. at https://linuxtv.org/wiki for more updated info.
  6. #) **deprecated:** Newer DVB USB drivers should use the dvb-usb-v2 framework.
  7. In March 2005 I got the new Twinhan USB2.0 DVB-T device. They provided specs
  8. and a firmware.
  9. Quite keen I wanted to put the driver (with some quirks of course) into dibusb.
  10. After reading some specs and doing some USB snooping, it realized, that the
  11. dibusb-driver would be a complete mess afterwards. So I decided to do it in a
  12. different way: With the help of a dvb-usb-framework.
  13. The framework provides generic functions (mostly kernel API calls), such as:
  14. - Transport Stream URB handling in conjunction with dvb-demux-feed-control
  15. (bulk and isoc are supported)
  16. - registering the device for the DVB-API
  17. - registering an I2C-adapter if applicable
  18. - remote-control/input-device handling
  19. - firmware requesting and loading (currently just for the Cypress USB
  20. controllers)
  21. - other functions/methods which can be shared by several drivers (such as
  22. functions for bulk-control-commands)
  23. - TODO: a I2C-chunker. It creates device-specific chunks of register-accesses
  24. depending on length of a register and the number of values that can be
  25. multi-written and multi-read.
  26. The source code of the particular DVB USB devices does just the communication
  27. with the device via the bus. The connection between the DVB-API-functionality
  28. is done via callbacks, assigned in a static device-description (struct
  29. dvb_usb_device) each device-driver has to have.
  30. For an example have a look in drivers/media/usb/dvb-usb/vp7045*.
  31. Objective is to migrate all the usb-devices (dibusb, cinergyT2, maybe the
  32. ttusb; flexcop-usb already benefits from the generic flexcop-device) to use
  33. the dvb-usb-lib.
  34. TODO: dynamic enabling and disabling of the pid-filter in regard to number of
  35. feeds requested.
  36. Supported devices
  37. -----------------
  38. See the LinuxTV DVB Wiki at https://linuxtv.org for a complete list of
  39. cards/drivers/firmwares:
  40. https://linuxtv.org/wiki/index.php/DVB_USB
  41. 0. History & News:
  42. 2005-06-30
  43. - added support for WideView WT-220U (Thanks to Steve Chang)
  44. 2005-05-30
  45. - added basic isochronous support to the dvb-usb-framework
  46. - added support for Conexant Hybrid reference design and Nebula
  47. DigiTV USB
  48. 2005-04-17
  49. - all dibusb devices ported to make use of the dvb-usb-framework
  50. 2005-04-02
  51. - re-enabled and improved remote control code.
  52. 2005-03-31
  53. - ported the Yakumo/Hama/Typhoon DVB-T USB2.0 device to dvb-usb.
  54. 2005-03-30
  55. - first commit of the dvb-usb-module based on the dibusb-source.
  56. First device is a new driver for the
  57. TwinhanDTV Alpha / MagicBox II USB2.0-only DVB-T device.
  58. - (change from dvb-dibusb to dvb-usb)
  59. 2005-03-28
  60. - added support for the AVerMedia AverTV DVB-T USB2.0 device
  61. (Thanks to Glen Harris and Jiun-Kuei Jung, AVerMedia)
  62. 2005-03-14
  63. - added support for the Typhoon/Yakumo/HAMA DVB-T mobile USB2.0
  64. 2005-02-11
  65. - added support for the KWorld/ADSTech Instant DVB-T USB2.0.
  66. Thanks a lot to Joachim von Caron
  67. 2005-02-02
  68. - added support for the Hauppauge Win-TV Nova-T USB2
  69. 2005-01-31
  70. - distorted streaming is gone for USB1.1 devices
  71. 2005-01-13
  72. - moved the mirrored pid_filter_table back to dvb-dibusb
  73. first almost working version for HanfTek UMT-010
  74. found out, that Yakumo/HAMA/Typhoon are predecessors of the HanfTek UMT-010
  75. 2005-01-10
  76. - refactoring completed, now everything is very delightful
  77. - tuner quirks for some weird devices (Artec T1 AN2235 device has sometimes a
  78. Panasonic Tuner assembled). Tunerprobing implemented.
  79. Thanks a lot to Gunnar Wittich.
  80. 2004-12-29
  81. - after several days of struggling around bug of no returning URBs fixed.
  82. 2004-12-26
  83. - refactored the dibusb-driver, splitted into separate files
  84. - i2c-probing enabled
  85. 2004-12-06
  86. - possibility for demod i2c-address probing
  87. - new usb IDs (Compro, Artec)
  88. 2004-11-23
  89. - merged changes from DiB3000MC_ver2.1
  90. - revised the debugging
  91. - possibility to deliver the complete TS for USB2.0
  92. 2004-11-21
  93. - first working version of the dib3000mc/p frontend driver.
  94. 2004-11-12
  95. - added additional remote control keys. Thanks to Uwe Hanke.
  96. 2004-11-07
  97. - added remote control support. Thanks to David Matthews.
  98. 2004-11-05
  99. - added support for a new devices (Grandtec/Avermedia/Artec)
  100. - merged my changes (for dib3000mb/dibusb) to the FE_REFACTORING, because it became HEAD
  101. - moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems
  102. better settled there (added xfer_ops-struct)
  103. - created a common files for frontends (mc/p/mb)
  104. 2004-09-28
  105. - added support for a new device (Unknown, vendor ID is Hyper-Paltek)
  106. 2004-09-20
  107. - added support for a new device (Compro DVB-U2000), thanks
  108. to Amaury Demol for reporting
  109. - changed usb TS transfer method (several urbs, stopping transfer
  110. before setting a new pid)
  111. 2004-09-13
  112. - added support for a new device (Artec T1 USB TVBOX), thanks
  113. to Christian Motschke for reporting
  114. 2004-09-05
  115. - released the dibusb device and dib3000mb-frontend driver
  116. (old news for vp7041.c)
  117. 2004-07-15
  118. - found out, by accident, that the device has a TUA6010XS for PLL
  119. 2004-07-12
  120. - figured out, that the driver should also work with the
  121. CTS Portable (Chinese Television System)
  122. 2004-07-08
  123. - firmware-extraction-2.422-problem solved, driver is now working
  124. properly with firmware extracted from 2.422
  125. - #if for 2.6.4 (dvb), compile issue
  126. - changed firmware handling, see vp7041.txt sec 1.1
  127. 2004-07-02
  128. - some tuner modifications, v0.1, cleanups, first public
  129. 2004-06-28
  130. - now using the dvb_dmx_swfilter_packets, everything runs fine now
  131. 2004-06-27
  132. - able to watch and switching channels (pre-alpha)
  133. - no section filtering yet
  134. 2004-06-06
  135. - first TS received, but kernel oops :/
  136. 2004-05-14
  137. - firmware loader is working
  138. 2004-05-11
  139. - start writing the driver
  140. How to use?
  141. -----------
  142. Firmware
  143. ~~~~~~~~
  144. Most of the USB drivers need to download a firmware to the device before start
  145. working.
  146. Have a look at the Wikipage for the DVB-USB-drivers to find out, which firmware
  147. you need for your device:
  148. https://linuxtv.org/wiki/index.php/DVB_USB
  149. Compiling
  150. ~~~~~~~~~
  151. Since the driver is in the linux kernel, activating the driver in
  152. your favorite config-environment should sufficient. I recommend
  153. to compile the driver as module. Hotplug does the rest.
  154. If you use dvb-kernel enter the build-2.6 directory run 'make' and 'insmod.sh
  155. load' afterwards.
  156. Loading the drivers
  157. ~~~~~~~~~~~~~~~~~~~
  158. Hotplug is able to load the driver, when it is needed (because you plugged
  159. in the device).
  160. If you want to enable debug output, you have to load the driver manually and
  161. from within the dvb-kernel cvs repository.
  162. first have a look, which debug level are available:
  163. .. code-block:: none
  164. # modinfo dvb-usb
  165. # modinfo dvb-usb-vp7045
  166. etc.
  167. .. code-block:: none
  168. modprobe dvb-usb debug=<level>
  169. modprobe dvb-usb-vp7045 debug=<level>
  170. etc.
  171. should do the trick.
  172. When the driver is loaded successfully, the firmware file was in
  173. the right place and the device is connected, the "Power"-LED should be
  174. turned on.
  175. At this point you should be able to start a dvb-capable application. I'm use
  176. (t|s)zap, mplayer and dvbscan to test the basics. VDR-xine provides the
  177. long-term test scenario.
  178. Known problems and bugs
  179. -----------------------
  180. - Don't remove the USB device while running an DVB application, your system
  181. will go crazy or die most likely.
  182. Adding support for devices
  183. ~~~~~~~~~~~~~~~~~~~~~~~~~~
  184. TODO
  185. USB1.1 Bandwidth limitation
  186. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  187. A lot of the currently supported devices are USB1.1 and thus they have a
  188. maximum bandwidth of about 5-6 MBit/s when connected to a USB2.0 hub.
  189. This is not enough for receiving the complete transport stream of a
  190. DVB-T channel (which is about 16 MBit/s). Normally this is not a
  191. problem, if you only want to watch TV (this does not apply for HDTV),
  192. but watching a channel while recording another channel on the same
  193. frequency simply does not work very well. This applies to all USB1.1
  194. DVB-T devices, not just the dvb-usb-devices)
  195. The bug, where the TS is distorted by a heavy usage of the device is gone
  196. definitely. All dvb-usb-devices I was using (Twinhan, Kworld, DiBcom) are
  197. working like charm now with VDR. Sometimes I even was able to record a channel
  198. and watch another one.
  199. Comments
  200. ~~~~~~~~
  201. Patches, comments and suggestions are very very welcome.
  202. 3. Acknowledgements
  203. -------------------
  204. Amaury Demol (Amaury.Demol@parrot.com) and Francois Kanounnikoff from DiBcom for
  205. providing specs, code and help, on which the dvb-dibusb, dib3000mb and
  206. dib3000mc are based.
  207. David Matthews for identifying a new device type (Artec T1 with AN2235)
  208. and for extending dibusb with remote control event handling. Thank you.
  209. Alex Woods for frequently answering question about usb and dvb
  210. stuff, a big thank you.
  211. Bernd Wagner for helping with huge bug reports and discussions.
  212. Gunnar Wittich and Joachim von Caron for their trust for providing
  213. root-shells on their machines to implement support for new devices.
  214. Allan Third and Michael Hutchinson for their help to write the Nebula
  215. digitv-driver.
  216. Glen Harris for bringing up, that there is a new dibusb-device and Jiun-Kuei
  217. Jung from AVerMedia who kindly provided a special firmware to get the device
  218. up and running in Linux.
  219. Jennifer Chen, Jeff and Jack from Twinhan for kindly supporting by
  220. writing the vp7045-driver.
  221. Steve Chang from WideView for providing information for new devices and
  222. firmware files.
  223. Michael Paxton for submitting remote control keymaps.
  224. Some guys on the linux-dvb mailing list for encouraging me.
  225. Peter Schildmann >peter.schildmann-nospam-at-web.de< for his
  226. user-level firmware loader, which saves a lot of time
  227. (when writing the vp7041 driver)
  228. Ulf Hermenau for helping me out with traditional chinese.
  229. André Smoktun and Christian Frömmel for supporting me with
  230. hardware and listening to my problems very patiently.