Linux driver for DC10plus, LML33 and Iomega Buz video capture cards

New driver available! The driver presented here was designed to work with Linux kernel versions 2.2.x and 2.4.x. It is based on old kernel infrastructure and now the development of this driver is stopped. For those who is going to use DC10plus, LML33 and Iomega Buz cards, I suggest to use a new driver.


Introduction

Supported hardware. This is a driver for DC10plus capture cards from Pinnacle Systems Inc., LML33 cards from Linux Media Labs and Buz from Iomega Corporation. It also works with many old Miro DC10 cards with SAA7110A TV decoder and ADV7176 TV encoder. Please, make sure that your DC10 card has these chips, otherwise the driver will not work. If you have a different (DC30-like card), please, try a new driver instead.

Support for LML33 card was added in the driver version 0.6, thanks to Vassilii Leonov from Linux Media Labs who had sent me a free sample of their product. Wolfgang Scherr, who was the first maintainer of this driver, introduced support for Iomega Buz cards in version 0.7.

The driver is Video4Linux compliant and contains extensions to provide a full motion MJPEG compression and decompression in hardware using Zoran chipset features. Since this driver initially was a derivative from the driver for Buz Iomega cards written by Dr. Rainer Johanni, http://www.johanni.de/munich-vision/buz/, they both have compatible API.

Since version 0.5 the driver compiles and works with 2.2.x and 2.4.x kernels. (I used 2.2.14, 2.2.16 and 2.4.0-test6 kernels for testing). Please, be aware that some Linux distributors supply modified kernels with their distributions and with such kernels the driver compilation may fail. Unfortunately, I don't have time and other resources to keep the driver compatible with every Linux distribution, therefore, only official Linux kernels from www.kernel.org and its mirrors will be supported.

Please, send questions and/or opinions to Serguei Miridonov <mirsev@cicese.mx>.

Formats supported by the driver:

DC10plus:


LML33 and Buz:


The JPEG compression ratio is adjustable, so the data rate can be varied from 11 MBytes/s down to 1-2 MBytes/s depending on the required image quality.

Hardware compression

Since the card provides hardware compression, even low end machines can be successfully used for movie capture and playback. I've tested the driver with DC10plus card with 2.2.14 kernel running on 233 MHz Pentium MMX with 64M RAM on 430TX motherboard and with 10GB IDE drive from Western Digital Corp.

On one test run I've got 0 frames dropped during about 20 minutes of full motion NTSC (I live in Mexico) video capture with fully synchronized audio. The command was

    lavrec -fa -in -d1 -l -1 -q30 -w /dos/g/capture/Linux/test%03d.avi

  for recording, and

    lavplay -n128 /dos/g/capture/Linux/test*.avi

  for playback. (See lavtools distribution for more information).

Typical run of similar test can provide as few as 6-8 dropped frames per half of an hour. You mileage may vary, though.
 

Tested applications:

Since v0.4 the driver can be used by two applications at the same time: you can use tool like XawTV to watch the movie during recording or playing it back by lavtools: screenshot 1 shows the recording of SECAM video from a VCR using lavrec, and screenshot 2 shows the playing it back as PAL movie using xlav utility from lavtools. It might be a good feature but be careful, read warning note in README file regarding this new capability.


Copyright: This driver is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License.

No warranty: This driver is provided on AN "AS-IS" basis WITHOUT WARRANTY OF ANY KIND. YOU USE IT AT YOUR OWN RISK.

To download the latest version of this driver from CVS tree at mjpeg.sourceforge.net, click here. For compilation and installation instructions, please, read file README (It is also included in the downloaded TAR archive). If you experience some problems with the newest driver from CVS, please, try version 0.8 instead. However, be aware, this branch is not maintained any more and it will not compile with Linux kernels later 2.4.5.
 

Driver testing:

  1. Connect your TV signal source (camera, VCR) to the Composite or S-Video inputs of the board.
  2. Compile and install the driver according to instructions in README file. (Check the update script and set the driver parameters appropriately for your TV system).
  3. Check your log file to make sure that the driver was loaded successfully.
  4. Connect DC10/plus or LML33 video output to TV set video input or to TV monitor.
  5. If the driver was loaded and initialized correctly, you will be able to see the image from your video source on the TV screen.
  6. Install patched for DC10/plus lavtools package (see below) if you have not done it before.
  7. Run  lavrec -t 5 movie_name.avi  - if everything works as it is supposed to, this program will record a 5 second movie from your TV source.
  8. Run lavplay movie_name.avi - it will play this movie back. You may also try to play any AVI clip that you have recorded in Windows95/98 using Studio, or any other software, with your DC10plus card.
  9. If everything is OK, try xlav movie_name.avi - you will like it ;-)
For more information and links, read this page below. For more news, read mjpeg-users mailing list (link below) and visit this page often.

To work on this driver successfully, I need your feedback. Please, send me the portion of your log file which is related to driver loading and operation. Also I would appreciate if you send me your opinions and suggestions. Thank you.

Enjoy!
 


Known bugs: the driver does not always work properly with cards which have an older ZR36057 PCI interface chip instead of newer ZR36067. Typical symptom of this bug is that MJPEG compressed capture works only once with full image size and then the driver must be reloaded to get it working again. If you have this chip on your card, please, read file README, section Bug Reports and send me a message even if you can not reproduce this bug: I need more information about which hardware configurations may trigger this bug. I would also appreciate if you find a solution for this problem.

On October 17, 2000, I have received a patch from Brian Flachs <flachs@umunhum.stanford.edu> which tries to fix this problem with older ZR36057 chips. The patch is available here. It must be applied against version 0.6 of the driver. However, please, be aware that this patch may not always work and it can make the driver to operate improperly in some circumstances.


News:

April 21, 2001:

Plug-in for MainActor is now available. This plug-in provides, in some circumstances, MainActor Sequencer timeline playback directly to TV output of video capture cards DC10plus, LML33 and Buz. Please, read README file before installation. You can download source code here.

April 14, 2001:

Today, I'm releasing two versions of the driver. One is the official release 0.8 which is based on today's (April, 14) state of CVS tree. It seems reasonably stable, so let it be the new release. Main changes from 0.7c:
Those who used to run latest CVS driver before April 14 will not notice a difference, just the version change. This version is tagged as release-0-8 at sourceforge CVS driver-zoran tree.

The second one has more changes:

This version is under CVS now and can be downloaded from mjpeg.sourceforge.net using CVS or as a tarball from here.

April 8, 2001:

It seems that migration under CVS at mjpeg.sourceforge.net was smooth, the driver is updated regularly, so I think that now it is safe to download it directly from there. We will try to keep current CVS branch stable. For those who doesn't have CVS installed, the latest version will be available here.

March 7, 2001:

Starting migrating to CVS at mjpeg.sourceforge.net . All newest snapshots will be available from there. My first cvs commit was to add SECAM support for Iomega Buz cards (thanks to Famille biquard de Grenoble <xbiquard@free.fr>). So, if someone in Russia or France has this card, please, download latest snapshot using CVS, or take it here.

March 6, 2001:

This is just minor update release which includes NTSC fixes for Buz from Wolfgang Scherr. This release should be compatible with stock 2.2.16-18 and 2.4.2 kernels. At least, I've compiled it from the same source and with a single Makefile with all these kernels. The driver is available at http://www.cicese.mx/~mirsev/Linux/DC10plus/zoran-driver-0.7c.tar.gz. As always, please, read file README from this distribution before the driver compilation and installation.

November 20, 2000:

Iomega Buz returns! Wolfgang Scherr, who was the first maintainer of this driver, introduced support for Iomega Buz cards in 0.7a release. There were no changes for current DC10plus and LML33 cards users (besides that dc10.[ch] files have been renamed to zoran.[ch]).

October 13, 2000:

First of all, I would like to express my thanks to Vassilii Leonov from Linux Media Labs who had sent me free sample of their LML33 card. Today I release version 0.6 of the driver. Now it can work with both DC10/plus and LML33 cards. I have also changed the driver initialization code so that it recognizes the hardware and further works properly with both cards at the same time. Patched version of lavtools v1.2p2 package can be used with both cards.

August 28, 2000:

Linux 2.4 ready? Test it! Version 0.5 has been released. It has minor changes and the source now can be compiled for kernels 2.2.14 and above, including 2.4 series. I've tested this v0.5 driver with 2.2.16 and 2.4.0-test6 kernels (of course, you need to compile modules separately for each kernel, if you wish to use the driver with either version).

August 20, 2000:

Version 0.5test1: Minor changes related to workaround for older DC10 (non plus) cards with ZR36057 chip. This release also is a first step to integrate this driver into the kernel source: some header files were removed and files buz.c and buz.h have been renamed as dc10.c and dc10.h.

August 14, 2000:

Version 0.4 has been released. Please, read file README.dc10plus for changes and new features. You will also need a new patched version of lavtools package to make new driver features available. Please, note, that this version of lavtools is unofficial temporary release and some of its features may not be supported in the future.

June 9, 2000:

Version 0.3 has been released.

Last minute note from Wolfgang Scherr: if the downloaded driver v0.3 still doesn't work on your system, try the following patch:

--- buz.c       Fri Jun  9 07:21:22 2000
+++ buz-new.c   Fri Jun  9 12:06:26 2000
@@ -3540,6 +3540,7 @@
    /* video bus enabled */
 
    GPIO(btv, 2, 0);
+   mdelay(1);
    GPIO(btv, 1, 0);
 
    /* display codec revision */
This patch will be included in the next version.

Changes from v 0.2-experimental:

  1. In buz.c,  ioremap has been changed to ioremap_nocache for ZR36057/67 PCI configuration register space. It may fix some systems where BIOS programmed this space as cacheable. Probably, it can also solve some mysteries when the driver behavior changed after adding of "unnecessary" udelays and/or printk.
  2. Some interrupt testing is now performed after board initialization.
  3. More complete initialization in SAA7110. It fixes the frame instability which could appear just after driver loading.

June 5, 2000:

It seems that DC10/DC10plus cards have different hardware versions, so the current driver may work perfectly well on some systems but will not work on another. It looks like Zoran chips programming is very time-sensitive: one printk for debugging or a udelay(20) in some sensitive part of the driver can break it or make it working, and this is different on different systems. I have found such place in one of zr36060 programming functions, Wolfgang had found another in different place... Probably, even with the same DC10/DC10plus hardware the driver may work on one system but may not work on a faster or slower machine, or even on the same machine but with different PCI timing. We still need to test all this, and I believe, we need to discuss our problems among people already having experience with buz driver, even on a different hardware. Of course, if they don't object. ;-)

So, I would suggest to subscribe to the mjpeg-users mailing list and post there the description of your problems. Please make sure that your message contains distinct reference to DC10/DC10plus card to avoid any confusion with similar driver for Buz cards. For the time being the drivers are different, later we will try to merge both versions into a single ZR36060/57/67 driver. Also, please include lines of your log file related to the driver loading and operation. It will help to determine the configuration of your system.

If you have a success with a driver, I would like to know your configuration too, so please, mail me your experience with the driver and tools.

Be prepared, it may or may not work on your system but please try it and send me your results. For compilation, installation and usage, read the remaining part of this page. Also, please take a look at Wolfgang Scherr page for new patched lavtools package.

Changes from v 0.2:

  1. Automatic detection of ADV7175/7176 decoders at different i2c addresses.
  2. Improved detection of TV norm in SAA7110 driver.

May 31, 2000: v 0.2

Changes from v 0.1:

  1. TV encoder code has been fixed to operate correctly in PAL standard.
  2. Full motion decompression is finally working! Now you can record and play back your clips in AVI MJPEG or Quicktime format using lavtools (see below). You even can play back your movie files captured in Windows with Studio. Both NTSC and PAL standards should be supported.

Known problems in v0.2:

  1. If you are planning to use lavtools to capture your video, you need to apply patch (read Tools and utilities section below). This is not a driver problem, lavtools have been written for ITU-R.601 image format, and DC10plus card can provide only square pixel format. This is a hardware limitation imposed by SAA7110 TV decoder.
  2. To capture full motion video with lavtools in PAL standard you may need to add an option -f A (reverse fields, see lavtools distribution for more information). I don't know yet where the bug is hidden, it may be the driver or lavtools...
  3. Sometimes when the driver has just been loaded into memory, before using lavrec utility first time you may need to run xawtv just once. Otherwise, lavrec may not be able to start capture video. I have noticed this behavior only with PAL signal.
  4. When the system speed is not enough to maintain data rate of compressed video stream, it seems that dropped (lost) frames are not counted by lavrec, so it waits forever for frames from the driver even if driver has finished capturing video. In this state one can only kill lavrec by SIGKILL to get rid of it. It could be also driver issue, I will be looking into it.
  5. The driver now works only with DC10plus cards which have ADV7176 TV encoder. If you have different chip ADV7175 or another version of DC10, try to change the i2c address (I2C_ADV7175 macro) in adv7175.c file. It can be one of these: 0xD4, 0xD6, 0x54, 0x56. After that recompile the module, try to load the driver and see your syslog file or use dmesg to check if the chip is detected. In the next version I will try to make automatic search for this hardware.
Hopefully, these problems will be fixed soon. Now, since the driver seems to be working properly, I will focus on the interaction between the driver and software. If you have any idea or can suggest some patches (which is better ;-) for any application or to the driver itself, you are always welcome. However, to make this work more productive, I would suggest, first of all, to discuss your ideas and patches for specific application with a maintainer of that application. Read Tools and utilities section below.

Special note for Windows NT/2000 users: This is an open source driver and you may use it as a core to write a driver for Windows NT/2000. You will need to check for Linux kernel internals dealing with interrupts, DMA, i2c bus, memory allocation, driver API, etc. in order to make appropriate changes for different operating system. It is not too hard I believe, since Linux kernel source is always available. Good luck!


May 29, 2000: v 0.1

Changes from the version released by W.Scherr:

  1. Both PAL and NTSC standards are supported.
  2. Full motion video capture using hardware MJPEG compression is supported (thanks to Dr. Rainer.Johanni for 1.0.1 version of Buz driver).


 

Tools and utilities

I used two main tool sets to test the driver: xawtv and lavtools. Xawtv allows you to watch real-time video on a computer monitor if your video card supports overlays. Lavtools (the lavrec utility) can be used to capture full motion compressed video and audio, and save it on a disc in AVI MJPEG format, so it can be played later by xanim program. Lavtools provide also lavplay utility to play back captured video using hardware decompression and this feature is supported by the current DC10plus driver.

Before using these utilities with DC10plus board and this driver, I would recommend to read installation and usage instructions supplied with these tools. Please note, however, that DC10plus card supports only square pixel format. In contrast, the majority of TV related programs operate by default in ITU-R.601 recommended format which is different. The basic image size for DC10plus card is 640x480 (NTSC) and 768x576 (PAL) when both TV fields are captured at full resolution. Resolutions 320x240 (NTSC) and 384x288 (PAL) are also supported. So, to run the tools mentioned above successfully with this driver you will need to do some additional work:

xawtv, to work in NTSC standard, can be started with an additional option '-geometry 640x480' or '-geometry 320x240'. Accordingly, for PAL standard, set xawtv geometry to 768x576 or 384x288. Instead of running xawtv with additional options, you may add the following line to your .Xdefaults file:
Xawtv*geometry: <put appropriate format here>
In fact, if you run xawtv program with wrong image size, probably, it will scale the TV image accordingly. However, I could not run xawtv in full screen mode. Instead, you can run it in window mode and then adjust the resolution mode of X server using Ctrl-Alt-'+' or Ctrl-Alt-'-' hot keys (see XFree server manual page for instructions).

Unfortunately, I had experienced some problems with xawtv regarding its interaction with the driver. I believe that this is not a driver issue, so probably some work should be done to xawtv source. Just in case you have similar problems, read this: If you run xawtv program and see nothing but black window on your screen, click on this window with right mouse button and change TV standard to proper one using pull down menu. If nothing happens, quit or kill xawtv, turn off your TV source or disconnect it from the DC10plus board and try to run xawtv again. Then, while the TV source is still disconnected, try to set proper TV standard and then turn the TV source on, or connect it to DC10plus board. Now the TV image should appear on the screen.

lavtools, in order to work with DC10plus board, must be patched to operate correctly in square pixel format. The patched version can be found here.

Video editing software for Linux

There are some video editing software packages for Linux available. They may or may not work with this driver. Please, if you have any problems with any specific application, try to ask the developer of that program first.

I used to run the evaluation version of commercial MainActor non-linear video editing software with this driver. However, MainActor at this time does not support hardware compression API, so to capture full motion video, I would still recommend to use lavrec utility from lavtools package. The resulting AVI files can be successfully processed by MainActor.

I did not try yet to run very nice free Broadcast 2000 video editing software with this driver. Currently, this program also does not support MJPEG codec API for Video4Linux compliant drivers. However, since the program is distributed with its source, you may think of modifying it using lavtools as an example to take advantage of hardware compression. Good luck!


General information about DC10plus video capture card

The DC10plus card is manufactured by Pinnacle Systems Inc. and is considered by this company as low end product for home use. Currently the company provides very easy to use Studio software with only Windows 95/98 drivers for the card (even Windows NT/2000 is not supported). However, the hardware itself may sometimes satisfy even professional: the frame resolution can be up to 640x480, for NTSC, and, 768x576 for PAL standards, which is better than Super-VHS (400 vertical lines). The MJPEG hardware compression provides the ability to capture and play back full motion (50/60 fields per second) video with data rates below 10 MB/s, at compression ratio about 3 for very good image quality at full resolution, or even below 2.5 MB/s for acceptable VHS like or better image quality. The current price ($149.00 in USA) and card characteristics make this card very attractive even for beginners.

Multisystem PAL/NTSC capability: Pinnacle Systems Inc. insists that DC10plus cards sold in USA are for NTSC only and the cards sold in Europe and Australia are both PAL and NTSC... Well, I can not tell for every card sold in USA but at least one of them (guess which one? ;-) supports both PAL and NTSC, however, the drivers for Windows 95/98 supplied in the box, and then upgraded to version 1.05, support NTSC only. Current Linux driver supports both PAL and NTSC standards.

Pinnacle Systems Inc. does not release neither Windows driver source code, nor the card programming specifications. This makes writing the driver a bit difficult and that's why some features are not yet supported. Luckily, complete information is available about chipsets used in this card:

  1. Philips SAA7110A video decoder;
  2. Zoran ZR36060 (hardware JPEG codec) and ZR36067 (PCI controller);
  3. Analog Devices ADV7176 video encoder.
If someone would like to play with the driver code and add new features, please note that the same or similar JPEG codecs and PCI controllers are used in the Iomega Buz and LML33 cards. You may also take a look at Zoran H33 board. This might help somehow... However, the programming of different modes of operation depends on specific board design and this information for DC10plus card is still missing.
 
 


Copyright © Serguei Miridonov, 2000.  You may redistribute this document as long as you keep it in its current form, without any modifications. Please keep it updated if you decide to place it on a publicly accessible server.

This page is intended for information purposes only, it may contain errors, or inaccurate material.  Author of this page will not be held responsible for any damage -- direct or indirect -- which may result from inaccuracies.

All statements about businesses and/or corporations and/or everything else are being offered as opinions of the author of this page only. CICESE as a service provider is not responsible for the information presented on this page.

All trademarks and trade names used on this page are the properties of their respective owners.