1 Decoder firmware API description
2 ================================
4 Note: this API is part of the decoder firmware, so it's cx23415 only.
6 -------------------------------------------------------------------------------
8 Name CX2341X_DEC_PING_FW
11 This API call does nothing. It may be used to check if the firmware
14 -------------------------------------------------------------------------------
16 Name CX2341X_DEC_START_PLAYBACK
19 Begin or resume playback.
21 0 based frame number in GOP to begin playback from.
23 Specifies the number of muted audio frames to play before normal
24 audio resumes. (This is not implemented in the firmware, leave at 0)
26 -------------------------------------------------------------------------------
28 Name CX2341X_DEC_STOP_PLAYBACK
31 Ends playback and clears all decoder buffers. If PTS is not zero,
32 playback stops at specified PTS.
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.
44 -------------------------------------------------------------------------------
46 Name CX2341X_DEC_SET_PLAYBACK_SPEED
49 Playback stream at speed other than normal. There are two modes of
51 Smooth: host transfers entire stream and firmware drops unused
53 Coarse: host drops frames based on indexing as required to achieve
58 1 fast only "1.5 times"
61 '0' during 1.5 times play, every other B frame is dropped
62 '1' during 1.5 times play, stream is unchanged (bitrate
63 must not exceed 8mbps)
67 Note: n is limited to 2. Anything higher does not result in
68 faster playback. Instead the host should start dropping frames.
70 Direction: 0=forward, 1=reverse
71 Note: to make reverse playback work you have to write full GOPs in
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.
84 Mute audio: 0=disable, 1=enable
86 Display 0=frame, 1=field
88 Specifies the number of muted audio frames to play before normal audio
89 resumes. (Not implemented in the firmware, leave at 0)
91 -------------------------------------------------------------------------------
93 Name CX2341X_DEC_STEP_VIDEO
96 Each call to this API steps the playback to the next unit defined below
97 in the current playback direction.
99 0=frame, 1=top field, 2=bottom field
101 -------------------------------------------------------------------------------
103 Name CX2341X_DEC_SET_DMA_BLOCK_SIZE
106 Set DMA transfer block size. Counterpart to API 0xC9
108 DMA transfer block size in bytes. A different size may be specified
109 when issuing the DMA transfer command.
111 -------------------------------------------------------------------------------
113 Name CX2341X_DEC_GET_XFER_INFO
116 This API call may be used to detect an end of stream condition.
122 Maximum bytes to transfer
126 -------------------------------------------------------------------------------
128 Name CX2341X_DEC_GET_DMA_STATUS
131 Status of the last DMA transfer
133 Bit 1 set means transfer complete
134 Bit 2 set means DMA error
135 Bit 3 set means linked list error
137 DMA type: 0=MPEG, 1=OSD, 2=YUV
139 -------------------------------------------------------------------------------
141 Name CX2341X_DEC_SCHED_DMA_FROM_HOST
144 Setup DMA from host operation. Counterpart to API 0xCC
146 Memory address of link list
148 Total # of bytes to transfer
150 DMA type (0=MPEG, 1=OSD, 2=YUV)
152 -------------------------------------------------------------------------------
154 Name CX2341X_DEC_PAUSE_PLAYBACK
157 Freeze playback immediately. In this mode, when internal buffers are
158 full, no more data will be accepted and data request IRQs will be
161 Display: 0=last frame, 1=black
163 -------------------------------------------------------------------------------
165 Name CX2341X_DEC_HALT_FW
168 The firmware is halted and no further API calls are serviced until
169 the firmware is uploaded again.
171 -------------------------------------------------------------------------------
173 Name CX2341X_DEC_SET_STANDARD
176 Selects display standard
180 -------------------------------------------------------------------------------
182 Name CX2341X_DEC_GET_VERSION
185 Returns decoder firmware version information
192 -------------------------------------------------------------------------------
194 Name CX2341X_DEC_SET_STREAM_INPUT
197 Select decoder stream input port
199 0=memory (default), 1=streaming
201 -------------------------------------------------------------------------------
203 Name CX2341X_DEC_GET_TIMING_INFO
206 Returns timing information from start of playback
208 Frame count by decode order
210 Video PTS bits 0:31 by display order
212 Video PTS bit 32 by display order
214 SCR bits 0:31 by display order
216 SCR bit 32 by display order
218 -------------------------------------------------------------------------------
220 Name CX2341X_DEC_SET_AUDIO_MODE
225 Dual mono mode action
226 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
231 -------------------------------------------------------------------------------
233 Name CX2341X_DEC_SET_EVENT_NOTIFICATION
236 Setup firmware to notify the host about a particular event.
237 Counterpart to API 0xD5
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.
244 Notification 0=disabled, 1=enabled
248 Mailbox slot, -1 if no mailbox required.
250 -------------------------------------------------------------------------------
252 Name CX2341X_DEC_SET_DISPLAY_BUFFERS
255 Number of display buffers. To decode all frames in reverse playback you
256 must use nine buffers.
258 0=six buffers, 1=nine buffers
260 -------------------------------------------------------------------------------
262 Name CX2341X_DEC_EXTRACT_VBI
267 0=extract from extension & user data, 1=extract from private packets
273 -------------------------------------------------------------------------------
275 Name CX2341X_DEC_SET_DECODER_SOURCE
278 Selects decoder source. Ensure that the parameters passed to this
279 API match the encoder settings.
281 Mode: 0=MPEG from host, 1=YUV from encoder, 2=YUV from host
287 Bitmap: see Param[0] of API 0xBD
289 -------------------------------------------------------------------------------
291 Name CX2341X_DEC_SET_PREBUFFERING
294 Decoder prebuffering, when enabled up to 128KB are buffered for
295 streams <8mpbs or 640KB for streams >8mbps