Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0
0002 
0003 Idea behind the dvb-usb-framework
0004 =================================
0005 
0006 .. note::
0007 
0008    #) This documentation is outdated. Please check at the DVB wiki
0009       at https://linuxtv.org/wiki for more updated info.
0010 
0011    #) **deprecated:** Newer DVB USB drivers should use the dvb-usb-v2 framework.
0012 
0013 In March 2005 I got the new Twinhan USB2.0 DVB-T device. They provided specs
0014 and a firmware.
0015 
0016 Quite keen I wanted to put the driver (with some quirks of course) into dibusb.
0017 After reading some specs and doing some USB snooping, it realized, that the
0018 dibusb-driver would be a complete mess afterwards. So I decided to do it in a
0019 different way: With the help of a dvb-usb-framework.
0020 
0021 The framework provides generic functions (mostly kernel API calls), such as:
0022 
0023 - Transport Stream URB handling in conjunction with dvb-demux-feed-control
0024   (bulk and isoc are supported)
0025 - registering the device for the DVB-API
0026 - registering an I2C-adapter if applicable
0027 - remote-control/input-device handling
0028 - firmware requesting and loading (currently just for the Cypress USB
0029   controllers)
0030 - other functions/methods which can be shared by several drivers (such as
0031   functions for bulk-control-commands)
0032 - TODO: a I2C-chunker. It creates device-specific chunks of register-accesses
0033   depending on length of a register and the number of values that can be
0034   multi-written and multi-read.
0035 
0036 The source code of the particular DVB USB devices does just the communication
0037 with the device via the bus. The connection between the DVB-API-functionality
0038 is done via callbacks, assigned in a static device-description (struct
0039 dvb_usb_device) each device-driver has to have.
0040 
0041 For an example have a look in drivers/media/usb/dvb-usb/vp7045*.
0042 
0043 Objective is to migrate all the usb-devices (dibusb, cinergyT2, maybe the
0044 ttusb; flexcop-usb already benefits from the generic flexcop-device) to use
0045 the dvb-usb-lib.
0046 
0047 TODO: dynamic enabling and disabling of the pid-filter in regard to number of
0048 feeds requested.
0049 
0050 Supported devices
0051 -----------------
0052 
0053 See the LinuxTV DVB Wiki at https://linuxtv.org for a complete list of
0054 cards/drivers/firmwares:
0055 https://linuxtv.org/wiki/index.php/DVB_USB
0056 
0057 0. History & News:
0058 
0059   2005-06-30
0060 
0061   - added support for WideView WT-220U (Thanks to Steve Chang)
0062 
0063   2005-05-30
0064 
0065   - added basic isochronous support to the dvb-usb-framework
0066   - added support for Conexant Hybrid reference design and Nebula
0067                DigiTV USB
0068 
0069   2005-04-17
0070 
0071   - all dibusb devices ported to make use of the dvb-usb-framework
0072 
0073   2005-04-02
0074 
0075   - re-enabled and improved remote control code.
0076 
0077   2005-03-31
0078 
0079   - ported the Yakumo/Hama/Typhoon DVB-T USB2.0 device to dvb-usb.
0080 
0081   2005-03-30
0082 
0083   - first commit of the dvb-usb-module based on the dibusb-source.
0084     First device is a new driver for the
0085     TwinhanDTV Alpha / MagicBox II USB2.0-only DVB-T device.
0086   - (change from dvb-dibusb to dvb-usb)
0087 
0088   2005-03-28
0089 
0090   - added support for the AVerMedia AverTV DVB-T USB2.0 device
0091     (Thanks to Glen Harris and Jiun-Kuei Jung, AVerMedia)
0092 
0093   2005-03-14
0094 
0095   - added support for the Typhoon/Yakumo/HAMA DVB-T mobile USB2.0
0096 
0097   2005-02-11
0098 
0099   - added support for the KWorld/ADSTech Instant DVB-T USB2.0.
0100     Thanks a lot to Joachim von Caron
0101 
0102   2005-02-02
0103   - added support for the Hauppauge Win-TV Nova-T USB2
0104 
0105   2005-01-31
0106   - distorted streaming is gone for USB1.1 devices
0107 
0108   2005-01-13
0109 
0110   - moved the mirrored pid_filter_table back to dvb-dibusb
0111     first almost working version for HanfTek UMT-010
0112     found out, that Yakumo/HAMA/Typhoon are predecessors of the HanfTek UMT-010
0113 
0114   2005-01-10
0115 
0116   - refactoring completed, now everything is very delightful
0117 
0118   - tuner quirks for some weird devices (Artec T1 AN2235 device has sometimes a
0119     Panasonic Tuner assembled). Tunerprobing implemented.
0120     Thanks a lot to Gunnar Wittich.
0121 
0122   2004-12-29
0123 
0124   - after several days of struggling around bug of no returning URBs fixed.
0125 
0126   2004-12-26
0127 
0128   - refactored the dibusb-driver, split into separate files
0129   - i2c-probing enabled
0130 
0131   2004-12-06
0132 
0133   - possibility for demod i2c-address probing
0134   - new usb IDs (Compro, Artec)
0135 
0136   2004-11-23
0137 
0138   - merged changes from DiB3000MC_ver2.1
0139   - revised the debugging
0140   - possibility to deliver the complete TS for USB2.0
0141 
0142   2004-11-21
0143 
0144   - first working version of the dib3000mc/p frontend driver.
0145 
0146   2004-11-12
0147 
0148   - added additional remote control keys. Thanks to Uwe Hanke.
0149 
0150   2004-11-07
0151 
0152   - added remote control support. Thanks to David Matthews.
0153 
0154   2004-11-05
0155 
0156   - added support for a new devices (Grandtec/Avermedia/Artec)
0157   - merged my changes (for dib3000mb/dibusb) to the FE_REFACTORING, because it became HEAD
0158   - moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems
0159     better settled there (added xfer_ops-struct)
0160   - created a common files for frontends (mc/p/mb)
0161 
0162   2004-09-28
0163 
0164   - added support for a new device (Unknown, vendor ID is Hyper-Paltek)
0165 
0166   2004-09-20
0167 
0168   - added support for a new device (Compro DVB-U2000), thanks
0169     to Amaury Demol for reporting
0170   - changed usb TS transfer method (several urbs, stopping transfer
0171     before setting a new pid)
0172 
0173   2004-09-13
0174 
0175   - added support for a new device (Artec T1 USB TVBOX), thanks
0176     to Christian Motschke for reporting
0177 
0178   2004-09-05
0179 
0180   - released the dibusb device and dib3000mb-frontend driver
0181     (old news for vp7041.c)
0182 
0183   2004-07-15
0184 
0185   - found out, by accident, that the device has a TUA6010XS for PLL
0186 
0187   2004-07-12
0188 
0189   - figured out, that the driver should also work with the
0190     CTS Portable (Chinese Television System)
0191 
0192   2004-07-08
0193 
0194   - firmware-extraction-2.422-problem solved, driver is now working
0195     properly with firmware extracted from 2.422
0196   - #if for 2.6.4 (dvb), compile issue
0197   - changed firmware handling, see vp7041.txt sec 1.1
0198 
0199   2004-07-02
0200 
0201   - some tuner modifications, v0.1, cleanups, first public
0202 
0203   2004-06-28
0204 
0205   - now using the dvb_dmx_swfilter_packets, everything runs fine now
0206 
0207   2004-06-27
0208 
0209   - able to watch and switching channels (pre-alpha)
0210   - no section filtering yet
0211 
0212   2004-06-06
0213 
0214   - first TS received, but kernel oops :/
0215 
0216   2004-05-14
0217 
0218   - firmware loader is working
0219 
0220   2004-05-11
0221 
0222   - start writing the driver
0223 
0224 How to use?
0225 -----------
0226 
0227 Firmware
0228 ~~~~~~~~
0229 
0230 Most of the USB drivers need to download a firmware to the device before start
0231 working.
0232 
0233 Have a look at the Wikipage for the DVB-USB-drivers to find out, which firmware
0234 you need for your device:
0235 
0236 https://linuxtv.org/wiki/index.php/DVB_USB
0237 
0238 Compiling
0239 ~~~~~~~~~
0240 
0241 Since the driver is in the linux kernel, activating the driver in
0242 your favorite config-environment should sufficient. I recommend
0243 to compile the driver as module. Hotplug does the rest.
0244 
0245 If you use dvb-kernel enter the build-2.6 directory run 'make' and 'insmod.sh
0246 load' afterwards.
0247 
0248 Loading the drivers
0249 ~~~~~~~~~~~~~~~~~~~
0250 
0251 Hotplug is able to load the driver, when it is needed (because you plugged
0252 in the device).
0253 
0254 If you want to enable debug output, you have to load the driver manually and
0255 from within the dvb-kernel cvs repository.
0256 
0257 first have a look, which debug level are available:
0258 
0259 .. code-block:: none
0260 
0261         # modinfo dvb-usb
0262         # modinfo dvb-usb-vp7045
0263 
0264         etc.
0265 
0266 .. code-block:: none
0267 
0268         modprobe dvb-usb debug=<level>
0269         modprobe dvb-usb-vp7045 debug=<level>
0270         etc.
0271 
0272 should do the trick.
0273 
0274 When the driver is loaded successfully, the firmware file was in
0275 the right place and the device is connected, the "Power"-LED should be
0276 turned on.
0277 
0278 At this point you should be able to start a dvb-capable application. I'm use
0279 (t|s)zap, mplayer and dvbscan to test the basics. VDR-xine provides the
0280 long-term test scenario.
0281 
0282 Known problems and bugs
0283 -----------------------
0284 
0285 - Don't remove the USB device while running an DVB application, your system
0286   will go crazy or die most likely.
0287 
0288 Adding support for devices
0289 ~~~~~~~~~~~~~~~~~~~~~~~~~~
0290 
0291 TODO
0292 
0293 USB1.1 Bandwidth limitation
0294 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
0295 
0296 A lot of the currently supported devices are USB1.1 and thus they have a
0297 maximum bandwidth of about 5-6 MBit/s when connected to a USB2.0 hub.
0298 This is not enough for receiving the complete transport stream of a
0299 DVB-T channel (which is about 16 MBit/s). Normally this is not a
0300 problem, if you only want to watch TV (this does not apply for HDTV),
0301 but watching a channel while recording another channel on the same
0302 frequency simply does not work very well. This applies to all USB1.1
0303 DVB-T devices, not just the dvb-usb-devices)
0304 
0305 The bug, where the TS is distorted by a heavy usage of the device is gone
0306 definitely. All dvb-usb-devices I was using (Twinhan, Kworld, DiBcom) are
0307 working like charm now with VDR. Sometimes I even was able to record a channel
0308 and watch another one.
0309 
0310 Comments
0311 ~~~~~~~~
0312 
0313 Patches, comments and suggestions are very very welcome.
0314 
0315 3. Acknowledgements
0316 -------------------
0317 
0318    Amaury Demol (Amaury.Demol@parrot.com) and Francois Kanounnikoff from DiBcom for
0319    providing specs, code and help, on which the dvb-dibusb, dib3000mb and
0320    dib3000mc are based.
0321 
0322    David Matthews for identifying a new device type (Artec T1 with AN2235)
0323    and for extending dibusb with remote control event handling. Thank you.
0324 
0325    Alex Woods for frequently answering question about usb and dvb
0326    stuff, a big thank you.
0327 
0328    Bernd Wagner for helping with huge bug reports and discussions.
0329 
0330    Gunnar Wittich and Joachim von Caron for their trust for providing
0331    root-shells on their machines to implement support for new devices.
0332 
0333    Allan Third and Michael Hutchinson for their help to write the Nebula
0334    digitv-driver.
0335 
0336    Glen Harris for bringing up, that there is a new dibusb-device and Jiun-Kuei
0337    Jung from AVerMedia who kindly provided a special firmware to get the device
0338    up and running in Linux.
0339 
0340    Jennifer Chen, Jeff and Jack from Twinhan for kindly supporting by
0341    writing the vp7045-driver.
0342 
0343    Steve Chang from WideView for providing information for new devices and
0344    firmware files.
0345 
0346    Michael Paxton for submitting remote control keymaps.
0347 
0348    Some guys on the linux-dvb mailing list for encouraging me.
0349 
0350    Peter Schildmann >peter.schildmann-nospam-at-web.de< for his
0351    user-level firmware loader, which saves a lot of time
0352    (when writing the vp7041 driver)
0353 
0354    Ulf Hermenau for helping me out with traditional chinese.
0355 
0356    André Smoktun and Christian Frömmel for supporting me with
0357    hardware and listening to my problems very patiently.