Welcome to the website of the Linux Unified Zoran Driver. The Unified Zoran Driver is a generic driver for the zoran-360x7 PCI chipset, that is mostly used in MJPEG hardware capture devices, such as the Iomega Buz, Pinnacle/Miro DC10+ and the Linux Media Labs LML33. This website provides a driver for these cards, and it aims to provide some of the programming information available for these cards.
News
The Unified Zoran Driver is a generic driver for the zoran-360x7 PCI chipset, that is mostly used in MJPEG hardware capture devices, such as the Iomega Buz, Pinnacle/Miro DC10+ and the Linux Media Labs LML33. This website provides a driver for these cards, and it aims to provide some of the programming information available for these cards. The driver’s latest version is 4.51.0.0. It is recommended that the latest version of the driver is used in order to avoid any conflicts or problems. The Coach Digital Camera and its driver are provided by Zoran. It is highly recommended you run a free registry scan for.
Ronald Bultje writes (13/10/2004): Just for the archives: the driver on this webpage should not be used unless you're running an older 2.4.x kernel. Your current 2.6.x kernel contains the most up-to-date Zoran driver, and I intend to keep the current CVS here in sync with the most recent 2.6.x kernels. In your kernel, the module is called zr36067.ko, so just compile a vanilla kernel, run '/sbin/modprobe zr36067' and enjoy. I would also like to mention that the CVS tree that was once called ZORAN_VIDEODEV_2 has been moved to the HEAD CVS. The old (0.7.x) tree is branched off, see the webCVS for details.
Ronald Bultje writes (26/03/2003): A new release of your all-time favourite driver (well, the WLAN drivers are cooler, but still ;-) ) is available! This time, we (me) have decided unanymously to call this release 0.9.4!Changes since our last episode:
- Add YUY2 overlay (fullscreen/hardware-scaled)
- use __stringify() for array insmod options
- fix stupid flaw in open() logic (could result in oops)
- fix 2.5.x build
- remove lots of 'dead' includes from zoran_driver.c
- remove DataErr from the zr36060 IRQMask, this autoresets the chip when it loses sync, which means we don't get a timeout. Much better than all the manual restart handling (which only worked partly).
- introduce workaround for kfree-in-munmap-handler oops
- implement support for bitmaps rather than clips for overlay
- use try_module_get()/module_put() instead of MOD_INC/DEC_USE_COUNT in 2.5.x.. Also implement i2c_driver->owner for all i2c clients
This means, in short, that it shouldn't timeout anymore, it shouldn't oops anymore, and it should use 'true' fullscreen now (hardware-scaled) on Xv-capable videocards. Also, it should now work under 2.5.x (compilation is tested). I've had one report that the field order is sometimes spontaneously switched after a signal glitch. If anyone encounters it, I'd be interested in knowning what conditions trigger it (of course, it shouldn't do this).
Go to the Download-page to fetch this latest release!
unified zoran driver (zr360x7, zoran, buz, dc10(+), dc30(+), lml33)
website: http://mjpeg.sourceforge.net/driver-zoran/
32.2. What cards are supported¶
Iomega Buz, Linux Media Labs LML33/LML33R10, Pinnacle/MiroDC10/DC10+/DC30/DC30+ and related boards (available under various names).
32.2.1. Iomega Buz¶
- Zoran zr36067 PCI controller
- Zoran zr36060 MJPEG codec
- Philips saa7111 TV decoder
- Philips saa7185 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit,videocodec, saa7111, saa7185, zr36060, zr36067
Inputs/outputs: Composite and S-video
Norms: PAL, SECAM (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps)
Card number: 7
32.2.2. AverMedia 6 Eyes AVS6EYES¶
- Zoran zr36067 PCI controller
- Zoran zr36060 MJPEG codec
- Samsung ks0127 TV decoder
- Conexant bt866 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit,videocodec, ks0127, bt866, zr36060, zr36067
- Inputs/outputs:
- Six physical inputs. 1-6 are composite,1-2, 3-4, 5-6 doubles as S-video,1-3 triples as component.One composite output.
Norms: PAL, SECAM (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps)
Card number: 8
32.2.3. Linux Media Labs LML33¶
- Zoran zr36067 PCI controller
- Zoran zr36060 MJPEG codec
- Brooktree bt819 TV decoder
- Brooktree bt856 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit,videocodec, bt819, bt856, zr36060, zr36067
Inputs/outputs: Composite and S-video
Norms: PAL (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps)
Card number: 5
32.2.4. Linux Media Labs LML33R10¶
- Zoran zr36067 PCI controller
- Zoran zr36060 MJPEG codec
- Philips saa7114 TV decoder
- Analog Devices adv7170 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit,videocodec, saa7114, adv7170, zr36060, zr36067
Inputs/outputs: Composite and S-video
Norms: PAL (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps)
Card number: 6
32.2.5. Pinnacle/Miro DC10(new)¶
- Zoran zr36057 PCI controller
- Zoran zr36060 MJPEG codec
- Philips saa7110a TV decoder
- Analog Devices adv7176 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit,videocodec, saa7110, adv7175, zr36060, zr36067
Inputs/outputs: Composite, S-video and Internal
Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps) Elan mice & touchpads driver.
Card number: 1
32.2.6. Pinnacle/Miro DC10+¶
- Zoran zr36067 PCI controller
- Zoran zr36060 MJPEG codec
- Philips saa7110a TV decoder
- Analog Devices adv7176 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit,videocodec, sa7110, adv7175, zr36060, zr36067
Inputs/outputs: Composite, S-video and Internal
Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps)
Card number: 2
32.2.7. Pinnacle/Miro DC10(old)¶
- Zoran zr36057 PCI controller
- Zoran zr36050 MJPEG codec
- Zoran zr36016 Video Front End or Fuji md0211 Video Front End (clone?)
- Micronas vpx3220a TV decoder
- mse3000 TV encoder or Analog Devices adv7176 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit,videocodec, vpx3220, mse3000/adv7175, zr36050, zr36016, zr36067
Inputs/outputs: Composite, S-video and Internal
Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps)
Card number: 0
32.2.8. Pinnacle/Miro DC30¶
- Zoran zr36057 PCI controller
- Zoran zr36050 MJPEG codec
- Zoran zr36016 Video Front End
- Micronas vpx3225d/vpx3220a/vpx3216b TV decoder
- Analog Devices adv7176 TV encoder
Zoran Dindic
Drivers to use: videodev, i2c-core, i2c-algo-bit,videocodec, vpx3220/vpx3224, adv7175, zr36050, zr36016, zr36067
Inputs/outputs: Composite, S-video and Internal
Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps)
Card number: 3
32.2.9. Pinnacle/Miro DC30+¶
- Zoran zr36067 PCI controller
- Zoran zr36050 MJPEG codec
- Zoran zr36016 Video Front End
- Micronas vpx3225d/vpx3220a/vpx3216b TV decoder
- Analog Devices adv7176 TV encoder
Drivers to use: videodev, i2c-core, i2c-algo-bit,videocodec, vpx3220/vpx3224, adv7175, zr36050, zr36015, zr36067
Inputs/outputs: Composite, S-video and Internal
Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps)
Card number: 4
Note
- No module for the mse3000 is available yet
- No module for the vpx3224 is available yet
32.3. 1.1 What the TV decoder can do an what not¶
The best know TV standards are NTSC/PAL/SECAM. but for decoding a frame thatinformation is not enough. There are several formats of the TV standards.And not every TV decoder is able to handle every format. Also the everycombination is supported by the driver. There are currently 11 differenttv broadcast formats all aver the world.
The CCIR defines parameters needed for broadcasting the signal.The CCIR has defined different standards: A,B,D,E,F,G,D,H,I,K,K1,L,M,N,..The CCIR says not much about the colorsystem used !!!And talking about a colorsystem says not to much about how it is broadcast.
The CCIR standards A,E,F are not used any more.
When you speak about NTSC, you usually mean the standard: CCIR - M usingthe NTSC colorsystem which is used in the USA, Japan, Mexico, Canadaand a few others.
When you talk about PAL, you usually mean: CCIR - B/G using the PALcolorsystem which is used in many Countries.
When you talk about SECAM, you mean: CCIR - L using the SECAM Colorsystemwhich is used in France, and a few others.
There the other version of SECAM, CCIR - D/K is used in Bulgaria, China,Slovakai, Hungary, Korea (Rep.), Poland, Rumania and a others.
The CCIR - H uses the PAL colorsystem (sometimes SECAM) and is used inEgypt, Libya, Sri Lanka, Syrain Arab. Rep.
The CCIR - I uses the PAL colorsystem, and is used in Great Britain, Hong Kong,Ireland, Nigeria, South Africa.
The CCIR - N uses the PAL colorsystem and PAL frame size but the NTSC framerate,and is used in Argentinia, Uruguay, an a few others
We do not talk about how the audio is broadcast !
A rather good sites about the TV standards are:http://www.sony.jp/support/http://info.electronicwerkstatt.de/bereiche/fernsehtechnik/frequenzen_und_normen/Fernsehnormen/and http://www.cabl.com/restaurant/channel.html
Other weird things around: NTSC 4.43 is a modificated NTSC, which is mainlyused in PAL VCR’s that are able to play back NTSC. PAL 60 seems to be the sameas NTSC 4.43 . The Datasheets also talk about NTSC 44, It seems as if it wouldbe the same as NTSC 4.43.NTSC Combs seems to be a decoder mode where the decoder uses a comb filterto split coma and luma instead of a Delay line.
But I did not defiantly find out what NTSC Comb is.
32.3.1. Philips saa7111 TV decoder¶
- was introduced in 1997, is used in the BUZ and
- can handle: PAL B/G/H/I, PAL N, PAL M, NTSC M, NTSC N, NTSC 4.43 and SECAM
32.3.2. Philips saa7110a TV decoder¶
- was introduced in 1995, is used in the Pinnacle/Miro DC10(new), DC10+ and
- can handle: PAL B/G, NTSC M and SECAM
32.3.3. Philips saa7114 TV decoder¶
- was introduced in 2000, is used in the LML33R10 and
- can handle: PAL B/G/D/H/I/N, PAL N, PAL M, NTSC M, NTSC 4.43 and SECAM
32.3.4. Brooktree bt819 TV decoder¶
- was introduced in 1996, and is used in the LML33 and
- can handle: PAL B/D/G/H/I, NTSC M
32.3.5. Micronas vpx3220a TV decoder¶
- was introduced in 1996, is used in the DC30 and DC30+ and
- can handle: PAL B/G/H/I, PAL N, PAL M, NTSC M, NTSC 44, PAL 60, SECAM,NTSC Comb
32.3.6. Samsung ks0127 TV decoder¶
- is used in the AVS6EYES card and
- can handle: NTSC-M/N/44, PAL-M/N/B/G/H/I/D/K/L and SECAM
32.4. What the TV encoder can do an what not¶
The TV encoder are doing the “same” as the decoder, but in the oder direction.You feed them digital data and the generate a Composite or SVHS signal.For information about the colorsystems and TV norm take a look in theTV decoder section.
32.4.1. Philips saa7185 TV Encoder¶
- was introduced in 1996, is used in the BUZ
- can generate: PAL B/G, NTSC M
32.4.2. Brooktree bt856 TV Encoder¶
- was introduced in 1994, is used in the LML33
- can generate: PAL B/D/G/H/I/N, PAL M, NTSC M, PAL-N (Argentina)
32.4.3. Analog Devices adv7170 TV Encoder¶
- was introduced in 2000, is used in the LML300R10
- can generate: PAL B/D/G/H/I/N, PAL M, NTSC M, PAL 60
32.4.4. Analog Devices adv7175 TV Encoder¶
- was introduced in 1996, is used in the DC10, DC10+, DC10 old, DC30, DC30+
- can generate: PAL B/D/G/H/I/N, PAL M, NTSC M
32.4.5. ITT mse3000 TV encoder¶
- was introduced in 1991, is used in the DC10 old
- can generate: PAL , NTSC , SECAM
32.4.6. Conexant bt866 TV encoder¶
- is used in AVS6EYES, and
- can generate: NTSC/PAL, PALM, PALN
The adv717x, should be able to produce PAL N. But you find nothing PAL Nspecific in the registers. Seem that you have to reuse a other standardto generate PAL N, maybe it would work if you use the PAL M settings.
32.5. How do I get this damn thing to work¶
Load zr36067.o. If it can’t autodetect your card, use the card=X insmodoption with X being the card number as given in the previous section.To have more than one card, use card=X1[,X2[,X3,[X4[.]]]]
To automate this, add the following to your /etc/modprobe.d/zoran.conf:
options zr36067 card=X1[,X2[,X3[,X4[.]]]]alias char-major-81-0 zr36067
One thing to keep in mind is that this doesn’t load zr36067.o itself yet. Itjust automates loading. If you start using xawtv, the device won’t load onsome systems, since you’re trying to load modules as a user, which is notallowed (“permission denied”). A quick workaround is to add ‘Load “v4l”’ toXF86Config-4 when you use X by default, or to run ‘v4l-conf -c <device>’ inone of your startup scripts (normally rc.local) if you don’t use X. Bothmake sure that the modules are loaded on startup, under the root account.
32.6. What mainboard should I use (or why doesn’t my card work)¶
<insert lousy disclaimer here>. In short: good=SiS/Intel, bad=VIA.
Experience tells us that people with a Buz, on average, have more problemsthan users with a DC10+/LML33. Also, it tells us that people owning a VIA-based mainboard (ktXXX, MVP3) have more problems than users with a mainboardbased on a different chipset. Here’s some notes from Andrew Stevens:
Here’s my experience of using LML33 and Buz on various motherboards:
- VIA MVP3
- Forget it. Pointless. Doesn’t work.
- Intel 430FX (Pentium 200)
- LML33 perfect, Buz tolerable (3 or 4 frames dropped per movie)
- Intel 440BX (early stepping)
- LML33 tolerable. Buz starting to get annoying (6-10 frames/hour)
- Intel 440BX (late stepping)
- Buz tolerable, LML3 almost perfect (occasional single frame drops)
- SiS735
- LML33 perfect, Buz tolerable.
- VIA KT133(*)
- LML33 starting to get annoying, Buz poor enough that I have up.
- Both 440BX boards were dual CPU versions.
Bernhard Praschinger later added:
- AMD 751
- Buz perfect-tolerable
- AMD 760
- Buz perfect-tolerable
In general, people on the user mailinglist won’t give you much of a chanceif you have a VIA-based motherboard. They may be cheap, but sometimes, you’drather want to spend some more money on better boards. In general, VIAmainboard’s IDE/PCI performance will also suck badly compared to others.You’ll noticed the DC10+/DC30+ aren’t mentioned anywhere in the overview.Basically, you can assume that if the Buz works, the LML33 will work too. Ifthe LML33 works, the DC10+/DC30+ will work too. They’re most tolerant todifferent mainboard chipsets from all of the supported cards.
If you experience timeouts during capture, buy a better mainboard or lowerthe quality/buffersize during capture (see ‘Concerning buffer sizes, quality,output size etc.’). If it hangs, there’s little we can do as of now. Checkyour IRQs and make sure the card has its own interrupts.
32.7. Programming interface¶
This driver conforms to video4linux2. Support for V4L1 and for the customzoran ioctls has been removed in kernel 2.6.38.
For programming example, please, look at lavrec.c and lavplay.c code inthe MJPEG-tools (http://mjpeg.sf.net/).
Additional notes for software developers:
32.8. Applications¶
Applications known to work with this driver:
TV viewing:
- xawtv
- kwintv
- probably any TV application that supports video4linux or video4linux2.
MJPEG capture/playback:
- mjpegtools/lavtools (or Linux Video Studio)
- gstreamer
- mplayer
General raw capture:
- xawtv
- gstreamer
- probably any application that supports video4linux or video4linux2
Video editing:
- Cinelerra
- MainActor
- mjpegtools (or Linux Video Studio)
32.9. Concerning buffer sizes, quality, output size etc.¶
The zr36060 can do 1:2 JPEG compression. This is really the theoreticalmaximum that the chipset can reach. The driver can, however, limit compressionto a maximum (size) of 1:4. The reason for this is that some cards (e.g. Buz)can’t handle 1:2 compression without stopping capture after only a few minutes.With 1:4, it’ll mostly work. If you have a Buz, use ‘low_bitrate=1’ to go into1:4 max. compression mode.
100% JPEG quality is thus 1:2 compression in practice. So for a full PAL frame(size 720x576). The JPEG fields are stored in YUY2 format, so the size of thefields are 720x288x16/2 bits/field (2 fields/frame) = 207360 bytes/field x 2 =414720 bytes/frame (add some more bytes for headers and DHT (huffman)/DQT(quantization) tables, and you’ll get to something like 512kB per frame for1:2 compression. For 1:4 compression, you’d have frames of half this size.
Some additional explanation by Martin Samuelsson, which also explains theimportance of buffer sizes:–> Hmm, I do not think it is really that way. With the current (downloaded> at 18:00 Monday) driver I get that output sizes for 10 sec:> -q 50 -b 128 : 24.283.332 Bytes> -q 50 -b 256 : 48.442.368> -q 25 -b 128 : 24.655.992> -q 25 -b 256 : 25.859.820
I woke up, and can’t go to sleep again. I’ll kill some time explaining whythis doesn’t look strange to me.
Let’s do some math using a width of 704 pixels. I’m not sure whether the Buzactually use that number or not, but that’s not too important right now.
704x288 pixels, one field, is 202752 pixels. Divided by 64 pixels per block;3168 blocks per field. Each pixel consist of two bytes; 128 bytes per block;1024 bits per block. 100% in the new driver mean 1:2 compression; the maximumoutput becomes 512 bits per block. Actually 510, but 512 is simpler to usefor calculations.
Let’s say that we specify d1q50. We thus want 256 bits per block; times 3168becomes 811008 bits; 101376 bytes per field. We’re talking raw bits and byteshere, so we don’t need to do any fancy corrections for bits-per-pixel or suchthings. 101376 bytes per field.
d1 video contains two fields per frame. Those sum up to 202752 bytes perframe, and one of those frames goes into each buffer.
But wait a second! -b128 gives 128kB buffers! It’s not possible to cram202752 bytes of JPEG data into 128kB!
This is what the driver notice and automatically compensate for in yourexamples. Let’s do some math using this information:
128kB is 131072 bytes. In this buffer, we want to store two fields, whichleaves 65536 bytes for each field. Using 3168 blocks per field, we get20.68686868.. available bytes per block; 165 bits. We can’t allow therequest for 256 bits per block when there’s only 165 bits available! The -q50option is silently overridden, and the -b128 option takes precedence, leavingus with the equivalence of -q32.
This gives us a data rate of 165 bits per block, which, times 3168, sums upto 65340 bytes per field, out of the allowed 65536. The current driver hasanother level of rate limiting; it won’t accept -q values that fill more than6/8 of the specified buffers. (I’m not sure why. “Playing it safe” seem to bea safe bet. Personally, I think I would have lowered requested-bits-per-blockby one, or something like that.) We can’t use 165 bits per block, but have tolower it again, to 6/8 of the available buffer space: We end up with 124 bitsper block, the equivalence of -q24. With 128kB buffers, you can’t use greaterthan -q24 at -d1. (And PAL, and 704 pixels width..)
The third example is limited to -q24 through the same process. The secondexample, using very similar calculations, is limited to -q48. The onlyexample that actually grab at the specified -q value is the last one, whichis clearly visible, looking at the file size.–
Conclusion: the quality of the resulting movie depends on buffer size, quality,whether or not you use ‘low_bitrate=1’ as insmod option for the zr36060.cmodule to do 1:4 instead of 1:2 compression, etc.
If you experience timeouts, lowering the quality/buffersize or using‘low_bitrate=1 as insmod option for zr36060.o might actually help, as isproven by the Buz.
32.10. It hangs/crashes/fails/whatevers! Help!¶
Make sure that the card has its own interrupts (see /proc/interrupts), checkthe output of dmesg at high verbosity (load zr36067.o with debug=2,load all other modules with debug=1). Check that your mainboard is favorable(see question 2) and if not, test the card in another computer. Also see thenotes given in question 3 and try lowering quality/buffersize/capturesizeif recording fails after a period of time.
If all this doesn’t help, give a clear description of the problem includingdetailed hardware information (memory+brand, mainboard+chipset+brand, whichMJPEG card, processor, other PCI cards that might be of interest), give thesystem PnP information (/proc/interrupts, /proc/dma, /proc/devices), and givethe kernel version, driver version, glibc version, gcc version and any otherinformation that might possibly be of interest. Also provide the dmesg outputat high verbosity. See ‘Contacting’ on how to contact the developers.
32.11. Maintainers/Contacting¶
The driver is currently maintained by Laurent Pinchart and Ronald Bultje(<laurent.pinchart@skynet.be> and <rbultje@ronald.bitfreak.net>). For bugreports or questions, please contact the mailinglist instead of the developersindividually. For user questions (i.e. bug reports or how-to questions), sendan email to <mjpeg-users@lists.sf.net>, for developers (i.e. if you want tohelp programming), send an email to <mjpeg-developer@lists.sf.net>. Seehttp://www.sf.net/projects/mjpeg/ for subscription information.
For bug reports, be sure to include all the information as described inthe section ‘It hangs/crashes/fails/whatevers! Help!’. Please make sureyou’re using the latest version (http://mjpeg.sf.net/driver-zoran/).
Previous maintainers/developers of this driver include Serguei Miridonov<mirsev@cicese.mx>, Wolfgang Scherr <scherr@net4you.net>, Dave Perks<dperks@ibm.net> and Rainer Johanni <Rainer@Johanni.de>.
32.12. Driver’s License¶
Zoran Hdmi Tv Driver
This driver is distributed under the terms of the General Public License.
This program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.
This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.
See http://www.gnu.org/ for more information.