diff options
Diffstat (limited to 'Documentation/video4linux')
-rw-r--r-- | Documentation/video4linux/CARDLIST.bttv | 2 | ||||
-rw-r--r-- | Documentation/video4linux/CARDLIST.saa7134 | 3 | ||||
-rw-r--r-- | Documentation/video4linux/CQcam.txt | 6 | ||||
-rw-r--r-- | Documentation/video4linux/Zoran | 4 | ||||
-rw-r--r-- | Documentation/video4linux/cx2341x/fw-decoder-api.txt | 58 | ||||
-rw-r--r-- | Documentation/video4linux/cx2341x/fw-decoder-regs.txt | 815 | ||||
-rw-r--r-- | Documentation/video4linux/cx2341x/fw-dma.txt | 16 | ||||
-rw-r--r-- | Documentation/video4linux/cx2341x/fw-encoder-api.txt | 52 | ||||
-rw-r--r-- | Documentation/video4linux/cx2341x/fw-memory.txt | 10 | ||||
-rw-r--r-- | Documentation/video4linux/et61x251.txt | 7 | ||||
-rw-r--r-- | Documentation/video4linux/sn9c102.txt | 246 | ||||
-rw-r--r-- | Documentation/video4linux/zc0301.txt | 10 |
12 files changed, 1048 insertions, 181 deletions
diff --git a/Documentation/video4linux/CARDLIST.bttv b/Documentation/video4linux/CARDLIST.bttv index 4efa4645885f..fc2fe9bc6713 100644 --- a/Documentation/video4linux/CARDLIST.bttv +++ b/Documentation/video4linux/CARDLIST.bttv | |||
@@ -126,7 +126,7 @@ | |||
126 | 125 -> MATRIX Vision Sigma-SQ | 126 | 125 -> MATRIX Vision Sigma-SQ |
127 | 126 -> MATRIX Vision Sigma-SLC | 127 | 126 -> MATRIX Vision Sigma-SLC |
128 | 127 -> APAC Viewcomp 878(AMAX) | 128 | 127 -> APAC Viewcomp 878(AMAX) |
129 | 128 -> DViCO FusionHDTV DVB-T Lite [18ac:db10] | 129 | 128 -> DViCO FusionHDTV DVB-T Lite [18ac:db10,18ac:db11] |
130 | 129 -> V-Gear MyVCD | 130 | 129 -> V-Gear MyVCD |
131 | 130 -> Super TV Tuner | 131 | 130 -> Super TV Tuner |
132 | 131 -> Tibet Systems 'Progress DVR' CS16 | 132 | 131 -> Tibet Systems 'Progress DVR' CS16 |
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134 index f6201cc37ec5..a12246a9bf23 100644 --- a/Documentation/video4linux/CARDLIST.saa7134 +++ b/Documentation/video4linux/CARDLIST.saa7134 | |||
@@ -104,3 +104,6 @@ | |||
104 | 103 -> Compro Videomate DVB-T200A | 104 | 103 -> Compro Videomate DVB-T200A |
105 | 104 -> Hauppauge WinTV-HVR1110 DVB-T/Hybrid [0070:6701] | 105 | 104 -> Hauppauge WinTV-HVR1110 DVB-T/Hybrid [0070:6701] |
106 | 105 -> Terratec Cinergy HT PCMCIA [153b:1172] | 106 | 105 -> Terratec Cinergy HT PCMCIA [153b:1172] |
107 | 106 -> Encore ENLTV [1131:2342,1131:2341,3016:2344] | ||
108 | 107 -> Encore ENLTV-FM [1131:230f] | ||
109 | 108 -> Terratec Cinergy HT PCI [153b:1175] | ||
diff --git a/Documentation/video4linux/CQcam.txt b/Documentation/video4linux/CQcam.txt index ade8651e2443..04986efb731c 100644 --- a/Documentation/video4linux/CQcam.txt +++ b/Documentation/video4linux/CQcam.txt | |||
@@ -197,10 +197,10 @@ Use the ../../Maintainers file, particularly the VIDEO FOR LINUX and PARALLEL | |||
197 | PORT SUPPORT sections | 197 | PORT SUPPORT sections |
198 | 198 | ||
199 | The video4linux page: | 199 | The video4linux page: |
200 | http://roadrunner.swansea.linux.org.uk/v4l.shtml | 200 | http://linuxtv.org |
201 | 201 | ||
202 | The video4linux2 page: | 202 | The V4L2 API spec: |
203 | http://millennium.diads.com/bdirks/v4l2.htm | 203 | http://v4l2spec.bytesex.org/ |
204 | 204 | ||
205 | Some web pages about the quickcams: | 205 | Some web pages about the quickcams: |
206 | http://www.dkfz-heidelberg.de/Macromol/wedemann/mini-HOWTO-cqcam.html | 206 | http://www.dkfz-heidelberg.de/Macromol/wedemann/mini-HOWTO-cqcam.html |
diff --git a/Documentation/video4linux/Zoran b/Documentation/video4linux/Zoran index deb218f77adb..85c575ac4fb9 100644 --- a/Documentation/video4linux/Zoran +++ b/Documentation/video4linux/Zoran | |||
@@ -339,9 +339,9 @@ Information - video4linux/mjpeg extensions: | |||
339 | (also see below) | 339 | (also see below) |
340 | 340 | ||
341 | Information - video4linux2: | 341 | Information - video4linux2: |
342 | http://www.thedirks.org/v4l2/ | 342 | http://linuxtv.org |
343 | http://v4l2spec.bytesex.org/ | ||
343 | /usr/include/linux/videodev2.h | 344 | /usr/include/linux/videodev2.h |
344 | http://www.bytesex.org/v4l/ | ||
345 | 345 | ||
346 | More information on the video4linux/mjpeg extensions, by Serguei | 346 | More information on the video4linux/mjpeg extensions, by Serguei |
347 | Miridonovi and Rainer Johanni: | 347 | Miridonovi and Rainer Johanni: |
diff --git a/Documentation/video4linux/cx2341x/fw-decoder-api.txt b/Documentation/video4linux/cx2341x/fw-decoder-api.txt index 78bf5f21e513..8c317b7a4fc9 100644 --- a/Documentation/video4linux/cx2341x/fw-decoder-api.txt +++ b/Documentation/video4linux/cx2341x/fw-decoder-api.txt | |||
@@ -21,7 +21,7 @@ Param[0] | |||
21 | 0 based frame number in GOP to begin playback from. | 21 | 0 based frame number in GOP to begin playback from. |
22 | Param[1] | 22 | Param[1] |
23 | Specifies the number of muted audio frames to play before normal | 23 | Specifies the number of muted audio frames to play before normal |
24 | audio resumes. | 24 | audio resumes. (This is not implemented in the firmware, leave at 0) |
25 | 25 | ||
26 | ------------------------------------------------------------------------------- | 26 | ------------------------------------------------------------------------------- |
27 | 27 | ||
@@ -32,6 +32,10 @@ Description | |||
32 | playback stops at specified PTS. | 32 | playback stops at specified PTS. |
33 | Param[0] | 33 | Param[0] |
34 | Display 0=last frame, 1=black | 34 | Display 0=last frame, 1=black |
35 | Note: this takes effect immediately, so if you want to wait for a PTS, | ||
36 | then use '0', otherwise the screen goes to black at once. | ||
37 | You can call this later (even if there is no playback) with a 1 value | ||
38 | to set the screen to black. | ||
35 | Param[1] | 39 | Param[1] |
36 | PTS low | 40 | PTS low |
37 | Param[2] | 41 | Param[2] |
@@ -60,8 +64,12 @@ Param[0] | |||
60 | 31 Speed: | 64 | 31 Speed: |
61 | '0' slow | 65 | '0' slow |
62 | '1' fast | 66 | '1' fast |
67 | Note: n is limited to 2. Anything higher does not result in | ||
68 | faster playback. Instead the host should start dropping frames. | ||
63 | Param[1] | 69 | Param[1] |
64 | Direction: 0=forward, 1=reverse | 70 | Direction: 0=forward, 1=reverse |
71 | Note: to make reverse playback work you have to write full GOPs in | ||
72 | reverse order. | ||
65 | Param[2] | 73 | Param[2] |
66 | Picture mask: | 74 | Picture mask: |
67 | 1=I frames | 75 | 1=I frames |
@@ -69,13 +77,16 @@ Param[2] | |||
69 | 7=I, P, B frames | 77 | 7=I, P, B frames |
70 | Param[3] | 78 | Param[3] |
71 | B frames per GOP (for reverse play only) | 79 | B frames per GOP (for reverse play only) |
80 | Note: for reverse playback the Picture Mask should be set to I or I, P. | ||
81 | Adding B frames to the mask will result in corrupt video. This field | ||
82 | has to be set to the correct value in order to keep the timing correct. | ||
72 | Param[4] | 83 | Param[4] |
73 | Mute audio: 0=disable, 1=enable | 84 | Mute audio: 0=disable, 1=enable |
74 | Param[5] | 85 | Param[5] |
75 | Display 0=frame, 1=field | 86 | Display 0=frame, 1=field |
76 | Param[6] | 87 | Param[6] |
77 | Specifies the number of muted audio frames to play before normal audio | 88 | Specifies the number of muted audio frames to play before normal audio |
78 | resumes. | 89 | resumes. (Not implemented in the firmware, leave at 0) |
79 | 90 | ||
80 | ------------------------------------------------------------------------------- | 91 | ------------------------------------------------------------------------------- |
81 | 92 | ||
@@ -212,6 +223,7 @@ Description | |||
212 | Select audio mode | 223 | Select audio mode |
213 | Param[0] | 224 | Param[0] |
214 | Dual mono mode action | 225 | Dual mono mode action |
226 | 0=Stereo, 1=Left, 2=Right, 3=Mono, 4=Swap, -1=Unchanged | ||
215 | Param[1] | 227 | Param[1] |
216 | Stereo mode action: | 228 | Stereo mode action: |
217 | 0=Stereo, 1=Left, 2=Right, 3=Mono, 4=Swap, -1=Unchanged | 229 | 0=Stereo, 1=Left, 2=Right, 3=Mono, 4=Swap, -1=Unchanged |
@@ -224,7 +236,10 @@ Description | |||
224 | Setup firmware to notify the host about a particular event. | 236 | Setup firmware to notify the host about a particular event. |
225 | Counterpart to API 0xD5 | 237 | Counterpart to API 0xD5 |
226 | Param[0] | 238 | Param[0] |
227 | Event: 0=Audio mode change between stereo and dual channel | 239 | Event: 0=Audio mode change between mono, (joint) stereo and dual channel. |
240 | Event: 3=Decoder started | ||
241 | Event: 4=Unknown: goes off 10-15 times per second while decoding. | ||
242 | Event: 5=Some sync event: goes off once per frame. | ||
228 | Param[1] | 243 | Param[1] |
229 | Notification 0=disabled, 1=enabled | 244 | Notification 0=disabled, 1=enabled |
230 | Param[2] | 245 | Param[2] |
@@ -273,43 +288,6 @@ Param[3] | |||
273 | 288 | ||
274 | ------------------------------------------------------------------------------- | 289 | ------------------------------------------------------------------------------- |
275 | 290 | ||
276 | Name CX2341X_DEC_SET_AUDIO_OUTPUT | ||
277 | Enum 27/0x1B | ||
278 | Description | ||
279 | Select audio output format | ||
280 | Param[0] | ||
281 | Bitmask: | ||
282 | 0:1 Data size: | ||
283 | '00' 16 bit | ||
284 | '01' 20 bit | ||
285 | '10' 24 bit | ||
286 | 2:7 Unused | ||
287 | 8:9 Mode: | ||
288 | '00' 2 channels | ||
289 | '01' 4 channels | ||
290 | '10' 6 channels | ||
291 | '11' 6 channels with one line data mode | ||
292 | (for left justified MSB first mode, 20 bit only) | ||
293 | 10:11 Unused | ||
294 | 12:13 Channel format: | ||
295 | '00' right justified MSB first mode | ||
296 | '01' left justified MSB first mode | ||
297 | '10' I2S mode | ||
298 | 14:15 Unused | ||
299 | 16:21 Right justify bit count | ||
300 | 22:31 Unused | ||
301 | |||
302 | ------------------------------------------------------------------------------- | ||
303 | |||
304 | Name CX2341X_DEC_SET_AV_DELAY | ||
305 | Enum 28/0x1C | ||
306 | Description | ||
307 | Set audio/video delay in 90Khz ticks | ||
308 | Param[0] | ||
309 | 0=A/V in sync, negative=audio lags, positive=video lags | ||
310 | |||
311 | ------------------------------------------------------------------------------- | ||
312 | |||
313 | Name CX2341X_DEC_SET_PREBUFFERING | 291 | Name CX2341X_DEC_SET_PREBUFFERING |
314 | Enum 30/0x1E | 292 | Enum 30/0x1E |
315 | Description | 293 | Description |
diff --git a/Documentation/video4linux/cx2341x/fw-decoder-regs.txt b/Documentation/video4linux/cx2341x/fw-decoder-regs.txt new file mode 100644 index 000000000000..db2366c634e8 --- /dev/null +++ b/Documentation/video4linux/cx2341x/fw-decoder-regs.txt | |||
@@ -0,0 +1,815 @@ | |||
1 | PVR350 Video decoder registers 0x02002800 -> 0x02002B00 | ||
2 | ======================================================= | ||
3 | |||
4 | This list has been worked out through trial and error. There will be mistakes | ||
5 | and omissions. Some registers have no obvious effect so it's hard to say what | ||
6 | they do, while others interact with each other, or require a certain load | ||
7 | sequence. Horizontal filter setup is one example, with six registers working | ||
8 | in unison and requiring a certain load sequence to correctly configure. The | ||
9 | indexed colour palette is much easier to set at just two registers, but again | ||
10 | it requires a certain load sequence. | ||
11 | |||
12 | Some registers are fussy about what they are set to. Load in a bad value & the | ||
13 | decoder will fail. A firmware reload will often recover, but sometimes a reset | ||
14 | is required. For registers containing size information, setting them to 0 is | ||
15 | generally a bad idea. For other control registers i.e. 2878, you'll only find | ||
16 | out what values are bad when it hangs. | ||
17 | |||
18 | -------------------------------------------------------------------------------- | ||
19 | 2800 | ||
20 | bit 0 | ||
21 | Decoder enable | ||
22 | 0 = disable | ||
23 | 1 = enable | ||
24 | -------------------------------------------------------------------------------- | ||
25 | 2804 | ||
26 | bits 0:31 | ||
27 | Decoder horizontal Y alias register 1 | ||
28 | --------------- | ||
29 | 2808 | ||
30 | bits 0:31 | ||
31 | Decoder horizontal Y alias register 2 | ||
32 | --------------- | ||
33 | 280C | ||
34 | bits 0:31 | ||
35 | Decoder horizontal Y alias register 3 | ||
36 | --------------- | ||
37 | 2810 | ||
38 | bits 0:31 | ||
39 | Decoder horizontal Y alias register 4 | ||
40 | --------------- | ||
41 | 2814 | ||
42 | bits 0:31 | ||
43 | Decoder horizontal Y alias register 5 | ||
44 | --------------- | ||
45 | 2818 | ||
46 | bits 0:31 | ||
47 | Decoder horizontal Y alias trigger | ||
48 | |||
49 | These six registers control the horizontal aliasing filter for the Y plane. | ||
50 | The first five registers must all be loaded before accessing the trigger | ||
51 | (2818), as this register actually clocks the data through for the first | ||
52 | five. | ||
53 | |||
54 | To correctly program set the filter, this whole procedure must be done 16 | ||
55 | times. The actual register contents are copied from a lookup-table in the | ||
56 | firmware which contains 4 different filter settings. | ||
57 | |||
58 | -------------------------------------------------------------------------------- | ||
59 | 281C | ||
60 | bits 0:31 | ||
61 | Decoder horizontal UV alias register 1 | ||
62 | --------------- | ||
63 | 2820 | ||
64 | bits 0:31 | ||
65 | Decoder horizontal UV alias register 2 | ||
66 | --------------- | ||
67 | 2824 | ||
68 | bits 0:31 | ||
69 | Decoder horizontal UV alias register 3 | ||
70 | --------------- | ||
71 | 2828 | ||
72 | bits 0:31 | ||
73 | Decoder horizontal UV alias register 4 | ||
74 | --------------- | ||
75 | 282C | ||
76 | bits 0:31 | ||
77 | Decoder horizontal UV alias register 5 | ||
78 | --------------- | ||
79 | 2830 | ||
80 | bits 0:31 | ||
81 | Decoder horizontal UV alias trigger | ||
82 | |||
83 | These six registers control the horizontal aliasing for the UV plane. | ||
84 | Operation is the same as the Y filter, with 2830 being the trigger | ||
85 | register. | ||
86 | |||
87 | -------------------------------------------------------------------------------- | ||
88 | 2834 | ||
89 | bits 0:15 | ||
90 | Decoder Y source width in pixels | ||
91 | |||
92 | bits 16:31 | ||
93 | Decoder Y destination width in pixels | ||
94 | --------------- | ||
95 | 2838 | ||
96 | bits 0:15 | ||
97 | Decoder UV source width in pixels | ||
98 | |||
99 | bits 16:31 | ||
100 | Decoder UV destination width in pixels | ||
101 | |||
102 | NOTE: For both registers, the resulting image must be fully visible on | ||
103 | screen. If the image exceeds the right edge both the source and destination | ||
104 | size must be adjusted to reflect the visible portion. For the source width, | ||
105 | you must take into account the scaling when calculating the new value. | ||
106 | -------------------------------------------------------------------------------- | ||
107 | |||
108 | 283C | ||
109 | bits 0:31 | ||
110 | Decoder Y horizontal scaling | ||
111 | Normally = Reg 2854 >> 2 | ||
112 | --------------- | ||
113 | 2840 | ||
114 | bits 0:31 | ||
115 | Decoder ?? unknown - horizontal scaling | ||
116 | Usually 0x00080514 | ||
117 | --------------- | ||
118 | 2844 | ||
119 | bits 0:31 | ||
120 | Decoder UV horizontal scaling | ||
121 | Normally = Reg 2854 >> 2 | ||
122 | --------------- | ||
123 | 2848 | ||
124 | bits 0:31 | ||
125 | Decoder ?? unknown - horizontal scaling | ||
126 | Usually 0x00100514 | ||
127 | --------------- | ||
128 | 284C | ||
129 | bits 0:31 | ||
130 | Decoder ?? unknown - Y plane | ||
131 | Usually 0x00200020 | ||
132 | --------------- | ||
133 | 2850 | ||
134 | bits 0:31 | ||
135 | Decoder ?? unknown - UV plane | ||
136 | Usually 0x00200020 | ||
137 | --------------- | ||
138 | 2854 | ||
139 | bits 0:31 | ||
140 | Decoder 'master' value for horizontal scaling | ||
141 | --------------- | ||
142 | 2858 | ||
143 | bits 0:31 | ||
144 | Decoder ?? unknown | ||
145 | Usually 0 | ||
146 | --------------- | ||
147 | 285C | ||
148 | bits 0:31 | ||
149 | Decoder ?? unknown | ||
150 | Normally = Reg 2854 >> 1 | ||
151 | --------------- | ||
152 | 2860 | ||
153 | bits 0:31 | ||
154 | Decoder ?? unknown | ||
155 | Usually 0 | ||
156 | --------------- | ||
157 | 2864 | ||
158 | bits 0:31 | ||
159 | Decoder ?? unknown | ||
160 | Normally = Reg 2854 >> 1 | ||
161 | --------------- | ||
162 | 2868 | ||
163 | bits 0:31 | ||
164 | Decoder ?? unknown | ||
165 | Usually 0 | ||
166 | |||
167 | Most of these registers either control horizontal scaling, or appear linked | ||
168 | to it in some way. Register 2854 contains the 'master' value & the other | ||
169 | registers can be calculated from that one. You must also remember to | ||
170 | correctly set the divider in Reg 2874. | ||
171 | |||
172 | To enlarge: | ||
173 | Reg 2854 = (source_width * 0x00200000) / destination_width | ||
174 | Reg 2874 = No divide | ||
175 | |||
176 | To reduce from full size down to half size: | ||
177 | Reg 2854 = (source_width/2 * 0x00200000) / destination width | ||
178 | Reg 2874 = Divide by 2 | ||
179 | |||
180 | To reduce from half size down to quarter size: | ||
181 | Reg 2854 = (source_width/4 * 0x00200000) / destination width | ||
182 | Reg 2874 = Divide by 4 | ||
183 | |||
184 | The result is always rounded up. | ||
185 | |||
186 | -------------------------------------------------------------------------------- | ||
187 | 286C | ||
188 | bits 0:15 | ||
189 | Decoder horizontal Y buffer offset | ||
190 | |||
191 | bits 15:31 | ||
192 | Decoder horizontal UV buffer offset | ||
193 | |||
194 | Offset into the video image buffer. If the offset is gradually incremented, | ||
195 | the on screen image will move left & wrap around higher up on the right. | ||
196 | |||
197 | -------------------------------------------------------------------------------- | ||
198 | 2870 | ||
199 | bits 0:15 | ||
200 | Decoder horizontal Y output offset | ||
201 | |||
202 | bits 16:31 | ||
203 | Decoder horizontal UV output offset | ||
204 | |||
205 | Offsets the actual video output. Controls output alignment of the Y & UV | ||
206 | planes. The higher the value, the greater the shift to the left. Use | ||
207 | reg 2890 to move the image right. | ||
208 | |||
209 | -------------------------------------------------------------------------------- | ||
210 | 2874 | ||
211 | bits 0:1 | ||
212 | Decoder horizontal Y output size divider | ||
213 | 00 = No divide | ||
214 | 01 = Divide by 2 | ||
215 | 10 = Divide by 3 | ||
216 | |||
217 | bits 4:5 | ||
218 | Decoder horizontal UV output size divider | ||
219 | 00 = No divide | ||
220 | 01 = Divide by 2 | ||
221 | 10 = Divide by 3 | ||
222 | |||
223 | bit 8 | ||
224 | Decoder ?? unknown | ||
225 | 0 = Normal | ||
226 | 1 = Affects video output levels | ||
227 | |||
228 | bit 16 | ||
229 | Decoder ?? unknown | ||
230 | 0 = Normal | ||
231 | 1 = Disable horizontal filter | ||
232 | |||
233 | -------------------------------------------------------------------------------- | ||
234 | 2878 | ||
235 | bit 0 | ||
236 | ?? unknown | ||
237 | |||
238 | bit 1 | ||
239 | osd on/off | ||
240 | 0 = osd off | ||
241 | 1 = osd on | ||
242 | |||
243 | bit 2 | ||
244 | Decoder + osd video timing | ||
245 | 0 = NTSC | ||
246 | 1 = PAL | ||
247 | |||
248 | bits 3:4 | ||
249 | ?? unknown | ||
250 | |||
251 | bit 5 | ||
252 | Decoder + osd | ||
253 | Swaps upper & lower fields | ||
254 | |||
255 | -------------------------------------------------------------------------------- | ||
256 | 287C | ||
257 | bits 0:10 | ||
258 | Decoder & osd ?? unknown | ||
259 | Moves entire screen horizontally. Starts at 0x005 with the screen | ||
260 | shifted heavily to the right. Incrementing in steps of 0x004 will | ||
261 | gradually shift the screen to the left. | ||
262 | |||
263 | bits 11:31 | ||
264 | ?? unknown | ||
265 | |||
266 | Normally contents are 0x00101111 (NTSC) or 0x1010111d (PAL) | ||
267 | |||
268 | -------------------------------------------------------------------------------- | ||
269 | 2880 -------- ?? unknown | ||
270 | 2884 -------- ?? unknown | ||
271 | -------------------------------------------------------------------------------- | ||
272 | 2888 | ||
273 | bit 0 | ||
274 | Decoder + osd ?? unknown | ||
275 | 0 = Normal | ||
276 | 1 = Misaligned fields (Correctable through 289C & 28A4) | ||
277 | |||
278 | bit 4 | ||
279 | ?? unknown | ||
280 | |||
281 | bit 8 | ||
282 | ?? unknown | ||
283 | |||
284 | Warning: Bad values will require a firmware reload to recover. | ||
285 | Known to be bad are 0x000,0x011,0x100,0x111 | ||
286 | -------------------------------------------------------------------------------- | ||
287 | 288C | ||
288 | bits 0:15 | ||
289 | osd ?? unknown | ||
290 | Appears to affect the osd position stability. The higher the value the | ||
291 | more unstable it becomes. Decoder output remains stable. | ||
292 | |||
293 | bits 16:31 | ||
294 | osd ?? unknown | ||
295 | Same as bits 0:15 | ||
296 | |||
297 | -------------------------------------------------------------------------------- | ||
298 | 2890 | ||
299 | bits 0:11 | ||
300 | Decoder output horizontal offset. | ||
301 | |||
302 | Horizontal offset moves the video image right. A small left shift is | ||
303 | possible, but it's better to use reg 2870 for that due to its greater | ||
304 | range. | ||
305 | |||
306 | NOTE: Video corruption will occur if video window is shifted off the right | ||
307 | edge. To avoid this read the notes for 2834 & 2838. | ||
308 | -------------------------------------------------------------------------------- | ||
309 | 2894 | ||
310 | bits 0:23 | ||
311 | Decoder output video surround colour. | ||
312 | |||
313 | Contains the colour (in yuv) used to fill the screen when the video is | ||
314 | running in a window. | ||
315 | -------------------------------------------------------------------------------- | ||
316 | 2898 | ||
317 | bits 0:23 | ||
318 | Decoder video window colour | ||
319 | Contains the colour (in yuv) used to fill the video window when the | ||
320 | video is turned off. | ||
321 | |||
322 | bit 24 | ||
323 | Decoder video output | ||
324 | 0 = Video on | ||
325 | 1 = Video off | ||
326 | |||
327 | bit 28 | ||
328 | Decoder plane order | ||
329 | 0 = Y,UV | ||
330 | 1 = UV,Y | ||
331 | |||
332 | bit 29 | ||
333 | Decoder second plane byte order | ||
334 | 0 = Normal (UV) | ||
335 | 1 = Swapped (VU) | ||
336 | |||
337 | In normal usage, the first plane is Y & the second plane is UV. Though the | ||
338 | order of the planes can be swapped, only the byte order of the second plane | ||
339 | can be swapped. This isn't much use for the Y plane, but can be useful for | ||
340 | the UV plane. | ||
341 | |||
342 | -------------------------------------------------------------------------------- | ||
343 | 289C | ||
344 | bits 0:15 | ||
345 | Decoder vertical field offset 1 | ||
346 | |||
347 | bits 16:31 | ||
348 | Decoder vertical field offset 2 | ||
349 | |||
350 | Controls field output vertical alignment. The higher the number, the lower | ||
351 | the image on screen. Known starting values are 0x011E0017 (NTSC) & | ||
352 | 0x01500017 (PAL) | ||
353 | -------------------------------------------------------------------------------- | ||
354 | 28A0 | ||
355 | bits 0:15 | ||
356 | Decoder & osd width in pixels | ||
357 | |||
358 | bits 16:31 | ||
359 | Decoder & osd height in pixels | ||
360 | |||
361 | All output from the decoder & osd are disabled beyond this area. Decoder | ||
362 | output will simply go black outside of this region. If the osd tries to | ||
363 | exceed this area it will become corrupt. | ||
364 | -------------------------------------------------------------------------------- | ||
365 | 28A4 | ||
366 | bits 0:11 | ||
367 | osd left shift. | ||
368 | |||
369 | Has a range of 0x770->0x7FF. With the exception of 0, any value outside of | ||
370 | this range corrupts the osd. | ||
371 | -------------------------------------------------------------------------------- | ||
372 | 28A8 | ||
373 | bits 0:15 | ||
374 | osd vertical field offset 1 | ||
375 | |||
376 | bits 16:31 | ||
377 | osd vertical field offset 2 | ||
378 | |||
379 | Controls field output vertical alignment. The higher the number, the lower | ||
380 | the image on screen. Known starting values are 0x011E0017 (NTSC) & | ||
381 | 0x01500017 (PAL) | ||
382 | -------------------------------------------------------------------------------- | ||
383 | 28AC -------- ?? unknown | ||
384 | | | ||
385 | V | ||
386 | 28BC -------- ?? unknown | ||
387 | -------------------------------------------------------------------------------- | ||
388 | 28C0 | ||
389 | bit 0 | ||
390 | Current output field | ||
391 | 0 = first field | ||
392 | 1 = second field | ||
393 | |||
394 | bits 16:31 | ||
395 | Current scanline | ||
396 | The scanline counts from the top line of the first field | ||
397 | through to the last line of the second field. | ||
398 | -------------------------------------------------------------------------------- | ||
399 | 28C4 -------- ?? unknown | ||
400 | | | ||
401 | V | ||
402 | 28F8 -------- ?? unknown | ||
403 | -------------------------------------------------------------------------------- | ||
404 | 28FC | ||
405 | bit 0 | ||
406 | ?? unknown | ||
407 | 0 = Normal | ||
408 | 1 = Breaks decoder & osd output | ||
409 | -------------------------------------------------------------------------------- | ||
410 | 2900 | ||
411 | bits 0:31 | ||
412 | Decoder vertical Y alias register 1 | ||
413 | --------------- | ||
414 | 2904 | ||
415 | bits 0:31 | ||
416 | Decoder vertical Y alias register 2 | ||
417 | --------------- | ||
418 | 2908 | ||
419 | bits 0:31 | ||
420 | Decoder vertical Y alias trigger | ||
421 | |||
422 | These three registers control the vertical aliasing filter for the Y plane. | ||
423 | Operation is similar to the horizontal Y filter (2804). The only real | ||
424 | difference is that there are only two registers to set before accessing | ||
425 | the trigger register (2908). As for the horizontal filter, the values are | ||
426 | taken from a lookup table in the firmware, and the procedure must be | ||
427 | repeated 16 times to fully program the filter. | ||
428 | -------------------------------------------------------------------------------- | ||
429 | 290C | ||
430 | bits 0:31 | ||
431 | Decoder vertical UV alias register 1 | ||
432 | --------------- | ||
433 | 2910 | ||
434 | bits 0:31 | ||
435 | Decoder vertical UV alias register 2 | ||
436 | --------------- | ||
437 | 2914 | ||
438 | bits 0:31 | ||
439 | Decoder vertical UV alias trigger | ||
440 | |||
441 | These three registers control the vertical aliasing filter for the UV | ||
442 | plane. Operation is the same as the Y filter, with 2914 being the trigger. | ||
443 | -------------------------------------------------------------------------------- | ||
444 | 2918 | ||
445 | bits 0:15 | ||
446 | Decoder Y source height in pixels | ||
447 | |||
448 | bits 16:31 | ||
449 | Decoder Y destination height in pixels | ||
450 | --------------- | ||
451 | 291C | ||
452 | bits 0:15 | ||
453 | Decoder UV source height in pixels divided by 2 | ||
454 | |||
455 | bits 16:31 | ||
456 | Decoder UV destination height in pixels | ||
457 | |||
458 | NOTE: For both registers, the resulting image must be fully visible on | ||
459 | screen. If the image exceeds the bottom edge both the source and | ||
460 | destination size must be adjusted to reflect the visible portion. For the | ||
461 | source height, you must take into account the scaling when calculating the | ||
462 | new value. | ||
463 | -------------------------------------------------------------------------------- | ||
464 | 2920 | ||
465 | bits 0:31 | ||
466 | Decoder Y vertical scaling | ||
467 | Normally = Reg 2930 >> 2 | ||
468 | --------------- | ||
469 | 2924 | ||
470 | bits 0:31 | ||
471 | Decoder Y vertical scaling | ||
472 | Normally = Reg 2920 + 0x514 | ||
473 | --------------- | ||
474 | 2928 | ||
475 | bits 0:31 | ||
476 | Decoder UV vertical scaling | ||
477 | When enlarging = Reg 2930 >> 2 | ||
478 | When reducing = Reg 2930 >> 3 | ||
479 | --------------- | ||
480 | 292C | ||
481 | bits 0:31 | ||
482 | Decoder UV vertical scaling | ||
483 | Normally = Reg 2928 + 0x514 | ||
484 | --------------- | ||
485 | 2930 | ||
486 | bits 0:31 | ||
487 | Decoder 'master' value for vertical scaling | ||
488 | --------------- | ||
489 | 2934 | ||
490 | bits 0:31 | ||
491 | Decoder ?? unknown - Y vertical scaling | ||
492 | --------------- | ||
493 | 2938 | ||
494 | bits 0:31 | ||
495 | Decoder Y vertical scaling | ||
496 | Normally = Reg 2930 | ||
497 | --------------- | ||
498 | 293C | ||
499 | bits 0:31 | ||
500 | Decoder ?? unknown - Y vertical scaling | ||
501 | --------------- | ||
502 | 2940 | ||
503 | bits 0:31 | ||
504 | Decoder UV vertical scaling | ||
505 | When enlarging = Reg 2930 >> 1 | ||
506 | When reducing = Reg 2930 | ||
507 | --------------- | ||
508 | 2944 | ||
509 | bits 0:31 | ||
510 | Decoder ?? unknown - UV vertical scaling | ||
511 | --------------- | ||
512 | 2948 | ||
513 | bits 0:31 | ||
514 | Decoder UV vertical scaling | ||
515 | Normally = Reg 2940 | ||
516 | --------------- | ||
517 | 294C | ||
518 | bits 0:31 | ||
519 | Decoder ?? unknown - UV vertical scaling | ||
520 | |||
521 | Most of these registers either control vertical scaling, or appear linked | ||
522 | to it in some way. Register 2930 contains the 'master' value & all other | ||
523 | registers can be calculated from that one. You must also remember to | ||
524 | correctly set the divider in Reg 296C | ||
525 | |||
526 | To enlarge: | ||
527 | Reg 2930 = (source_height * 0x00200000) / destination_height | ||
528 | Reg 296C = No divide | ||
529 | |||
530 | To reduce from full size down to half size: | ||
531 | Reg 2930 = (source_height/2 * 0x00200000) / destination height | ||
532 | Reg 296C = Divide by 2 | ||
533 | |||
534 | To reduce from half down to quarter. | ||
535 | Reg 2930 = (source_height/4 * 0x00200000) / destination height | ||
536 | Reg 296C = Divide by 4 | ||
537 | |||
538 | -------------------------------------------------------------------------------- | ||
539 | 2950 | ||
540 | bits 0:15 | ||
541 | Decoder Y line index into display buffer, first field | ||
542 | |||
543 | bits 16:31 | ||
544 | Decoder Y vertical line skip, first field | ||
545 | -------------------------------------------------------------------------------- | ||
546 | 2954 | ||
547 | bits 0:15 | ||
548 | Decoder Y line index into display buffer, second field | ||
549 | |||
550 | bits 16:31 | ||
551 | Decoder Y vertical line skip, second field | ||
552 | -------------------------------------------------------------------------------- | ||
553 | 2958 | ||
554 | bits 0:15 | ||
555 | Decoder UV line index into display buffer, first field | ||
556 | |||
557 | bits 16:31 | ||
558 | Decoder UV vertical line skip, first field | ||
559 | -------------------------------------------------------------------------------- | ||
560 | 295C | ||
561 | bits 0:15 | ||
562 | Decoder UV line index into display buffer, second field | ||
563 | |||
564 | bits 16:31 | ||
565 | Decoder UV vertical line skip, second field | ||
566 | -------------------------------------------------------------------------------- | ||
567 | 2960 | ||
568 | bits 0:15 | ||
569 | Decoder destination height minus 1 | ||
570 | |||
571 | bits 16:31 | ||
572 | Decoder destination height divided by 2 | ||
573 | -------------------------------------------------------------------------------- | ||
574 | 2964 | ||
575 | bits 0:15 | ||
576 | Decoder Y vertical offset, second field | ||
577 | |||
578 | bits 16:31 | ||
579 | Decoder Y vertical offset, first field | ||
580 | |||
581 | These two registers shift the Y plane up. The higher the number, the | ||
582 | greater the shift. | ||
583 | -------------------------------------------------------------------------------- | ||
584 | 2968 | ||
585 | bits 0:15 | ||
586 | Decoder UV vertical offset, second field | ||
587 | |||
588 | bits 16:31 | ||
589 | Decoder UV vertical offset, first field | ||
590 | |||
591 | These two registers shift the UV plane up. The higher the number, the | ||
592 | greater the shift. | ||
593 | -------------------------------------------------------------------------------- | ||
594 | 296C | ||
595 | bits 0:1 | ||
596 | Decoder vertical Y output size divider | ||
597 | 00 = No divide | ||
598 | 01 = Divide by 2 | ||
599 | 10 = Divide by 4 | ||
600 | |||
601 | bits 8:9 | ||
602 | Decoder vertical UV output size divider | ||
603 | 00 = No divide | ||
604 | 01 = Divide by 2 | ||
605 | 10 = Divide by 4 | ||
606 | -------------------------------------------------------------------------------- | ||
607 | 2970 | ||
608 | bit 0 | ||
609 | Decoder ?? unknown | ||
610 | 0 = Normal | ||
611 | 1 = Affect video output levels | ||
612 | |||
613 | bit 16 | ||
614 | Decoder ?? unknown | ||
615 | 0 = Normal | ||
616 | 1 = Disable vertical filter | ||
617 | |||
618 | -------------------------------------------------------------------------------- | ||
619 | 2974 -------- ?? unknown | ||
620 | | | ||
621 | V | ||
622 | 29EF -------- ?? unknown | ||
623 | -------------------------------------------------------------------------------- | ||
624 | 2A00 | ||
625 | bits 0:2 | ||
626 | osd colour mode | ||
627 | 001 = 16 bit (565) | ||
628 | 010 = 15 bit (555) | ||
629 | 011 = 12 bit (444) | ||
630 | 100 = 32 bit (8888) | ||
631 | 101 = 8 bit indexed | ||
632 | |||
633 | bits 4:5 | ||
634 | osd display bpp | ||
635 | 01 = 8 bit | ||
636 | 10 = 16 bit | ||
637 | 11 = 32 bit | ||
638 | |||
639 | bit 8 | ||
640 | osd global alpha | ||
641 | 0 = Off | ||
642 | 1 = On | ||
643 | |||
644 | bit 9 | ||
645 | osd local alpha | ||
646 | 0 = Off | ||
647 | 1 = On | ||
648 | |||
649 | bit 10 | ||
650 | osd colour key | ||
651 | 0 = Off | ||
652 | 1 = On | ||
653 | |||
654 | bit 11 | ||
655 | osd ?? unknown | ||
656 | Must be 1 | ||
657 | |||
658 | bit 13 | ||
659 | osd colour space | ||
660 | 0 = ARGB | ||
661 | 1 = AYVU | ||
662 | |||
663 | bits 16:31 | ||
664 | osd ?? unknown | ||
665 | Must be 0x001B (some kind of buffer pointer ?) | ||
666 | |||
667 | When the bits-per-pixel is set to 8, the colour mode is ignored and | ||
668 | assumed to be 8 bit indexed. For 16 & 32 bits-per-pixel the colour depth | ||
669 | is honoured, and when using a colour depth that requires fewer bytes than | ||
670 | allocated the extra bytes are used as padding. So for a 32 bpp with 8 bit | ||
671 | index colour, there are 3 padding bytes per pixel. It's also possible to | ||
672 | select 16bpp with a 32 bit colour mode. This results in the pixel width | ||
673 | being doubled, but the color key will not work as expected in this mode. | ||
674 | |||
675 | Colour key is as it suggests. You designate a colour which will become | ||
676 | completely transparent. When using 565, 555 or 444 colour modes, the | ||
677 | colour key is always 16 bits wide. The colour to key on is set in Reg 2A18. | ||
678 | |||
679 | Local alpha is a per-pixel 256 step transparency, with 0 being transparent | ||
680 | and 255 being solid. This is only available in 32 bit & 8 bit indexed | ||
681 | colour modes. | ||
682 | |||
683 | Global alpha is a 256 step transparency that applies to the entire osd, | ||
684 | with 0 being transparent & 255 being solid. | ||
685 | |||
686 | It's possible to combine colour key, local alpha & global alpha. | ||
687 | -------------------------------------------------------------------------------- | ||
688 | 2A04 | ||
689 | bits 0:15 | ||
690 | osd x coord for left edge | ||
691 | |||
692 | bits 16:31 | ||
693 | osd y coord for top edge | ||
694 | --------------- | ||
695 | 2A08 | ||
696 | bits 0:15 | ||
697 | osd x coord for right edge | ||
698 | |||
699 | bits 16:31 | ||
700 | osd y coord for bottom edge | ||
701 | |||
702 | For both registers, (0,0) = top left corner of the display area. These | ||
703 | registers do not control the osd size, only where it's positioned & how | ||
704 | much is visible. The visible osd area cannot exceed the right edge of the | ||
705 | display, otherwise the osd will become corrupt. See reg 2A10 for | ||
706 | setting osd width. | ||
707 | -------------------------------------------------------------------------------- | ||
708 | 2A0C | ||
709 | bits 0:31 | ||
710 | osd buffer index | ||
711 | |||
712 | An index into the osd buffer. Slowly incrementing this moves the osd left, | ||
713 | wrapping around onto the right edge | ||
714 | -------------------------------------------------------------------------------- | ||
715 | 2A10 | ||
716 | bits 0:11 | ||
717 | osd buffer 32 bit word width | ||
718 | |||
719 | Contains the width of the osd measured in 32 bit words. This means that all | ||
720 | colour modes are restricted to a byte width which is divisible by 4. | ||
721 | -------------------------------------------------------------------------------- | ||
722 | 2A14 | ||
723 | bits 0:15 | ||
724 | osd height in pixels | ||
725 | |||
726 | bits 16:32 | ||
727 | osd line index into buffer | ||
728 | osd will start displaying from this line. | ||
729 | -------------------------------------------------------------------------------- | ||
730 | 2A18 | ||
731 | bits 0:31 | ||
732 | osd colour key | ||
733 | |||
734 | Contains the colour value which will be transparent. | ||
735 | -------------------------------------------------------------------------------- | ||
736 | 2A1C | ||
737 | bits 0:7 | ||
738 | osd global alpha | ||
739 | |||
740 | Contains the global alpha value (equiv ivtvfbctl --alpha XX) | ||
741 | -------------------------------------------------------------------------------- | ||
742 | 2A20 -------- ?? unknown | ||
743 | | | ||
744 | V | ||
745 | 2A2C -------- ?? unknown | ||
746 | -------------------------------------------------------------------------------- | ||
747 | 2A30 | ||
748 | bits 0:7 | ||
749 | osd colour to change in indexed palette | ||
750 | --------------- | ||
751 | 2A34 | ||
752 | bits 0:31 | ||
753 | osd colour for indexed palette | ||
754 | |||
755 | To set the new palette, first load the index of the colour to change into | ||
756 | 2A30, then load the new colour into 2A34. The full palette is 256 colours, | ||
757 | so the index range is 0x00-0xFF | ||
758 | -------------------------------------------------------------------------------- | ||
759 | 2A38 -------- ?? unknown | ||
760 | 2A3C -------- ?? unknown | ||
761 | -------------------------------------------------------------------------------- | ||
762 | 2A40 | ||
763 | bits 0:31 | ||
764 | osd ?? unknown | ||
765 | |||
766 | Affects overall brightness, wrapping around to black | ||
767 | -------------------------------------------------------------------------------- | ||
768 | 2A44 | ||
769 | bits 0:31 | ||
770 | osd ?? unknown | ||
771 | |||
772 | Green tint | ||
773 | -------------------------------------------------------------------------------- | ||
774 | 2A48 | ||
775 | bits 0:31 | ||
776 | osd ?? unknown | ||
777 | |||
778 | Red tint | ||
779 | -------------------------------------------------------------------------------- | ||
780 | 2A4C | ||
781 | bits 0:31 | ||
782 | osd ?? unknown | ||
783 | |||
784 | Affects overall brightness, wrapping around to black | ||
785 | -------------------------------------------------------------------------------- | ||
786 | 2A50 | ||
787 | bits 0:31 | ||
788 | osd ?? unknown | ||
789 | |||
790 | Colour shift | ||
791 | -------------------------------------------------------------------------------- | ||
792 | 2A54 | ||
793 | bits 0:31 | ||
794 | osd ?? unknown | ||
795 | |||
796 | Colour shift | ||
797 | -------------------------------------------------------------------------------- | ||
798 | 2A58 -------- ?? unknown | ||
799 | | | ||
800 | V | ||
801 | 2AFC -------- ?? unknown | ||
802 | -------------------------------------------------------------------------------- | ||
803 | 2B00 | ||
804 | bit 0 | ||
805 | osd filter control | ||
806 | 0 = filter off | ||
807 | 1 = filter on | ||
808 | |||
809 | bits 1:4 | ||
810 | osd ?? unknown | ||
811 | |||
812 | -------------------------------------------------------------------------------- | ||
813 | |||
814 | v0.3 - 2 February 2007 - Ian Armstrong (ian@iarmst.demon.co.uk) | ||
815 | |||
diff --git a/Documentation/video4linux/cx2341x/fw-dma.txt b/Documentation/video4linux/cx2341x/fw-dma.txt index 8123e262d5b6..be52b6fd1e9a 100644 --- a/Documentation/video4linux/cx2341x/fw-dma.txt +++ b/Documentation/video4linux/cx2341x/fw-dma.txt | |||
@@ -22,6 +22,8 @@ urged to choose a smaller block size and learn the scatter-gather technique. | |||
22 | 22 | ||
23 | Mailbox #10 is reserved for DMA transfer information. | 23 | Mailbox #10 is reserved for DMA transfer information. |
24 | 24 | ||
25 | Note: the hardware expects little-endian data ('intel format'). | ||
26 | |||
25 | Flow | 27 | Flow |
26 | ==== | 28 | ==== |
27 | 29 | ||
@@ -64,7 +66,7 @@ addresses are the physical memory location of the target DMA buffer. | |||
64 | 66 | ||
65 | Each S-G array element is a struct of three 32-bit words. The first word is | 67 | Each S-G array element is a struct of three 32-bit words. The first word is |
66 | the source address, the second is the destination address. Both take up the | 68 | the source address, the second is the destination address. Both take up the |
67 | entire 32 bits. The lowest 16 bits of the third word is the transfer byte | 69 | entire 32 bits. The lowest 18 bits of the third word is the transfer byte |
68 | count. The high-bit of the third word is the "last" flag. The last-flag tells | 70 | count. The high-bit of the third word is the "last" flag. The last-flag tells |
69 | the card to raise the DMA_DONE interrupt. From hard personal experience, if | 71 | the card to raise the DMA_DONE interrupt. From hard personal experience, if |
70 | you forget to set this bit, the card will still "work" but the stream will | 72 | you forget to set this bit, the card will still "work" but the stream will |
@@ -78,8 +80,8 @@ Array Element: | |||
78 | 80 | ||
79 | - 32-bit Source Address | 81 | - 32-bit Source Address |
80 | - 32-bit Destination Address | 82 | - 32-bit Destination Address |
81 | - 16-bit reserved (high bit is the last flag) | 83 | - 14-bit reserved (high bit is the last flag) |
82 | - 16-bit byte count | 84 | - 18-bit byte count |
83 | 85 | ||
84 | DMA Transfer Status | 86 | DMA Transfer Status |
85 | =================== | 87 | =================== |
@@ -87,8 +89,8 @@ DMA Transfer Status | |||
87 | Register 0x0004 holds the DMA Transfer Status: | 89 | Register 0x0004 holds the DMA Transfer Status: |
88 | 90 | ||
89 | Bit | 91 | Bit |
90 | 4 Scatter-Gather array error | ||
91 | 3 DMA write error | ||
92 | 2 DMA read error | ||
93 | 1 write completed | ||
94 | 0 read completed | 92 | 0 read completed |
93 | 1 write completed | ||
94 | 2 DMA read error | ||
95 | 3 DMA write error | ||
96 | 4 Scatter-Gather array error | ||
diff --git a/Documentation/video4linux/cx2341x/fw-encoder-api.txt b/Documentation/video4linux/cx2341x/fw-encoder-api.txt index 15df0df57ddd..242104ce5b61 100644 --- a/Documentation/video4linux/cx2341x/fw-encoder-api.txt +++ b/Documentation/video4linux/cx2341x/fw-encoder-api.txt | |||
@@ -213,16 +213,6 @@ Param[1] | |||
213 | 213 | ||
214 | ------------------------------------------------------------------------------- | 214 | ------------------------------------------------------------------------------- |
215 | 215 | ||
216 | Name CX2341X_ENC_SET_3_2_PULLDOWN | ||
217 | Enum 177/0xB1 | ||
218 | Description | ||
219 | 3:2 pulldown properties | ||
220 | Param[0] | ||
221 | 0=enabled | ||
222 | 1=disabled | ||
223 | |||
224 | ------------------------------------------------------------------------------- | ||
225 | |||
226 | Name CX2341X_ENC_SET_VBI_LINE | 216 | Name CX2341X_ENC_SET_VBI_LINE |
227 | Enum 183/0xB7 | 217 | Enum 183/0xB7 |
228 | Description | 218 | Description |
@@ -332,9 +322,7 @@ Param[0] | |||
332 | '01'=JointStereo | 322 | '01'=JointStereo |
333 | '10'=Dual | 323 | '10'=Dual |
334 | '11'=Mono | 324 | '11'=Mono |
335 | Note: testing seems to indicate that Mono and possibly | 325 | Note: the cx23415 cannot decode Joint Stereo properly. |
336 | JointStereo are not working (default to stereo). | ||
337 | Dual does work, though. | ||
338 | 326 | ||
339 | 10:11 Mode Extension used in joint_stereo mode. | 327 | 10:11 Mode Extension used in joint_stereo mode. |
340 | In Layer I and II they indicate which subbands are in | 328 | In Layer I and II they indicate which subbands are in |
@@ -413,16 +401,34 @@ Name CX2341X_ENC_SET_PGM_INDEX_INFO | |||
413 | Enum 199/0xC7 | 401 | Enum 199/0xC7 |
414 | Description | 402 | Description |
415 | Sets the Program Index Information. | 403 | Sets the Program Index Information. |
404 | The information is stored as follows: | ||
405 | |||
406 | struct info { | ||
407 | u32 length; // Length of this frame | ||
408 | u32 offset_low; // Offset in the file of the | ||
409 | u32 offset_high; // start of this frame | ||
410 | u32 mask1; // Bits 0-1 are the type mask: | ||
411 | // 1=I, 2=P, 4=B | ||
412 | u32 pts; // The PTS of the frame | ||
413 | u32 mask2; // Bit 0 is bit 32 of the pts. | ||
414 | }; | ||
415 | u32 table_ptr; | ||
416 | struct info index[400]; | ||
417 | |||
418 | The table_ptr is the encoder memory address in the table were | ||
419 | *new* entries will be written. Note that this is a ringbuffer, | ||
420 | so the table_ptr will wraparound. | ||
416 | Param[0] | 421 | Param[0] |
417 | Picture Mask: | 422 | Picture Mask: |
418 | 0=No index capture | 423 | 0=No index capture |
419 | 1=I frames | 424 | 1=I frames |
420 | 3=I,P frames | 425 | 3=I,P frames |
421 | 7=I,P,B frames | 426 | 7=I,P,B frames |
427 | (Seems to be ignored, it always indexes I, P and B frames) | ||
422 | Param[1] | 428 | Param[1] |
423 | Elements requested (up to 400) | 429 | Elements requested (up to 400) |
424 | Result[0] | 430 | Result[0] |
425 | Offset in SDF memory of the table. | 431 | Offset in the encoder memory of the start of the table. |
426 | Result[1] | 432 | Result[1] |
427 | Number of allocated elements up to a maximum of Param[1] | 433 | Number of allocated elements up to a maximum of Param[1] |
428 | 434 | ||
@@ -492,12 +498,14 @@ Name CX2341X_ENC_GET_PREV_DMA_INFO_MB_9 | |||
492 | Enum 203/0xCB | 498 | Enum 203/0xCB |
493 | Description | 499 | Description |
494 | Returns information on the previous DMA transfer in conjunction with | 500 | Returns information on the previous DMA transfer in conjunction with |
495 | bit 27 of the interrupt mask. Uses mailbox 9. | 501 | bit 27 or 18 of the interrupt mask. Uses mailbox 9. |
496 | Result[0] | 502 | Result[0] |
497 | Status bits: | 503 | Status bits: |
498 | Bit 0 set indicates transfer complete | 504 | 0 read completed |
499 | Bit 2 set indicates transfer error | 505 | 1 write completed |
500 | Bit 4 set indicates linked list error | 506 | 2 DMA read error |
507 | 3 DMA write error | ||
508 | 4 Scatter-Gather array error | ||
501 | Result[1] | 509 | Result[1] |
502 | DMA type | 510 | DMA type |
503 | Result[2] | 511 | Result[2] |
@@ -672,7 +680,7 @@ Description | |||
672 | the value. | 680 | the value. |
673 | Param[0] | 681 | Param[0] |
674 | Command number: | 682 | Command number: |
675 | 1=set initial SCR value when starting encoding. | 683 | 1=set initial SCR value when starting encoding (works). |
676 | 2=set quality mode (apparently some test setting). | 684 | 2=set quality mode (apparently some test setting). |
677 | 3=setup advanced VIM protection handling (supposedly only for the cx23416 | 685 | 3=setup advanced VIM protection handling (supposedly only for the cx23416 |
678 | for raw YUV). | 686 | for raw YUV). |
@@ -681,7 +689,11 @@ Param[0] | |||
681 | 4=generate artificial PTS timestamps | 689 | 4=generate artificial PTS timestamps |
682 | 5=USB flush mode | 690 | 5=USB flush mode |
683 | 6=something to do with the quantization matrix | 691 | 6=something to do with the quantization matrix |
684 | 7=set navigation pack insertion for DVD | 692 | 7=set navigation pack insertion for DVD: adds 0xbf (private stream 2) |
693 | packets to the MPEG. The size of these packets is 2048 bytes (including | ||
694 | the header of 6 bytes: 0x000001bf + length). The payload is zeroed and | ||
695 | it is up to the application to fill them in. These packets are apparently | ||
696 | inserted every four frames. | ||
685 | 8=enable scene change detection (seems to be a failure) | 697 | 8=enable scene change detection (seems to be a failure) |
686 | 9=set history parameters of the video input module | 698 | 9=set history parameters of the video input module |
687 | 10=set input field order of VIM | 699 | 10=set input field order of VIM |
diff --git a/Documentation/video4linux/cx2341x/fw-memory.txt b/Documentation/video4linux/cx2341x/fw-memory.txt index ef0aad3f88fc..9d736fe8de66 100644 --- a/Documentation/video4linux/cx2341x/fw-memory.txt +++ b/Documentation/video4linux/cx2341x/fw-memory.txt | |||
@@ -1,6 +1,8 @@ | |||
1 | This document describes the cx2341x memory map and documents some of the register | 1 | This document describes the cx2341x memory map and documents some of the register |
2 | space. | 2 | space. |
3 | 3 | ||
4 | Note: the memory long words are little-endian ('intel format'). | ||
5 | |||
4 | Warning! This information was figured out from searching through the memory and | 6 | Warning! This information was figured out from searching through the memory and |
5 | registers, this information may not be correct and is certainly not complete, and | 7 | registers, this information may not be correct and is certainly not complete, and |
6 | was not derived from anything more than searching through the memory space with | 8 | was not derived from anything more than searching through the memory space with |
@@ -67,7 +69,7 @@ DMA Registers 0x000-0xff: | |||
67 | 0x84 - first write linked list reg, for pci memory addr | 69 | 0x84 - first write linked list reg, for pci memory addr |
68 | 0x88 - first write linked list reg, for length of buffer in memory addr | 70 | 0x88 - first write linked list reg, for length of buffer in memory addr |
69 | (|0x80000000 or this for last link) | 71 | (|0x80000000 or this for last link) |
70 | 0x8c-0xcc - rest of write linked list reg, 8 sets of 3 total, DMA goes here | 72 | 0x8c-0xdc - rest of write linked list reg, 8 sets of 3 total, DMA goes here |
71 | from linked list addr in reg 0x0c, firmware must push through or | 73 | from linked list addr in reg 0x0c, firmware must push through or |
72 | something. | 74 | something. |
73 | 0xe0 - first (and only) read linked list reg, for pci memory addr | 75 | 0xe0 - first (and only) read linked list reg, for pci memory addr |
@@ -123,12 +125,8 @@ Bit | |||
123 | 29 Encoder VBI capture | 125 | 29 Encoder VBI capture |
124 | 28 Encoder Video Input Module reset event | 126 | 28 Encoder Video Input Module reset event |
125 | 27 Encoder DMA complete | 127 | 27 Encoder DMA complete |
126 | 26 | 128 | 24 Decoder audio mode change detection event (through event notification) |
127 | 25 Decoder copy protect detection event | ||
128 | 24 Decoder audio mode change detection event | ||
129 | 23 | ||
130 | 22 Decoder data request | 129 | 22 Decoder data request |
131 | 21 Decoder I-Frame? done | ||
132 | 20 Decoder DMA complete | 130 | 20 Decoder DMA complete |
133 | 19 Decoder VBI re-insertion | 131 | 19 Decoder VBI re-insertion |
134 | 18 Decoder DMA err (linked-list bad) | 132 | 18 Decoder DMA err (linked-list bad) |
diff --git a/Documentation/video4linux/et61x251.txt b/Documentation/video4linux/et61x251.txt index 1bdee8f85b9a..1247566c4de3 100644 --- a/Documentation/video4linux/et61x251.txt +++ b/Documentation/video4linux/et61x251.txt | |||
@@ -23,7 +23,7 @@ Index | |||
23 | 23 | ||
24 | 1. Copyright | 24 | 1. Copyright |
25 | ============ | 25 | ============ |
26 | Copyright (C) 2006 by Luca Risolia <luca.risolia@studio.unibo.it> | 26 | Copyright (C) 2006-2007 by Luca Risolia <luca.risolia@studio.unibo.it> |
27 | 27 | ||
28 | 28 | ||
29 | 2. Disclaimer | 29 | 2. Disclaimer |
@@ -135,8 +135,9 @@ And finally: | |||
135 | 6. Module loading | 135 | 6. Module loading |
136 | ================= | 136 | ================= |
137 | To use the driver, it is necessary to load the "et61x251" module into memory | 137 | To use the driver, it is necessary to load the "et61x251" module into memory |
138 | after every other module required: "videodev", "usbcore" and, depending on | 138 | after every other module required: "videodev", "v4l2_common", "compat_ioctl32", |
139 | the USB host controller you have, "ehci-hcd", "uhci-hcd" or "ohci-hcd". | 139 | "usbcore" and, depending on the USB host controller you have, "ehci-hcd", |
140 | "uhci-hcd" or "ohci-hcd". | ||
140 | 141 | ||
141 | Loading can be done as shown below: | 142 | Loading can be done as shown below: |
142 | 143 | ||
diff --git a/Documentation/video4linux/sn9c102.txt b/Documentation/video4linux/sn9c102.txt index 8cda472db36d..2913da3d0878 100644 --- a/Documentation/video4linux/sn9c102.txt +++ b/Documentation/video4linux/sn9c102.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | SN9C10x PC Camera Controllers | 2 | SN9C1xx PC Camera Controllers |
3 | Driver for Linux | 3 | Driver for Linux |
4 | ============================= | 4 | ============================= |
5 | 5 | ||
@@ -53,20 +53,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | |||
53 | 53 | ||
54 | 4. Overview and features | 54 | 4. Overview and features |
55 | ======================== | 55 | ======================== |
56 | This driver attempts to support the video interface of the devices mounting the | 56 | This driver attempts to support the video interface of the devices assembling |
57 | SONiX SN9C101, SN9C102 and SN9C103 PC Camera Controllers. | 57 | the SONiX SN9C101, SN9C102, SN9C103, SN9C105 and SN9C120 PC Camera Controllers |
58 | 58 | ("SN9C1xx" from now on). | |
59 | It's worth to note that SONiX has never collaborated with the author during the | ||
60 | development of this project, despite several requests for enough detailed | ||
61 | specifications of the register tables, compression engine and video data format | ||
62 | of the above chips. Nevertheless, these informations are no longer necessary, | ||
63 | because all the aspects related to these chips are known and have been | ||
64 | described in detail in this documentation. | ||
65 | 59 | ||
66 | The driver relies on the Video4Linux2 and USB core modules. It has been | 60 | The driver relies on the Video4Linux2 and USB core modules. It has been |
67 | designed to run properly on SMP systems as well. | 61 | designed to run properly on SMP systems as well. |
68 | 62 | ||
69 | The latest version of the SN9C10x driver can be found at the following URL: | 63 | The latest version of the SN9C1xx driver can be found at the following URL: |
70 | http://www.linux-projects.org/ | 64 | http://www.linux-projects.org/ |
71 | 65 | ||
72 | Some of the features of the driver are: | 66 | Some of the features of the driver are: |
@@ -85,11 +79,11 @@ Some of the features of the driver are: | |||
85 | high compression quality (see also "Notes for V4L2 application developers" | 79 | high compression quality (see also "Notes for V4L2 application developers" |
86 | and "Video frame formats" paragraphs); | 80 | and "Video frame formats" paragraphs); |
87 | - full support for the capabilities of many of the possible image sensors that | 81 | - full support for the capabilities of many of the possible image sensors that |
88 | can be connected to the SN9C10x bridges, including, for instance, red, green, | 82 | can be connected to the SN9C1xx bridges, including, for instance, red, green, |
89 | blue and global gain adjustments and exposure (see "Supported devices" | 83 | blue and global gain adjustments and exposure (see "Supported devices" |
90 | paragraph for details); | 84 | paragraph for details); |
91 | - use of default color settings for sunlight conditions; | 85 | - use of default color settings for sunlight conditions; |
92 | - dynamic I/O interface for both SN9C10x and image sensor control and | 86 | - dynamic I/O interface for both SN9C1xx and image sensor control and |
93 | monitoring (see "Optional device control through 'sysfs'" paragraph); | 87 | monitoring (see "Optional device control through 'sysfs'" paragraph); |
94 | - dynamic driver control thanks to various module parameters (see "Module | 88 | - dynamic driver control thanks to various module parameters (see "Module |
95 | parameters" paragraph); | 89 | parameters" paragraph); |
@@ -130,8 +124,8 @@ necessary: | |||
130 | CONFIG_USB_UHCI_HCD=m | 124 | CONFIG_USB_UHCI_HCD=m |
131 | CONFIG_USB_OHCI_HCD=m | 125 | CONFIG_USB_OHCI_HCD=m |
132 | 126 | ||
133 | The SN9C103 controller also provides a built-in microphone interface. It is | 127 | The SN9C103, SN9c105 and SN9C120 controllers also provide a built-in microphone |
134 | supported by the USB Audio driver thanks to the ALSA API: | 128 | interface. It is supported by the USB Audio driver thanks to the ALSA API: |
135 | 129 | ||
136 | # Sound | 130 | # Sound |
137 | # | 131 | # |
@@ -155,18 +149,27 @@ And finally: | |||
155 | 6. Module loading | 149 | 6. Module loading |
156 | ================= | 150 | ================= |
157 | To use the driver, it is necessary to load the "sn9c102" module into memory | 151 | To use the driver, it is necessary to load the "sn9c102" module into memory |
158 | after every other module required: "videodev", "usbcore" and, depending on | 152 | after every other module required: "videodev", "v4l2_common", "compat_ioctl32", |
159 | the USB host controller you have, "ehci-hcd", "uhci-hcd" or "ohci-hcd". | 153 | "usbcore" and, depending on the USB host controller you have, "ehci-hcd", |
154 | "uhci-hcd" or "ohci-hcd". | ||
160 | 155 | ||
161 | Loading can be done as shown below: | 156 | Loading can be done as shown below: |
162 | 157 | ||
163 | [root@localhost home]# modprobe sn9c102 | 158 | [root@localhost home]# modprobe sn9c102 |
164 | 159 | ||
165 | At this point the devices should be recognized. You can invoke "dmesg" to | 160 | Note that the module is called "sn9c102" for historic reasons, althought it |
166 | analyze kernel messages and verify that the loading process has gone well: | 161 | does not just support the SN9C102. |
162 | |||
163 | At this point all the devices supported by the driver and connected to the USB | ||
164 | ports should be recognized. You can invoke "dmesg" to analyze kernel messages | ||
165 | and verify that the loading process has gone well: | ||
167 | 166 | ||
168 | [user@localhost home]$ dmesg | 167 | [user@localhost home]$ dmesg |
169 | 168 | ||
169 | or, to isolate all the kernel messages generated by the driver: | ||
170 | |||
171 | [user@localhost home]$ dmesg | grep sn9c102 | ||
172 | |||
170 | 173 | ||
171 | 7. Module parameters | 174 | 7. Module parameters |
172 | ==================== | 175 | ==================== |
@@ -198,10 +201,11 @@ Default: 0 | |||
198 | ------------------------------------------------------------------------------- | 201 | ------------------------------------------------------------------------------- |
199 | Name: frame_timeout | 202 | Name: frame_timeout |
200 | Type: uint array (min = 0, max = 64) | 203 | Type: uint array (min = 0, max = 64) |
201 | Syntax: <n[,...]> | 204 | Syntax: <0|n[,...]> |
202 | Description: Timeout for a video frame in seconds. This parameter is | 205 | Description: Timeout for a video frame in seconds before returning an I/O |
203 | specific for each detected camera. This parameter can be | 206 | error; 0 for infinity. This parameter is specific for each |
204 | changed at runtime thanks to the /sys filesystem interface. | 207 | detected camera and can be changed at runtime thanks to the |
208 | /sys filesystem interface. | ||
205 | Default: 2 | 209 | Default: 2 |
206 | ------------------------------------------------------------------------------- | 210 | ------------------------------------------------------------------------------- |
207 | Name: debug | 211 | Name: debug |
@@ -223,20 +227,21 @@ Default: 2 | |||
223 | 8. Optional device control through "sysfs" [1] | 227 | 8. Optional device control through "sysfs" [1] |
224 | ========================================== | 228 | ========================================== |
225 | If the kernel has been compiled with the CONFIG_VIDEO_ADV_DEBUG option enabled, | 229 | If the kernel has been compiled with the CONFIG_VIDEO_ADV_DEBUG option enabled, |
226 | it is possible to read and write both the SN9C10x and the image sensor | 230 | it is possible to read and write both the SN9C1xx and the image sensor |
227 | registers by using the "sysfs" filesystem interface. | 231 | registers by using the "sysfs" filesystem interface. |
228 | 232 | ||
229 | Every time a supported device is recognized, a write-only file named "green" is | 233 | Every time a supported device is recognized, a write-only file named "green" is |
230 | created in the /sys/class/video4linux/videoX directory. You can set the green | 234 | created in the /sys/class/video4linux/videoX directory. You can set the green |
231 | channel's gain by writing the desired value to it. The value may range from 0 | 235 | channel's gain by writing the desired value to it. The value may range from 0 |
232 | to 15 for SN9C101 or SN9C102 bridges, from 0 to 127 for SN9C103 bridges. | 236 | to 15 for the SN9C101 or SN9C102 bridges, from 0 to 127 for the SN9C103, |
233 | Similarly, only for SN9C103 controllers, blue and red gain control files are | 237 | SN9C105 and SN9C120 bridges. |
234 | available in the same directory, for which accepted values may range from 0 to | 238 | Similarly, only for the SN9C103, SN9C105 and SN9120 controllers, blue and red |
235 | 127. | 239 | gain control files are available in the same directory, for which accepted |
240 | values may range from 0 to 127. | ||
236 | 241 | ||
237 | There are other four entries in the directory above for each registered camera: | 242 | There are other four entries in the directory above for each registered camera: |
238 | "reg", "val", "i2c_reg" and "i2c_val". The first two files control the | 243 | "reg", "val", "i2c_reg" and "i2c_val". The first two files control the |
239 | SN9C10x bridge, while the other two control the sensor chip. "reg" and | 244 | SN9C1xx bridge, while the other two control the sensor chip. "reg" and |
240 | "i2c_reg" hold the values of the current register index where the following | 245 | "i2c_reg" hold the values of the current register index where the following |
241 | reading/writing operations are addressed at through "val" and "i2c_val". Their | 246 | reading/writing operations are addressed at through "val" and "i2c_val". Their |
242 | use is not intended for end-users. Note that "i2c_reg" and "i2c_val" will not | 247 | use is not intended for end-users. Note that "i2c_reg" and "i2c_val" will not |
@@ -259,61 +264,84 @@ Now let's set the green gain's register of the SN9C101 or SN9C102 chips to 2: | |||
259 | [root@localhost #] echo 0x11 > reg | 264 | [root@localhost #] echo 0x11 > reg |
260 | [root@localhost #] echo 2 > val | 265 | [root@localhost #] echo 2 > val |
261 | 266 | ||
262 | Note that the SN9C10x always returns 0 when some of its registers are read. | 267 | Note that the SN9C1xx always returns 0 when some of its registers are read. |
263 | To avoid race conditions, all the I/O accesses to the above files are | 268 | To avoid race conditions, all the I/O accesses to the above files are |
264 | serialized. | 269 | serialized. |
265 | |||
266 | The sysfs interface also provides the "frame_header" entry, which exports the | 270 | The sysfs interface also provides the "frame_header" entry, which exports the |
267 | frame header of the most recent requested and captured video frame. The header | 271 | frame header of the most recent requested and captured video frame. The header |
268 | is always 18-bytes long and is appended to every video frame by the SN9C10x | 272 | is always 18-bytes long and is appended to every video frame by the SN9C1xx |
269 | controllers. As an example, this additional information can be used by the user | 273 | controllers. As an example, this additional information can be used by the user |
270 | application for implementing auto-exposure features via software. | 274 | application for implementing auto-exposure features via software. |
271 | 275 | ||
272 | The following table describes the frame header: | 276 | The following table describes the frame header exported by the SN9C101 and |
273 | 277 | SN9C102: | |
274 | Byte # Value Description | 278 | |
275 | ------ ----- ----------- | 279 | Byte # Value or bits Description |
276 | 0x00 0xFF Frame synchronisation pattern. | 280 | ------ ------------- ----------- |
277 | 0x01 0xFF Frame synchronisation pattern. | 281 | 0x00 0xFF Frame synchronisation pattern |
278 | 0x02 0x00 Frame synchronisation pattern. | 282 | 0x01 0xFF Frame synchronisation pattern |
279 | 0x03 0xC4 Frame synchronisation pattern. | 283 | 0x02 0x00 Frame synchronisation pattern |
280 | 0x04 0xC4 Frame synchronisation pattern. | 284 | 0x03 0xC4 Frame synchronisation pattern |
281 | 0x05 0x96 Frame synchronisation pattern. | 285 | 0x04 0xC4 Frame synchronisation pattern |
282 | 0x06 0xXX Unknown meaning. The exact value depends on the chip; | 286 | 0x05 0x96 Frame synchronisation pattern |
283 | possible values are 0x00, 0x01 and 0x20. | 287 | 0x06 [3:0] Read channel gain control = (1+R_GAIN/8) |
284 | 0x07 0xXX Variable value, whose bits are ff00uzzc, where ff is a | 288 | [7:4] Blue channel gain control = (1+B_GAIN/8) |
285 | frame counter, u is unknown, zz is a size indicator | 289 | 0x07 [ 0 ] Compression mode. 0=No compression, 1=Compression enabled |
286 | (00 = VGA, 01 = SIF, 10 = QSIF) and c stands for | 290 | [2:1] Maximum scale factor for compression |
287 | "compression enabled" (1 = yes, 0 = no). | 291 | [ 3 ] 1 = USB fifo(2K bytes) is full |
288 | 0x08 0xXX Brightness sum inside Auto-Exposure area (low-byte). | 292 | [ 4 ] 1 = Digital gain is finish |
289 | 0x09 0xXX Brightness sum inside Auto-Exposure area (high-byte). | 293 | [ 5 ] 1 = Exposure is finish |
290 | For a pure white image, this number will be equal to 500 | 294 | [7:6] Frame index |
291 | times the area of the specified AE area. For images | 295 | 0x08 [7:0] Y sum inside Auto-Exposure area (low-byte) |
292 | that are not pure white, the value scales down according | 296 | 0x09 [7:0] Y sum inside Auto-Exposure area (high-byte) |
293 | to relative whiteness. | 297 | where Y sum = (R/4 + 5G/16 + B/8) / 32 |
294 | 0x0A 0xXX Brightness sum outside Auto-Exposure area (low-byte). | 298 | 0x0A [7:0] Y sum outside Auto-Exposure area (low-byte) |
295 | 0x0B 0xXX Brightness sum outside Auto-Exposure area (high-byte). | 299 | 0x0B [7:0] Y sum outside Auto-Exposure area (high-byte) |
296 | For a pure white image, this number will be equal to 125 | 300 | where Y sum = (R/4 + 5G/16 + B/8) / 128 |
297 | times the area outside of the specified AE area. For | 301 | 0x0C 0xXX Not used |
298 | images that are not pure white, the value scales down | 302 | 0x0D 0xXX Not used |
299 | according to relative whiteness. | 303 | 0x0E 0xXX Not used |
300 | according to relative whiteness. | 304 | 0x0F 0xXX Not used |
301 | 305 | 0x10 0xXX Not used | |
302 | The following bytes are used by the SN9C103 bridge only: | 306 | 0x11 0xXX Not used |
303 | 307 | ||
304 | 0x0C 0xXX Unknown meaning | 308 | The following table describes the frame header exported by the SN9C103: |
305 | 0x0D 0xXX Unknown meaning | 309 | |
306 | 0x0E 0xXX Unknown meaning | 310 | Byte # Value or bits Description |
307 | 0x0F 0xXX Unknown meaning | 311 | ------ ------------- ----------- |
308 | 0x10 0xXX Unknown meaning | 312 | 0x00 0xFF Frame synchronisation pattern |
309 | 0x11 0xXX Unknown meaning | 313 | 0x01 0xFF Frame synchronisation pattern |
314 | 0x02 0x00 Frame synchronisation pattern | ||
315 | 0x03 0xC4 Frame synchronisation pattern | ||
316 | 0x04 0xC4 Frame synchronisation pattern | ||
317 | 0x05 0x96 Frame synchronisation pattern | ||
318 | 0x06 [6:0] Read channel gain control = (1/2+R_GAIN/64) | ||
319 | 0x07 [6:0] Blue channel gain control = (1/2+B_GAIN/64) | ||
320 | [7:4] | ||
321 | 0x08 [ 0 ] Compression mode. 0=No compression, 1=Compression enabled | ||
322 | [2:1] Maximum scale factor for compression | ||
323 | [ 3 ] 1 = USB fifo(2K bytes) is full | ||
324 | [ 4 ] 1 = Digital gain is finish | ||
325 | [ 5 ] 1 = Exposure is finish | ||
326 | [7:6] Frame index | ||
327 | 0x09 [7:0] Y sum inside Auto-Exposure area (low-byte) | ||
328 | 0x0A [7:0] Y sum inside Auto-Exposure area (high-byte) | ||
329 | where Y sum = (R/4 + 5G/16 + B/8) / 32 | ||
330 | 0x0B [7:0] Y sum outside Auto-Exposure area (low-byte) | ||
331 | 0x0C [7:0] Y sum outside Auto-Exposure area (high-byte) | ||
332 | where Y sum = (R/4 + 5G/16 + B/8) / 128 | ||
333 | 0x0D [1:0] Audio frame number | ||
334 | [ 2 ] 1 = Audio is recording | ||
335 | 0x0E [7:0] Audio summation (low-byte) | ||
336 | 0x0F [7:0] Audio summation (high-byte) | ||
337 | 0x10 [7:0] Audio sample count | ||
338 | 0x11 [7:0] Audio peak data in audio frame | ||
310 | 339 | ||
311 | The AE area (sx, sy, ex, ey) in the active window can be set by programming the | 340 | The AE area (sx, sy, ex, ey) in the active window can be set by programming the |
312 | registers 0x1c, 0x1d, 0x1e and 0x1f of the SN9C10x controllers, where one unit | 341 | registers 0x1c, 0x1d, 0x1e and 0x1f of the SN9C1xx controllers, where one unit |
313 | corresponds to 32 pixels. | 342 | corresponds to 32 pixels. |
314 | 343 | ||
315 | [1] Part of the meaning of the frame header has been documented by Bertrik | 344 | [1] The frame headers exported by the SN9C105 and SN9C120 are not described. |
316 | Sikken. | ||
317 | 345 | ||
318 | 346 | ||
319 | 9. Supported devices | 347 | 9. Supported devices |
@@ -323,15 +351,19 @@ here. They have never collaborated with the author, so no advertising. | |||
323 | 351 | ||
324 | From the point of view of a driver, what unambiguously identify a device are | 352 | From the point of view of a driver, what unambiguously identify a device are |
325 | its vendor and product USB identifiers. Below is a list of known identifiers of | 353 | its vendor and product USB identifiers. Below is a list of known identifiers of |
326 | devices mounting the SN9C10x PC camera controllers: | 354 | devices assembling the SN9C1xx PC camera controllers: |
327 | 355 | ||
328 | Vendor ID Product ID | 356 | Vendor ID Product ID |
329 | --------- ---------- | 357 | --------- ---------- |
358 | 0x0471 0x0327 | ||
359 | 0x0471 0x0328 | ||
330 | 0x0c45 0x6001 | 360 | 0x0c45 0x6001 |
331 | 0x0c45 0x6005 | 361 | 0x0c45 0x6005 |
332 | 0x0c45 0x6007 | 362 | 0x0c45 0x6007 |
333 | 0x0c45 0x6009 | 363 | 0x0c45 0x6009 |
334 | 0x0c45 0x600d | 364 | 0x0c45 0x600d |
365 | 0x0c45 0x6011 | ||
366 | 0x0c45 0x6019 | ||
335 | 0x0c45 0x6024 | 367 | 0x0c45 0x6024 |
336 | 0x0c45 0x6025 | 368 | 0x0c45 0x6025 |
337 | 0x0c45 0x6028 | 369 | 0x0c45 0x6028 |
@@ -342,6 +374,7 @@ Vendor ID Product ID | |||
342 | 0x0c45 0x602d | 374 | 0x0c45 0x602d |
343 | 0x0c45 0x602e | 375 | 0x0c45 0x602e |
344 | 0x0c45 0x6030 | 376 | 0x0c45 0x6030 |
377 | 0x0c45 0x603f | ||
345 | 0x0c45 0x6080 | 378 | 0x0c45 0x6080 |
346 | 0x0c45 0x6082 | 379 | 0x0c45 0x6082 |
347 | 0x0c45 0x6083 | 380 | 0x0c45 0x6083 |
@@ -368,24 +401,40 @@ Vendor ID Product ID | |||
368 | 0x0c45 0x60bb | 401 | 0x0c45 0x60bb |
369 | 0x0c45 0x60bc | 402 | 0x0c45 0x60bc |
370 | 0x0c45 0x60be | 403 | 0x0c45 0x60be |
404 | 0x0c45 0x60c0 | ||
405 | 0x0c45 0x60c8 | ||
406 | 0x0c45 0x60cc | ||
407 | 0x0c45 0x60ea | ||
408 | 0x0c45 0x60ec | ||
409 | 0x0c45 0x60fa | ||
410 | 0x0c45 0x60fb | ||
411 | 0x0c45 0x60fc | ||
412 | 0x0c45 0x60fe | ||
413 | 0x0c45 0x6130 | ||
414 | 0x0c45 0x613a | ||
415 | 0x0c45 0x613b | ||
416 | 0x0c45 0x613c | ||
417 | 0x0c45 0x613e | ||
371 | 418 | ||
372 | The list above does not imply that all those devices work with this driver: up | 419 | The list above does not imply that all those devices work with this driver: up |
373 | until now only the ones that mount the following image sensors are supported; | 420 | until now only the ones that assemble the following image sensors are |
374 | kernel messages will always tell you whether this is the case: | 421 | supported; kernel messages will always tell you whether this is the case (see |
422 | "Module loading" paragraph): | ||
375 | 423 | ||
376 | Model Manufacturer | 424 | Model Manufacturer |
377 | ----- ------------ | 425 | ----- ------------ |
378 | HV7131D Hynix Semiconductor, Inc. | 426 | HV7131D Hynix Semiconductor, Inc. |
379 | MI-0343 Micron Technology, Inc. | 427 | MI-0343 Micron Technology, Inc. |
380 | OV7630 OmniVision Technologies, Inc. | 428 | OV7630 OmniVision Technologies, Inc. |
429 | OV7660 OmniVision Technologies, Inc. | ||
381 | PAS106B PixArt Imaging, Inc. | 430 | PAS106B PixArt Imaging, Inc. |
382 | PAS202BCA PixArt Imaging, Inc. | 431 | PAS202BCA PixArt Imaging, Inc. |
383 | PAS202BCB PixArt Imaging, Inc. | 432 | PAS202BCB PixArt Imaging, Inc. |
384 | TAS5110C1B Taiwan Advanced Sensor Corporation | 433 | TAS5110C1B Taiwan Advanced Sensor Corporation |
385 | TAS5130D1B Taiwan Advanced Sensor Corporation | 434 | TAS5130D1B Taiwan Advanced Sensor Corporation |
386 | 435 | ||
387 | All the available control settings of each image sensor are supported through | 436 | Some of the available control settings of each image sensor are supported |
388 | the V4L2 interface. | 437 | through the V4L2 interface. |
389 | 438 | ||
390 | Donations of new models for further testing and support would be much | 439 | Donations of new models for further testing and support would be much |
391 | appreciated. Non-available hardware will not be supported by the author of this | 440 | appreciated. Non-available hardware will not be supported by the author of this |
@@ -429,12 +478,15 @@ supplied by this driver). | |||
429 | 478 | ||
430 | 11. Video frame formats [1] | 479 | 11. Video frame formats [1] |
431 | ======================= | 480 | ======================= |
432 | The SN9C10x PC Camera Controllers can send images in two possible video | 481 | The SN9C1xx PC Camera Controllers can send images in two possible video |
433 | formats over the USB: either native "Sequential RGB Bayer" or Huffman | 482 | formats over the USB: either native "Sequential RGB Bayer" or compressed. |
434 | compressed. The latter is used to achieve high frame rates. The current video | 483 | The compression is used to achieve high frame rates. With regard to the |
435 | format may be selected or queried from the user application by calling the | 484 | SN9C101, SN9C102 and SN9C103, the compression is based on the Huffman encoding |
436 | VIDIOC_S_FMT or VIDIOC_G_FMT ioctl's, as described in the V4L2 API | 485 | algorithm described below, while the SN9C105 and SN9C120 the compression is |
437 | specifications. | 486 | based on the JPEG standard. |
487 | The current video format may be selected or queried from the user application | ||
488 | by calling the VIDIOC_S_FMT or VIDIOC_G_FMT ioctl's, as described in the V4L2 | ||
489 | API specifications. | ||
438 | 490 | ||
439 | The name "Sequential Bayer" indicates the organization of the red, green and | 491 | The name "Sequential Bayer" indicates the organization of the red, green and |
440 | blue pixels in one video frame. Each pixel is associated with a 8-bit long | 492 | blue pixels in one video frame. Each pixel is associated with a 8-bit long |
@@ -447,14 +499,14 @@ G[m] R[m+1] G[m+2] R[m+2] ... G[2m-2] R[2m-1] | |||
447 | ... G[n(m-2)] R[n(m-1)] | 499 | ... G[n(m-2)] R[n(m-1)] |
448 | 500 | ||
449 | The above matrix also represents the sequential or progressive read-out mode of | 501 | The above matrix also represents the sequential or progressive read-out mode of |
450 | the (n, m) Bayer color filter array used in many CCD/CMOS image sensors. | 502 | the (n, m) Bayer color filter array used in many CCD or CMOS image sensors. |
451 | 503 | ||
452 | One compressed video frame consists of a bitstream that encodes for every R, G, | 504 | The Huffman compressed video frame consists of a bitstream that encodes for |
453 | or B pixel the difference between the value of the pixel itself and some | 505 | every R, G, or B pixel the difference between the value of the pixel itself and |
454 | reference pixel value. Pixels are organised in the Bayer pattern and the Bayer | 506 | some reference pixel value. Pixels are organised in the Bayer pattern and the |
455 | sub-pixels are tracked individually and alternatingly. For example, in the | 507 | Bayer sub-pixels are tracked individually and alternatingly. For example, in |
456 | first line values for the B and G1 pixels are alternatingly encoded, while in | 508 | the first line values for the B and G1 pixels are alternatingly encoded, while |
457 | the second line values for the G2 and R pixels are alternatingly encoded. | 509 | in the second line values for the G2 and R pixels are alternatingly encoded. |
458 | 510 | ||
459 | The pixel reference value is calculated as follows: | 511 | The pixel reference value is calculated as follows: |
460 | - the 4 top left pixels are encoded in raw uncompressed 8-bit format; | 512 | - the 4 top left pixels are encoded in raw uncompressed 8-bit format; |
@@ -470,8 +522,9 @@ The pixel reference value is calculated as follows: | |||
470 | decoding. | 522 | decoding. |
471 | 523 | ||
472 | The algorithm purely describes the conversion from compressed Bayer code used | 524 | The algorithm purely describes the conversion from compressed Bayer code used |
473 | in the SN9C10x chips to uncompressed Bayer. Additional steps are required to | 525 | in the SN9C101, SN9C102 and SN9C103 chips to uncompressed Bayer. Additional |
474 | convert this to a color image (i.e. a color interpolation algorithm). | 526 | steps are required to convert this to a color image (i.e. a color interpolation |
527 | algorithm). | ||
475 | 528 | ||
476 | The following Huffman codes have been found: | 529 | The following Huffman codes have been found: |
477 | 0: +0 (relative to reference pixel value) | 530 | 0: +0 (relative to reference pixel value) |
@@ -506,13 +559,18 @@ order): | |||
506 | - Philippe Coval for having helped testing the PAS202BCA image sensor; | 559 | - Philippe Coval for having helped testing the PAS202BCA image sensor; |
507 | - Joao Rodrigo Fuzaro, Joao Limirio, Claudio Filho and Caio Begotti for the | 560 | - Joao Rodrigo Fuzaro, Joao Limirio, Claudio Filho and Caio Begotti for the |
508 | donation of a webcam; | 561 | donation of a webcam; |
562 | - Dennis Heitmann for the donation of a webcam; | ||
509 | - Jon Hollstrom for the donation of a webcam; | 563 | - Jon Hollstrom for the donation of a webcam; |
564 | - Nick McGill for the donation of a webcam; | ||
510 | - Carlos Eduardo Medaglia Dyonisio, who added the support for the PAS202BCB | 565 | - Carlos Eduardo Medaglia Dyonisio, who added the support for the PAS202BCB |
511 | image sensor; | 566 | image sensor; |
512 | - Stefano Mozzi, who donated 45 EU; | 567 | - Stefano Mozzi, who donated 45 EU; |
513 | - Andrew Pearce for the donation of a webcam; | 568 | - Andrew Pearce for the donation of a webcam; |
569 | - John Pullan for the donation of a webcam; | ||
514 | - Bertrik Sikken, who reverse-engineered and documented the Huffman compression | 570 | - Bertrik Sikken, who reverse-engineered and documented the Huffman compression |
515 | algorithm used in the SN9C10x controllers and implemented the first decoder; | 571 | algorithm used in the SN9C101, SN9C102 and SN9C103 controllers and |
572 | implemented the first decoder; | ||
516 | - Mizuno Takafumi for the donation of a webcam; | 573 | - Mizuno Takafumi for the donation of a webcam; |
517 | - an "anonymous" donator (who didn't want his name to be revealed) for the | 574 | - an "anonymous" donator (who didn't want his name to be revealed) for the |
518 | donation of a webcam. | 575 | donation of a webcam. |
576 | - an anonymous donator for the donation of four webcams. | ||
diff --git a/Documentation/video4linux/zc0301.txt b/Documentation/video4linux/zc0301.txt index f406f5e80046..befdfdacdc5b 100644 --- a/Documentation/video4linux/zc0301.txt +++ b/Documentation/video4linux/zc0301.txt | |||
@@ -23,7 +23,7 @@ Index | |||
23 | 23 | ||
24 | 1. Copyright | 24 | 1. Copyright |
25 | ============ | 25 | ============ |
26 | Copyright (C) 2006 by Luca Risolia <luca.risolia@studio.unibo.it> | 26 | Copyright (C) 2006-2007 by Luca Risolia <luca.risolia@studio.unibo.it> |
27 | 27 | ||
28 | 28 | ||
29 | 2. Disclaimer | 29 | 2. Disclaimer |
@@ -125,8 +125,9 @@ And finally: | |||
125 | 6. Module loading | 125 | 6. Module loading |
126 | ================= | 126 | ================= |
127 | To use the driver, it is necessary to load the "zc0301" module into memory | 127 | To use the driver, it is necessary to load the "zc0301" module into memory |
128 | after every other module required: "videodev", "usbcore" and, depending on | 128 | after every other module required: "videodev", "v4l2_common", "compat_ioctl32", |
129 | the USB host controller you have, "ehci-hcd", "uhci-hcd" or "ohci-hcd". | 129 | "usbcore" and, depending on the USB host controller you have, "ehci-hcd", |
130 | "uhci-hcd" or "ohci-hcd". | ||
130 | 131 | ||
131 | Loading can be done as shown below: | 132 | Loading can be done as shown below: |
132 | 133 | ||
@@ -211,12 +212,11 @@ Vendor ID Product ID | |||
211 | 0x041e 0x4036 | 212 | 0x041e 0x4036 |
212 | 0x041e 0x403a | 213 | 0x041e 0x403a |
213 | 0x0458 0x7007 | 214 | 0x0458 0x7007 |
214 | 0x0458 0x700C | 215 | 0x0458 0x700c |
215 | 0x0458 0x700f | 216 | 0x0458 0x700f |
216 | 0x046d 0x08ae | 217 | 0x046d 0x08ae |
217 | 0x055f 0xd003 | 218 | 0x055f 0xd003 |
218 | 0x055f 0xd004 | 219 | 0x055f 0xd004 |
219 | 0x046d 0x08ae | ||
220 | 0x0ac8 0x0301 | 220 | 0x0ac8 0x0301 |
221 | 0x0ac8 0x301b | 221 | 0x0ac8 0x301b |
222 | 0x0ac8 0x303b | 222 | 0x0ac8 0x303b |