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