Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee13...
[deliverable/linux.git] / Documentation / video4linux / cx2341x / fw-decoder-api.txt
1 Decoder firmware API description
2 ================================
3
4 Note: this API is part of the decoder firmware, so it's cx23415 only.
5
6 -------------------------------------------------------------------------------
7
8 Name CX2341X_DEC_PING_FW
9 Enum 0/0x00
10 Description
11 This API call does nothing. It may be used to check if the firmware
12 is responding.
13
14 -------------------------------------------------------------------------------
15
16 Name CX2341X_DEC_START_PLAYBACK
17 Enum 1/0x01
18 Description
19 Begin or resume playback.
20 Param[0]
21 0 based frame number in GOP to begin playback from.
22 Param[1]
23 Specifies the number of muted audio frames to play before normal
24 audio resumes.
25
26 -------------------------------------------------------------------------------
27
28 Name CX2341X_DEC_STOP_PLAYBACK
29 Enum 2/0x02
30 Description
31 Ends playback and clears all decoder buffers. If PTS is not zero,
32 playback stops at specified PTS.
33 Param[0]
34 Display 0=last frame, 1=black
35 Param[1]
36 PTS low
37 Param[2]
38 PTS high
39
40 -------------------------------------------------------------------------------
41
42 Name CX2341X_DEC_SET_PLAYBACK_SPEED
43 Enum 3/0x03
44 Description
45 Playback stream at speed other than normal. There are two modes of
46 operation:
47 Smooth: host transfers entire stream and firmware drops unused
48 frames.
49 Coarse: host drops frames based on indexing as required to achieve
50 desired speed.
51 Param[0]
52 Bitmap:
53 0:7 0 normal
54 1 fast only "1.5 times"
55 n nX fast, 1/nX slow
56 30 Framedrop:
57 '0' during 1.5 times play, every other B frame is dropped
58 '1' during 1.5 times play, stream is unchanged (bitrate
59 must not exceed 8mbps)
60 31 Speed:
61 '0' slow
62 '1' fast
63 Param[1]
64 Direction: 0=forward, 1=reverse
65 Param[2]
66 Picture mask:
67 1=I frames
68 3=I, P frames
69 7=I, P, B frames
70 Param[3]
71 B frames per GOP (for reverse play only)
72 Param[4]
73 Mute audio: 0=disable, 1=enable
74 Param[5]
75 Display 0=frame, 1=field
76 Param[6]
77 Specifies the number of muted audio frames to play before normal audio
78 resumes.
79
80 -------------------------------------------------------------------------------
81
82 Name CX2341X_DEC_STEP_VIDEO
83 Enum 5/0x05
84 Description
85 Each call to this API steps the playback to the next unit defined below
86 in the current playback direction.
87 Param[0]
88 0=frame, 1=top field, 2=bottom field
89
90 -------------------------------------------------------------------------------
91
92 Name CX2341X_DEC_SET_DMA_BLOCK_SIZE
93 Enum 8/0x08
94 Description
95 Set DMA transfer block size. Counterpart to API 0xC9
96 Param[0]
97 DMA transfer block size in bytes. A different size may be specified
98 when issuing the DMA transfer command.
99
100 -------------------------------------------------------------------------------
101
102 Name CX2341X_DEC_GET_XFER_INFO
103 Enum 9/0x09
104 Description
105 This API call may be used to detect an end of stream condition.
106 Result[0]
107 Stream type
108 Result[1]
109 Address offset
110 Result[2]
111 Maximum bytes to transfer
112 Result[3]
113 Buffer fullness
114
115 -------------------------------------------------------------------------------
116
117 Name CX2341X_DEC_GET_DMA_STATUS
118 Enum 10/0x0A
119 Description
120 Status of the last DMA transfer
121 Result[0]
122 Bit 1 set means transfer complete
123 Bit 2 set means DMA error
124 Bit 3 set means linked list error
125 Result[1]
126 DMA type: 0=MPEG, 1=OSD, 2=YUV
127
128 -------------------------------------------------------------------------------
129
130 Name CX2341X_DEC_SCHED_DMA_FROM_HOST
131 Enum 11/0x0B
132 Description
133 Setup DMA from host operation. Counterpart to API 0xCC
134 Param[0]
135 Memory address of link list
136 Param[1]
137 Total # of bytes to transfer
138 Param[2]
139 DMA type (0=MPEG, 1=OSD, 2=YUV)
140
141 -------------------------------------------------------------------------------
142
143 Name CX2341X_DEC_PAUSE_PLAYBACK
144 Enum 13/0x0D
145 Description
146 Freeze playback immediately. In this mode, when internal buffers are
147 full, no more data will be accepted and data request IRQs will be
148 masked.
149 Param[0]
150 Display: 0=last frame, 1=black
151
152 -------------------------------------------------------------------------------
153
154 Name CX2341X_DEC_HALT_FW
155 Enum 14/0x0E
156 Description
157 The firmware is halted and no further API calls are serviced until
158 the firmware is uploaded again.
159
160 -------------------------------------------------------------------------------
161
162 Name CX2341X_DEC_SET_STANDARD
163 Enum 16/0x10
164 Description
165 Selects display standard
166 Param[0]
167 0=NTSC, 1=PAL
168
169 -------------------------------------------------------------------------------
170
171 Name CX2341X_DEC_GET_VERSION
172 Enum 17/0x11
173 Description
174 Returns decoder firmware version information
175 Result[0]
176 Version bitmask:
177 Bits 0:15 build
178 Bits 16:23 minor
179 Bits 24:31 major
180
181 -------------------------------------------------------------------------------
182
183 Name CX2341X_DEC_SET_STREAM_INPUT
184 Enum 20/0x14
185 Description
186 Select decoder stream input port
187 Param[0]
188 0=memory (default), 1=streaming
189
190 -------------------------------------------------------------------------------
191
192 Name CX2341X_DEC_GET_TIMING_INFO
193 Enum 21/0x15
194 Description
195 Returns timing information from start of playback
196 Result[0]
197 Frame count by decode order
198 Result[1]
199 Video PTS bits 0:31 by display order
200 Result[2]
201 Video PTS bit 32 by display order
202 Result[3]
203 SCR bits 0:31 by display order
204 Result[4]
205 SCR bit 32 by display order
206
207 -------------------------------------------------------------------------------
208
209 Name CX2341X_DEC_SET_AUDIO_MODE
210 Enum 22/0x16
211 Description
212 Select audio mode
213 Param[0]
214 Dual mono mode action
215 Param[1]
216 Stereo mode action:
217 0=Stereo, 1=Left, 2=Right, 3=Mono, 4=Swap, -1=Unchanged
218
219 -------------------------------------------------------------------------------
220
221 Name CX2341X_DEC_SET_EVENT_NOTIFICATION
222 Enum 23/0x17
223 Description
224 Setup firmware to notify the host about a particular event.
225 Counterpart to API 0xD5
226 Param[0]
227 Event: 0=Audio mode change between stereo and dual channel
228 Param[1]
229 Notification 0=disabled, 1=enabled
230 Param[2]
231 Interrupt bit
232 Param[3]
233 Mailbox slot, -1 if no mailbox required.
234
235 -------------------------------------------------------------------------------
236
237 Name CX2341X_DEC_SET_DISPLAY_BUFFERS
238 Enum 24/0x18
239 Description
240 Number of display buffers. To decode all frames in reverse playback you
241 must use nine buffers.
242 Param[0]
243 0=six buffers, 1=nine buffers
244
245 -------------------------------------------------------------------------------
246
247 Name CX2341X_DEC_EXTRACT_VBI
248 Enum 25/0x19
249 Description
250 Extracts VBI data
251 Param[0]
252 0=extract from extension & user data, 1=extract from private packets
253 Result[0]
254 VBI table location
255 Result[1]
256 VBI table size
257
258 -------------------------------------------------------------------------------
259
260 Name CX2341X_DEC_SET_DECODER_SOURCE
261 Enum 26/0x1A
262 Description
263 Selects decoder source. Ensure that the parameters passed to this
264 API match the encoder settings.
265 Param[0]
266 Mode: 0=MPEG from host, 1=YUV from encoder, 2=YUV from host
267 Param[1]
268 YUV picture width
269 Param[2]
270 YUV picture height
271 Param[3]
272 Bitmap: see Param[0] of API 0xBD
273
274 -------------------------------------------------------------------------------
275
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
314 Enum 30/0x1E
315 Description
316 Decoder prebuffering, when enabled up to 128KB are buffered for
317 streams <8mpbs or 640KB for streams >8mbps
318 Param[0]
319 0=off, 1=on
This page took 0.039253 seconds and 6 git commands to generate.