dvb-usb.rst 10 KB

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