blob: c3a0f7bc2c7be3a03e411b676459f0cef80d231d [file] [log] [blame]
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -03001The Zoran driver
2================
3
4unified zoran driver (zr360x7, zoran, buz, dc10(+), dc30(+), lml33)
5
Linus Torvalds1da177e2005-04-16 15:20:36 -07006website: http://mjpeg.sourceforge.net/driver-zoran/
7
Linus Torvalds1da177e2005-04-16 15:20:36 -07008
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -03009Frequently Asked Questions
10--------------------------
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030012What cards are supported
13------------------------
Linus Torvalds1da177e2005-04-16 15:20:36 -070014
15Iomega Buz, Linux Media Labs LML33/LML33R10, Pinnacle/Miro
16DC10/DC10+/DC30/DC30+ and related boards (available under various names).
17
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030018Iomega Buz
19~~~~~~~~~~
20
Linus Torvalds1da177e2005-04-16 15:20:36 -070021* Zoran zr36067 PCI controller
22* Zoran zr36060 MJPEG codec
23* Philips saa7111 TV decoder
24* Philips saa7185 TV encoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030025
Linus Torvalds1da177e2005-04-16 15:20:36 -070026Drivers to use: videodev, i2c-core, i2c-algo-bit,
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030027videocodec, saa7111, saa7185, zr36060, zr36067
28
Linus Torvalds1da177e2005-04-16 15:20:36 -070029Inputs/outputs: Composite and S-video
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030030
Linus Torvalds1da177e2005-04-16 15:20:36 -070031Norms: PAL, SECAM (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps)
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030032
Linus Torvalds1da177e2005-04-16 15:20:36 -070033Card number: 7
34
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030035AverMedia 6 Eyes AVS6EYES
36~~~~~~~~~~~~~~~~~~~~~~~~~
37
Martin Samuelssonfbe60da2006-04-27 10:17:00 -030038* Zoran zr36067 PCI controller
39* Zoran zr36060 MJPEG codec
40* Samsung ks0127 TV decoder
41* Conexant bt866 TV encoder
Martin Samuelssonfbe60da2006-04-27 10:17:00 -030042
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030043Drivers to use: videodev, i2c-core, i2c-algo-bit,
44videocodec, ks0127, bt866, zr36060, zr36067
45
46Inputs/outputs:
47 Six physical inputs. 1-6 are composite,
48 1-2, 3-4, 5-6 doubles as S-video,
49 1-3 triples as component.
50 One composite output.
51
52Norms: PAL, SECAM (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps)
53
54Card number: 8
55
56.. note::
57
58 Not autodetected, card=8 is necessary.
59
60Linux Media Labs LML33
61~~~~~~~~~~~~~~~~~~~~~~
62
Linus Torvalds1da177e2005-04-16 15:20:36 -070063* Zoran zr36067 PCI controller
64* Zoran zr36060 MJPEG codec
65* Brooktree bt819 TV decoder
66* Brooktree bt856 TV encoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030067
Linus Torvalds1da177e2005-04-16 15:20:36 -070068Drivers to use: videodev, i2c-core, i2c-algo-bit,
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030069videocodec, bt819, bt856, zr36060, zr36067
70
Linus Torvalds1da177e2005-04-16 15:20:36 -070071Inputs/outputs: Composite and S-video
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030072
Linus Torvalds1da177e2005-04-16 15:20:36 -070073Norms: PAL (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps)
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030074
Linus Torvalds1da177e2005-04-16 15:20:36 -070075Card number: 5
76
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030077Linux Media Labs LML33R10
78~~~~~~~~~~~~~~~~~~~~~~~~~
79
Linus Torvalds1da177e2005-04-16 15:20:36 -070080* Zoran zr36067 PCI controller
81* Zoran zr36060 MJPEG codec
82* Philips saa7114 TV decoder
83* Analog Devices adv7170 TV encoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030084
Linus Torvalds1da177e2005-04-16 15:20:36 -070085Drivers to use: videodev, i2c-core, i2c-algo-bit,
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030086videocodec, saa7114, adv7170, zr36060, zr36067
87
Linus Torvalds1da177e2005-04-16 15:20:36 -070088Inputs/outputs: Composite and S-video
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030089
Linus Torvalds1da177e2005-04-16 15:20:36 -070090Norms: PAL (720x576 @ 25 fps), NTSC (720x480 @ 29.97 fps)
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030091
Linus Torvalds1da177e2005-04-16 15:20:36 -070092Card number: 6
93
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -030094Pinnacle/Miro DC10(new)
95~~~~~~~~~~~~~~~~~~~~~~~
96
Linus Torvalds1da177e2005-04-16 15:20:36 -070097* Zoran zr36057 PCI controller
98* Zoran zr36060 MJPEG codec
99* Philips saa7110a TV decoder
100* Analog Devices adv7176 TV encoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300101
Linus Torvalds1da177e2005-04-16 15:20:36 -0700102Drivers to use: videodev, i2c-core, i2c-algo-bit,
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300103videocodec, saa7110, adv7175, zr36060, zr36067
104
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105Inputs/outputs: Composite, S-video and Internal
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300106
Linus Torvalds1da177e2005-04-16 15:20:36 -0700107Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps)
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300108
Linus Torvalds1da177e2005-04-16 15:20:36 -0700109Card number: 1
110
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300111Pinnacle/Miro DC10+
112~~~~~~~~~~~~~~~~~~~
113
Linus Torvalds1da177e2005-04-16 15:20:36 -0700114* Zoran zr36067 PCI controller
115* Zoran zr36060 MJPEG codec
116* Philips saa7110a TV decoder
117* Analog Devices adv7176 TV encoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300118
Linus Torvalds1da177e2005-04-16 15:20:36 -0700119Drivers to use: videodev, i2c-core, i2c-algo-bit,
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300120videocodec, sa7110, adv7175, zr36060, zr36067
121
Linus Torvalds1da177e2005-04-16 15:20:36 -0700122Inputs/outputs: Composite, S-video and Internal
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300123
Linus Torvalds1da177e2005-04-16 15:20:36 -0700124Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps)
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300125
Linus Torvalds1da177e2005-04-16 15:20:36 -0700126Card number: 2
127
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300128Pinnacle/Miro DC10(old)
129~~~~~~~~~~~~~~~~~~~~~~~
130
Linus Torvalds1da177e2005-04-16 15:20:36 -0700131* Zoran zr36057 PCI controller
132* Zoran zr36050 MJPEG codec
133* Zoran zr36016 Video Front End or Fuji md0211 Video Front End (clone?)
134* Micronas vpx3220a TV decoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300135* mse3000 TV encoder or Analog Devices adv7176 TV encoder
136
Linus Torvalds1da177e2005-04-16 15:20:36 -0700137Drivers to use: videodev, i2c-core, i2c-algo-bit,
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300138videocodec, vpx3220, mse3000/adv7175, zr36050, zr36016, zr36067
139
Linus Torvalds1da177e2005-04-16 15:20:36 -0700140Inputs/outputs: Composite, S-video and Internal
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300141
Linus Torvalds1da177e2005-04-16 15:20:36 -0700142Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps)
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300143
Linus Torvalds1da177e2005-04-16 15:20:36 -0700144Card number: 0
145
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300146Pinnacle/Miro DC30
147~~~~~~~~~~~~~~~~~~
148
Linus Torvalds1da177e2005-04-16 15:20:36 -0700149* Zoran zr36057 PCI controller
150* Zoran zr36050 MJPEG codec
151* Zoran zr36016 Video Front End
152* Micronas vpx3225d/vpx3220a/vpx3216b TV decoder
153* Analog Devices adv7176 TV encoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300154
Linus Torvalds1da177e2005-04-16 15:20:36 -0700155Drivers to use: videodev, i2c-core, i2c-algo-bit,
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300156videocodec, vpx3220/vpx3224, adv7175, zr36050, zr36016, zr36067
157
Linus Torvalds1da177e2005-04-16 15:20:36 -0700158Inputs/outputs: Composite, S-video and Internal
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300159
Linus Torvalds1da177e2005-04-16 15:20:36 -0700160Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps)
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300161
Linus Torvalds1da177e2005-04-16 15:20:36 -0700162Card number: 3
163
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300164Pinnacle/Miro DC30+
165~~~~~~~~~~~~~~~~~~~
166
Linus Torvalds1da177e2005-04-16 15:20:36 -0700167* Zoran zr36067 PCI controller
168* Zoran zr36050 MJPEG codec
169* Zoran zr36016 Video Front End
170* Micronas vpx3225d/vpx3220a/vpx3216b TV decoder
171* Analog Devices adv7176 TV encoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300172
Linus Torvalds1da177e2005-04-16 15:20:36 -0700173Drivers to use: videodev, i2c-core, i2c-algo-bit,
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300174videocodec, vpx3220/vpx3224, adv7175, zr36050, zr36015, zr36067
175
Linus Torvalds1da177e2005-04-16 15:20:36 -0700176Inputs/outputs: Composite, S-video and Internal
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300177
Linus Torvalds1da177e2005-04-16 15:20:36 -0700178Norms: PAL, SECAM (768x576 @ 25 fps), NTSC (640x480 @ 29.97 fps)
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300179
Linus Torvalds1da177e2005-04-16 15:20:36 -0700180Card number: 4
181
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300182.. note::
Linus Torvalds1da177e2005-04-16 15:20:36 -0700183
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300184 #) No module for the mse3000 is available yet
185 #) No module for the vpx3224 is available yet
Linus Torvalds1da177e2005-04-16 15:20:36 -0700186
1871.1 What the TV decoder can do an what not
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300188------------------------------------------
Linus Torvalds1da177e2005-04-16 15:20:36 -0700189
190The best know TV standards are NTSC/PAL/SECAM. but for decoding a frame that
191information is not enough. There are several formats of the TV standards.
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300192And not every TV decoder is able to handle every format. Also the every
193combination is supported by the driver. There are currently 11 different
194tv broadcast formats all aver the world.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700195
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300196The CCIR defines parameters needed for broadcasting the signal.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700197The CCIR has defined different standards: A,B,D,E,F,G,D,H,I,K,K1,L,M,N,...
Paolo Ornati670e9f32006-10-03 22:57:56 +0200198The CCIR says not much about the colorsystem used !!!
Linus Torvalds1da177e2005-04-16 15:20:36 -0700199And talking about a colorsystem says not to much about how it is broadcast.
200
201The CCIR standards A,E,F are not used any more.
202
203When you speak about NTSC, you usually mean the standard: CCIR - M using
204the NTSC colorsystem which is used in the USA, Japan, Mexico, Canada
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300205and a few others.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700206
207When you talk about PAL, you usually mean: CCIR - B/G using the PAL
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300208colorsystem which is used in many Countries.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700209
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300210When you talk about SECAM, you mean: CCIR - L using the SECAM Colorsystem
Linus Torvalds1da177e2005-04-16 15:20:36 -0700211which is used in France, and a few others.
212
213There the other version of SECAM, CCIR - D/K is used in Bulgaria, China,
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300214Slovakai, Hungary, Korea (Rep.), Poland, Rumania and a others.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700215
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300216The CCIR - H uses the PAL colorsystem (sometimes SECAM) and is used in
Linus Torvalds1da177e2005-04-16 15:20:36 -0700217Egypt, Libya, Sri Lanka, Syrain Arab. Rep.
218
219The CCIR - I uses the PAL colorsystem, and is used in Great Britain, Hong Kong,
220Ireland, Nigeria, South Africa.
221
222The CCIR - N uses the PAL colorsystem and PAL frame size but the NTSC framerate,
223and is used in Argentinia, Uruguay, an a few others
224
225We do not talk about how the audio is broadcast !
226
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300227A rather good sites about the TV standards are:
Justin P. Mattock0ea6e612010-07-23 20:51:24 -0700228http://www.sony.jp/support/
Linus Torvalds1da177e2005-04-16 15:20:36 -0700229http://info.electronicwerkstatt.de/bereiche/fernsehtechnik/frequenzen_und_normen/Fernsehnormen/
230and http://www.cabl.com/restaurant/channel.html
231
232Other weird things around: NTSC 4.43 is a modificated NTSC, which is mainly
233used in PAL VCR's that are able to play back NTSC. PAL 60 seems to be the same
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300234as NTSC 4.43 . The Datasheets also talk about NTSC 44, It seems as if it would
235be the same as NTSC 4.43.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700236NTSC Combs seems to be a decoder mode where the decoder uses a comb filter
237to split coma and luma instead of a Delay line.
238
239But I did not defiantly find out what NTSC Comb is.
240
241Philips saa7111 TV decoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300242~~~~~~~~~~~~~~~~~~~~~~~~~~
243
244- was introduced in 1997, is used in the BUZ and
245- can handle: PAL B/G/H/I, PAL N, PAL M, NTSC M, NTSC N, NTSC 4.43 and SECAM
Linus Torvalds1da177e2005-04-16 15:20:36 -0700246
247Philips saa7110a TV decoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300248~~~~~~~~~~~~~~~~~~~~~~~~~~~
249
250- was introduced in 1995, is used in the Pinnacle/Miro DC10(new), DC10+ and
251- can handle: PAL B/G, NTSC M and SECAM
Linus Torvalds1da177e2005-04-16 15:20:36 -0700252
253Philips saa7114 TV decoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300254~~~~~~~~~~~~~~~~~~~~~~~~~~
255
256- was introduced in 2000, is used in the LML33R10 and
257- can handle: PAL B/G/D/H/I/N, PAL N, PAL M, NTSC M, NTSC 4.43 and SECAM
Linus Torvalds1da177e2005-04-16 15:20:36 -0700258
259Brooktree bt819 TV decoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300260~~~~~~~~~~~~~~~~~~~~~~~~~~
261
262- was introduced in 1996, and is used in the LML33 and
263- can handle: PAL B/D/G/H/I, NTSC M
Linus Torvalds1da177e2005-04-16 15:20:36 -0700264
265Micronas vpx3220a TV decoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300266~~~~~~~~~~~~~~~~~~~~~~~~~~~~
267
268- was introduced in 1996, is used in the DC30 and DC30+ and
269- can handle: PAL B/G/H/I, PAL N, PAL M, NTSC M, NTSC 44, PAL 60, SECAM,NTSC Comb
Linus Torvalds1da177e2005-04-16 15:20:36 -0700270
Martin Samuelssonfbe60da2006-04-27 10:17:00 -0300271Samsung ks0127 TV decoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300272~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Samuelssonfbe60da2006-04-27 10:17:00 -0300273
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300274- is used in the AVS6EYES card and
275- can handle: NTSC-M/N/44, PAL-M/N/B/G/H/I/D/K/L and SECAM
Linus Torvalds1da177e2005-04-16 15:20:36 -0700276
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300277
278What the TV encoder can do an what not
279--------------------------------------
Linus Torvalds1da177e2005-04-16 15:20:36 -0700280
281The TV encoder are doing the "same" as the decoder, but in the oder direction.
282You feed them digital data and the generate a Composite or SVHS signal.
283For information about the colorsystems and TV norm take a look in the
284TV decoder section.
285
286Philips saa7185 TV Encoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300287~~~~~~~~~~~~~~~~~~~~~~~~~~
288
289- was introduced in 1996, is used in the BUZ
290- can generate: PAL B/G, NTSC M
Linus Torvalds1da177e2005-04-16 15:20:36 -0700291
292Brooktree bt856 TV Encoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300293~~~~~~~~~~~~~~~~~~~~~~~~~~
294
295- was introduced in 1994, is used in the LML33
296- can generate: PAL B/D/G/H/I/N, PAL M, NTSC M, PAL-N (Argentina)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700297
298Analog Devices adv7170 TV Encoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300299~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
300
301- was introduced in 2000, is used in the LML300R10
302- can generate: PAL B/D/G/H/I/N, PAL M, NTSC M, PAL 60
Linus Torvalds1da177e2005-04-16 15:20:36 -0700303
304Analog Devices adv7175 TV Encoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300305~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
306
307- was introduced in 1996, is used in the DC10, DC10+, DC10 old, DC30, DC30+
308- can generate: PAL B/D/G/H/I/N, PAL M, NTSC M
Linus Torvalds1da177e2005-04-16 15:20:36 -0700309
310ITT mse3000 TV encoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300311~~~~~~~~~~~~~~~~~~~~~~
312
313- was introduced in 1991, is used in the DC10 old
314- can generate: PAL , NTSC , SECAM
Linus Torvalds1da177e2005-04-16 15:20:36 -0700315
Martin Samuelssonfbe60da2006-04-27 10:17:00 -0300316Conexant bt866 TV encoder
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300317~~~~~~~~~~~~~~~~~~~~~~~~~
318
319- is used in AVS6EYES, and
320- can generate: NTSC/PAL, PAL­M, PAL­N
Martin Samuelssonfbe60da2006-04-27 10:17:00 -0300321
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300322The adv717x, should be able to produce PAL N. But you find nothing PAL N
Tobias Klauserd533f672005-09-10 00:26:46 -0700323specific in the registers. Seem that you have to reuse a other standard
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300324to generate PAL N, maybe it would work if you use the PAL M settings.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700325
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300326How do I get this damn thing to work
327------------------------------------
Linus Torvalds1da177e2005-04-16 15:20:36 -0700328
329Load zr36067.o. If it can't autodetect your card, use the card=X insmod
330option with X being the card number as given in the previous section.
331To have more than one card, use card=X1[,X2[,X3,[X4[..]]]]
332
Lucas De Marchi970e2482012-03-30 13:37:16 -0700333To automate this, add the following to your /etc/modprobe.d/zoran.conf:
Linus Torvalds1da177e2005-04-16 15:20:36 -0700334
335options zr36067 card=X1[,X2[,X3[,X4[..]]]]
336alias char-major-81-0 zr36067
337
338One thing to keep in mind is that this doesn't load zr36067.o itself yet. It
339just automates loading. If you start using xawtv, the device won't load on
340some systems, since you're trying to load modules as a user, which is not
341allowed ("permission denied"). A quick workaround is to add 'Load "v4l"' to
342XF86Config-4 when you use X by default, or to run 'v4l-conf -c <device>' in
343one of your startup scripts (normally rc.local) if you don't use X. Both
344make sure that the modules are loaded on startup, under the root account.
345
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300346What mainboard should I use (or why doesn't my card work)
347---------------------------------------------------------
Linus Torvalds1da177e2005-04-16 15:20:36 -0700348
Linus Torvalds1da177e2005-04-16 15:20:36 -0700349
350<insert lousy disclaimer here>. In short: good=SiS/Intel, bad=VIA.
351
352Experience tells us that people with a Buz, on average, have more problems
353than users with a DC10+/LML33. Also, it tells us that people owning a VIA-
354based mainboard (ktXXX, MVP3) have more problems than users with a mainboard
355based on a different chipset. Here's some notes from Andrew Stevens:
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300356
Linus Torvalds1da177e2005-04-16 15:20:36 -0700357Here's my experience of using LML33 and Buz on various motherboards:
358
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300359- VIA MVP3
360 - Forget it. Pointless. Doesn't work.
361- Intel 430FX (Pentium 200)
362 - LML33 perfect, Buz tolerable (3 or 4 frames dropped per movie)
363- Intel 440BX (early stepping)
364 - LML33 tolerable. Buz starting to get annoying (6-10 frames/hour)
365- Intel 440BX (late stepping)
366 - Buz tolerable, LML3 almost perfect (occasional single frame drops)
367- SiS735
368 - LML33 perfect, Buz tolerable.
369- VIA KT133(*)
370 - LML33 starting to get annoying, Buz poor enough that I have up.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700371
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300372- Both 440BX boards were dual CPU versions.
373
Linus Torvalds1da177e2005-04-16 15:20:36 -0700374Bernhard Praschinger later added:
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300375
376- AMD 751
377 - Buz perfect-tolerable
378- AMD 760
379 - Buz perfect-tolerable
380
Linus Torvalds1da177e2005-04-16 15:20:36 -0700381In general, people on the user mailinglist won't give you much of a chance
382if you have a VIA-based motherboard. They may be cheap, but sometimes, you'd
383rather want to spend some more money on better boards. In general, VIA
384mainboard's IDE/PCI performance will also suck badly compared to others.
385You'll noticed the DC10+/DC30+ aren't mentioned anywhere in the overview.
386Basically, you can assume that if the Buz works, the LML33 will work too. If
387the LML33 works, the DC10+/DC30+ will work too. They're most tolerant to
388different mainboard chipsets from all of the supported cards.
389
390If you experience timeouts during capture, buy a better mainboard or lower
391the quality/buffersize during capture (see 'Concerning buffer sizes, quality,
392output size etc.'). If it hangs, there's little we can do as of now. Check
393your IRQs and make sure the card has its own interrupts.
394
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300395Programming interface
396---------------------
Linus Torvalds1da177e2005-04-16 15:20:36 -0700397
Hans Verkuilad1ecf82010-12-25 06:58:01 -0300398This driver conforms to video4linux2. Support for V4L1 and for the custom
399zoran ioctls has been removed in kernel 2.6.38.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700400
401For programming example, please, look at lavrec.c and lavplay.c code in
Hans Verkuilad1ecf82010-12-25 06:58:01 -0300402the MJPEG-tools (http://mjpeg.sf.net/).
Linus Torvalds1da177e2005-04-16 15:20:36 -0700403
404Additional notes for software developers:
405
406 The driver returns maxwidth and maxheight parameters according to
407 the current TV standard (norm). Therefore, the software which
408 communicates with the driver and "asks" for these parameters should
409 first set the correct norm. Well, it seems logically correct: TV
410 standard is "more constant" for current country than geometry
411 settings of a variety of TV capture cards which may work in ITU or
Jean Delvare4dbf46a2009-03-10 23:28:17 -0300412 square pixel format.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700413
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300414Applications
415------------
Linus Torvalds1da177e2005-04-16 15:20:36 -0700416
417Applications known to work with this driver:
418
419TV viewing:
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300420
Linus Torvalds1da177e2005-04-16 15:20:36 -0700421* xawtv
422* kwintv
423* probably any TV application that supports video4linux or video4linux2.
424
425MJPEG capture/playback:
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300426
Linus Torvalds1da177e2005-04-16 15:20:36 -0700427* mjpegtools/lavtools (or Linux Video Studio)
428* gstreamer
429* mplayer
430
431General raw capture:
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300432
Linus Torvalds1da177e2005-04-16 15:20:36 -0700433* xawtv
434* gstreamer
435* probably any application that supports video4linux or video4linux2
436
437Video editing:
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300438
Linus Torvalds1da177e2005-04-16 15:20:36 -0700439* Cinelerra
440* MainActor
441* mjpegtools (or Linux Video Studio)
442
Linus Torvalds1da177e2005-04-16 15:20:36 -0700443
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300444Concerning buffer sizes, quality, output size etc.
445--------------------------------------------------
446
Linus Torvalds1da177e2005-04-16 15:20:36 -0700447
448The zr36060 can do 1:2 JPEG compression. This is really the theoretical
449maximum that the chipset can reach. The driver can, however, limit compression
450to a maximum (size) of 1:4. The reason for this is that some cards (e.g. Buz)
451can't handle 1:2 compression without stopping capture after only a few minutes.
452With 1:4, it'll mostly work. If you have a Buz, use 'low_bitrate=1' to go into
4531:4 max. compression mode.
454
455100% JPEG quality is thus 1:2 compression in practice. So for a full PAL frame
456(size 720x576). The JPEG fields are stored in YUY2 format, so the size of the
457fields are 720x288x16/2 bits/field (2 fields/frame) = 207360 bytes/field x 2 =
458414720 bytes/frame (add some more bytes for headers and DHT (huffman)/DQT
459(quantization) tables, and you'll get to something like 512kB per frame for
4601:2 compression. For 1:4 compression, you'd have frames of half this size.
461
462Some additional explanation by Martin Samuelsson, which also explains the
463importance of buffer sizes:
464--
465> Hmm, I do not think it is really that way. With the current (downloaded
466> at 18:00 Monday) driver I get that output sizes for 10 sec:
467> -q 50 -b 128 : 24.283.332 Bytes
468> -q 50 -b 256 : 48.442.368
469> -q 25 -b 128 : 24.655.992
470> -q 25 -b 256 : 25.859.820
471
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300472I woke up, and can't go to sleep again. I'll kill some time explaining why
Linus Torvalds1da177e2005-04-16 15:20:36 -0700473this doesn't look strange to me.
474
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300475Let's do some math using a width of 704 pixels. I'm not sure whether the Buz
Linus Torvalds1da177e2005-04-16 15:20:36 -0700476actually use that number or not, but that's not too important right now.
477
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300478704x288 pixels, one field, is 202752 pixels. Divided by 64 pixels per block;
4793168 blocks per field. Each pixel consist of two bytes; 128 bytes per block;
4801024 bits per block. 100% in the new driver mean 1:2 compression; the maximum
481output becomes 512 bits per block. Actually 510, but 512 is simpler to use
Linus Torvalds1da177e2005-04-16 15:20:36 -0700482for calculations.
483
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300484Let's say that we specify d1q50. We thus want 256 bits per block; times 3168
485becomes 811008 bits; 101376 bytes per field. We're talking raw bits and bytes
486here, so we don't need to do any fancy corrections for bits-per-pixel or such
Linus Torvalds1da177e2005-04-16 15:20:36 -0700487things. 101376 bytes per field.
488
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300489d1 video contains two fields per frame. Those sum up to 202752 bytes per
Linus Torvalds1da177e2005-04-16 15:20:36 -0700490frame, and one of those frames goes into each buffer.
491
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300492But wait a second! -b128 gives 128kB buffers! It's not possible to cram
Linus Torvalds1da177e2005-04-16 15:20:36 -0700493202752 bytes of JPEG data into 128kB!
494
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300495This is what the driver notice and automatically compensate for in your
Linus Torvalds1da177e2005-04-16 15:20:36 -0700496examples. Let's do some math using this information:
497
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300498128kB is 131072 bytes. In this buffer, we want to store two fields, which
499leaves 65536 bytes for each field. Using 3168 blocks per field, we get
50020.68686868... available bytes per block; 165 bits. We can't allow the
501request for 256 bits per block when there's only 165 bits available! The -q50
502option is silently overridden, and the -b128 option takes precedence, leaving
Linus Torvalds1da177e2005-04-16 15:20:36 -0700503us with the equivalence of -q32.
504
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300505This gives us a data rate of 165 bits per block, which, times 3168, sums up
506to 65340 bytes per field, out of the allowed 65536. The current driver has
507another level of rate limiting; it won't accept -q values that fill more than
5086/8 of the specified buffers. (I'm not sure why. "Playing it safe" seem to be
509a safe bet. Personally, I think I would have lowered requested-bits-per-block
510by one, or something like that.) We can't use 165 bits per block, but have to
511lower it again, to 6/8 of the available buffer space: We end up with 124 bits
512per block, the equivalence of -q24. With 128kB buffers, you can't use greater
Linus Torvalds1da177e2005-04-16 15:20:36 -0700513than -q24 at -d1. (And PAL, and 704 pixels width...)
514
Mauro Carvalho Chehab48773e62006-03-25 09:21:43 -0300515The third example is limited to -q24 through the same process. The second
516example, using very similar calculations, is limited to -q48. The only
517example that actually grab at the specified -q value is the last one, which
Linus Torvalds1da177e2005-04-16 15:20:36 -0700518is clearly visible, looking at the file size.
519--
520
521Conclusion: the quality of the resulting movie depends on buffer size, quality,
522whether or not you use 'low_bitrate=1' as insmod option for the zr36060.c
523module to do 1:4 instead of 1:2 compression, etc.
524
525If you experience timeouts, lowering the quality/buffersize or using
526'low_bitrate=1 as insmod option for zr36060.o might actually help, as is
527proven by the Buz.
528
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300529It hangs/crashes/fails/whatevers! Help!
530---------------------------------------
Linus Torvalds1da177e2005-04-16 15:20:36 -0700531
532Make sure that the card has its own interrupts (see /proc/interrupts), check
533the output of dmesg at high verbosity (load zr36067.o with debug=2,
534load all other modules with debug=1). Check that your mainboard is favorable
535(see question 2) and if not, test the card in another computer. Also see the
536notes given in question 3 and try lowering quality/buffersize/capturesize
537if recording fails after a period of time.
538
539If all this doesn't help, give a clear description of the problem including
540detailed hardware information (memory+brand, mainboard+chipset+brand, which
541MJPEG card, processor, other PCI cards that might be of interest), give the
542system PnP information (/proc/interrupts, /proc/dma, /proc/devices), and give
543the kernel version, driver version, glibc version, gcc version and any other
544information that might possibly be of interest. Also provide the dmesg output
545at high verbosity. See 'Contacting' on how to contact the developers.
546
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300547Maintainers/Contacting
548----------------------
Linus Torvalds1da177e2005-04-16 15:20:36 -0700549
550The driver is currently maintained by Laurent Pinchart and Ronald Bultje
551(<laurent.pinchart@skynet.be> and <rbultje@ronald.bitfreak.net>). For bug
552reports or questions, please contact the mailinglist instead of the developers
553individually. For user questions (i.e. bug reports or how-to questions), send
554an email to <mjpeg-users@lists.sf.net>, for developers (i.e. if you want to
555help programming), send an email to <mjpeg-developer@lists.sf.net>. See
556http://www.sf.net/projects/mjpeg/ for subscription information.
557
558For bug reports, be sure to include all the information as described in
559the section 'It hangs/crashes/fails/whatevers! Help!'. Please make sure
560you're using the latest version (http://mjpeg.sf.net/driver-zoran/).
561
562Previous maintainers/developers of this driver include Serguei Miridonov
563<mirsev@cicese.mx>, Wolfgang Scherr <scherr@net4you.net>, Dave Perks
564<dperks@ibm.net> and Rainer Johanni <Rainer@Johanni.de>.
565
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300566Driver's License
567----------------
Linus Torvalds1da177e2005-04-16 15:20:36 -0700568
Mauro Carvalho Chehab7200e682016-07-17 21:29:09 -0300569 This driver is distributed under the terms of the General Public License.
Linus Torvalds1da177e2005-04-16 15:20:36 -0700570
571 This program is free software; you can redistribute it and/or modify
572 it under the terms of the GNU General Public License as published by
573 the Free Software Foundation; either version 2 of the License, or
574 (at your option) any later version.
575
576 This program is distributed in the hope that it will be useful,
577 but WITHOUT ANY WARRANTY; without even the implied warranty of
578 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
579 GNU General Public License for more details.
580
Linus Torvalds1da177e2005-04-16 15:20:36 -0700581See http://www.gnu.org/ for more information.