summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaurabh Bipin Chandra2013-09-05 12:33:07 -0500
committerSaurabh Bipin Chandra2013-09-05 12:35:42 -0500
commitade2c1b36422a3302f484d5bc87f6537a1bda8fe (patch)
tree54aba174bee1f957a8a86d0a8d3d98b8b18f77fc /packages/framework_components
parent11191edf8c77fe49a83b70904c62477c940aa5b7 (diff)
downloadhardware-ti-libdce-ade2c1b36422a3302f484d5bc87f6537a1bda8fe.tar.gz
hardware-ti-libdce-ade2c1b36422a3302f484d5bc87f6537a1bda8fe.tar.xz
hardware-ti-libdce-ade2c1b36422a3302f484d5bc87f6537a1bda8fe.zip
[LIBDCE] Update packages with XDAIS, FC Headers
This patch adds XDAIS, FC headers included by the codec header files and makes necessary build changes to include them. Change-Id: I6de3988291e6f4fa229b47a119431d83be1025c2 Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
Diffstat (limited to 'packages/framework_components')
-rw-r--r--packages/framework_components/Makefile.am5
-rw-r--r--packages/framework_components/ti/sdo/fc/ires/hdvicp/ires_hdvicp2.h380
2 files changed, 385 insertions, 0 deletions
diff --git a/packages/framework_components/Makefile.am b/packages/framework_components/Makefile.am
new file mode 100644
index 0000000..a02ce9f
--- /dev/null
+++ b/packages/framework_components/Makefile.am
@@ -0,0 +1,5 @@
1## Process this file with automake to produce Makefile.in
2
3pkg_includedir = $(includedir)/dce
4
5nobase_pkg_include_HEADERS = ti/sdo/fc/ires/hdvicp/ires_hdvicp2.h
diff --git a/packages/framework_components/ti/sdo/fc/ires/hdvicp/ires_hdvicp2.h b/packages/framework_components/ti/sdo/fc/ires/hdvicp/ires_hdvicp2.h
new file mode 100644
index 0000000..c2b0ada
--- /dev/null
+++ b/packages/framework_components/ti/sdo/fc/ires/hdvicp/ires_hdvicp2.h
@@ -0,0 +1,380 @@
1/*
2 * Copyright 2013 by Texas Instruments Incorporated.
3 *
4 */
5
6/*
7 * Copyright (c) 2012 - 2013, Texas Instruments Incorporated
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 *
14 * * Redistributions of source code must retain the above copyright
15 * notice, this list of conditions and the following disclaimer.
16 *
17 * * Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
20 *
21 * * Neither the name of Texas Instruments Incorporated nor the names of
22 * its contributors may be used to endorse or promote products derived
23 * from this software without specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
27 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
29 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
32 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
33 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
35 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 *
37 */
38/**
39 * @file ti/sdo/fc/ires/hdvicp/ires_hdvicp2.h
40 *
41 * @brief IRES PROTOCOL HDVICP2 Interface Definitions -
42 * Allows algorithms to request and receive handles representing
43 * the HDVICP2 resource.
44 */
45
46/**
47 * @addtogroup ti_sdo_fc_ires_hdvicp_IRES_HDVICP2 IRES HDVICP2 Protocol
48 *
49 * Allows algorithms to request and receive handles representing
50 * HDVICP2 resources.
51 */
52
53#ifndef ti_sdo_fc_ires_hdvicp_IRES_HDVICP2_
54#define ti_sdo_fc_ires_hdvicp_IRES_HDVICP2_
55
56/** @ingroup ti_sdo_fc_ires_hdvicp_IRES_HDVICP2 */
57/*@{*/
58
59
60#ifdef __cplusplus
61extern "C" {
62#endif
63
64#include <ti/xdais/xdas.h>
65#include <ti/xdais/ires_common.h>
66#include <ti/xdais/ires.h>
67
68/**
69 * @brief Name used to describe this protocol
70 */
71#define IRES_HDVICP2_PROTOCOLNAME "ti.sdo.fc.ires.hdvicp.hdvicp2"
72
73/**
74 * @brief HDVICP2 module name
75 *
76 * @remarks This name can be passed to Diags_setMask() to enable/disable
77 * logging for this module. For example,
78 * Diags_setMask(HDVICP2_MODNAME"+EX1234567");
79 * enables all Log statements in this module.
80 *
81 * @remarks Diags_setMask() must be called after initialization to take
82 * effect.
83 */
84#define HDVICP2_MODNAME "ti.sdo.fc.ires.hdvicp2"
85
86
87/**
88 * @brief Used to specify the resource required in the protocol args,
89 * resource manager will return
90 * an HDVICP2 resource that is available to the scratch group.
91 */
92#define IRES_HDVICP2_ID_ANY -2
93
94/**
95 * @brief Used to specify the resource required for protocol args, late acquire
96 * implies that no resource is to be returned right now, resource will be
97 * acquired later in the process call, using the acquire fxn returned
98 * via the IRES_HDVICP2_Handle.
99 */
100#define IRES_HDVICP2_ID_LATE_ACQUIRE -1
101
102/**
103 * @brief Invalid address
104 *
105 * @remarks Indicates the address returned in the IRES_HDVICP2_Handle
106 * is not yet valid, and should not be used.
107 */
108#define IRES_HDVICP2_INVALID_ADDR 0xFFFFFFFF
109
110/**
111 * @brief Wait forever (never timeout)
112 *
113 * @remarks Used to indicate to IRES_HDVICP2_Obj::wait() that the call
114 * should never timeout.
115 */
116#define IRES_HDVICP2_TIMEOUTFOREVER ((UInt)(-1))
117
118/**
119 * @brief Unknown late acquire argument.
120 *
121 * @remarks This definition should be used when a particular algorithm
122 * doesn't have an application-provided late acquire argument.
123 * The codec should supply IRES_HDVICP2_UNKNOWNLATEACQUIREARG
124 * as the argument to acquire() in this case.
125 *
126 * @sa XDM_CmdId::XDM_SETLATEACQUIREARG
127 */
128#define IRES_HDVICP2_UNKNOWNLATEACQUIREARG (-1)
129
130/*
131 * Note, we wrap the PROTOCOLVERSION in an ifdef so the
132 * resource managers and algs get this version data placed in their object
133 * files. Apps, which include rman.h, will have this 'NOPROTOCOLREV' defined.
134 */
135#ifndef ti_sdo_fc_ires_NOPROTOCOLREV
136
137/**
138 * @brief Protocol Revision for this resource
139 */
140static IRES_ProtocolRevision IRES_HDVICP2_PROTOCOLREVISION = { 1, 0, 0 };
141
142#endif
143
144/**
145 * @brief Handle to "logical" resource
146 */
147typedef struct IRES_HDVICP2_Obj *IRES_HDVICP2_Handle;
148
149
150/**
151 * @brief Timeout value to be used by implementation of
152 * IRES_HDVICP2_Handle:wait function
153 */
154extern unsigned int ti_sdo_fc_ires_hdvicp_HDVICP2_timeoutVal;
155
156/**
157 * @brief
158 */
159typedef IRES_YieldArgs (*ti_sdo_fc_ires_hdvicp_HDVICP2_GetYieldArgsFxn)
160 (Int scratchId);
161
162/**
163 * @brief
164 */
165typedef Void (*ti_sdo_fc_ires_hdvicp_HDVICP2_YieldFxn)
166 (IRES_YieldResourceType resource, IRES_YieldContextHandle ctxt,
167 IRES_YieldArgs args);
168
169
170
171/**
172 * @brief HDVICP2 Protocol Arguments definition.
173 */
174typedef struct IRES_HDVICP2_ProtocolArgs {
175
176 IRES_ProtocolArgs base; /**< Base protocol Args */
177 XDAS_Int32 id; /**< HDVICP2 resource being requested.
178 *
179 * @remarks Could be 0, 1, 2,
180 * IRES_HDVICP2_ID_ANY or
181 * IRES_HDVICP2_ID_LATE_ACQUIRE.
182 */
183} IRES_HDVICP2_ProtocolArgs;
184
185/**
186 * @brief Callback function signature, used by the IRES_HDVICP2_
187 * Handle's configure function
188 */
189typedef void (*IRES_HDVICP2_CallbackFxn)(IALG_Handle handle, Void *args);
190
191/**
192 * @brief Describes the status/history of the HDVICP2 unit that is
193 * returned by the acquire call. This information can be
194 * used by the codec to avoid reloading the data memory or
195 * the program memory in the HDVICP2.
196 *
197 * @enumWarning
198 */
199typedef enum IRES_HDVICP2_Status {
200 SAMECODEC = 0, /**< Same codec was granted this unit, last time */
201 SAMECODECTYPE = 1, /**< Different codec, but of the same codec class
202 was granted this unit last time */
203 DIFFERENTCODEC = 2 /**< Completely different codec ran last time */
204} IRES_HDVICP2_Status;
205
206
207/**
208 * @brief IRES_HDVICP2_Obj extends the generic IRES_Obj structure
209 * that is returned back to the algorithm requesting the
210 * resource.
211 */
212typedef struct IRES_HDVICP2_Obj {
213
214 IRES_Obj ires; /**< Base IRES_Obj struct */
215 Void *info; /**< Reserved for future use */
216 XDAS_Int32 id; /**< HDVICP2 id granted
217 *
218 * @remark Could be 0, 1, 2, or
219 * LATE_ACQUIRE
220 */
221 XDAS_Void *registerBaseAddress; /**< Register space base address of the
222 * HDVICP2 being granted
223 */
224 XDAS_Void *memoryBaseAddress; /**< Memory space base address of the
225 * HDVICP2 being granted
226 */
227 XDAS_Void *resetControlAddress; /**< HDVICP reset controller address
228 *
229 * @remarks bit 0 -> ICONT1 reset,
230 * bit 1 -> ICONT2 reset
231 */
232
233 /**
234 * @brief Acquire the HDVICP2 resource.
235 *
236 * @remarks This call acquires the HDVICP resource which the alg may
237 * (or may not) have specifically requested.
238 *
239 * @remarks The returned @c hdvicp2Status indicates the status of
240 * the particular HDVICP2 unit that is returned.
241 * @sa IRES_HDVICP2_Status
242 *
243 * @remarks The @c configurationId argument is a codec specified
244 * parameter that is both an input and output parameter. It
245 * specifies the mode in which this particular HDVICP2 was
246 * used last time, and the mode in which it will be
247 * used this time.
248 *
249 * @remarks This API takes a @c yieldContext as argument, as it may
250 * yield the processor to higher priority codecs in the
251 * system.
252 *
253 * @remarks @c lateAcquireId is an optionally framework supplied
254 * parameter (sometimes provided via an XDM control() call
255 * setting the XDM_SETLATEACQUIREARG. If not supplied, the
256 * codec should pass the value
257 * #IRES_HDVICP2_UNKNOWNLATEACQUIREARG.
258 *
259 * @sa IRES_HDVICP2_UNKNOWNLATEACQUIREARG
260 */
261 XDAS_Void (*acquire)(IALG_Handle algHandle,
262 struct IRES_HDVICP2_Obj *hdvicpHandle,
263 IRES_YieldContext *yieldCtxt, XDAS_UInt32 *hdvicp2Status,
264 XDAS_UInt32 *configurationId, XDAS_Int32 lateAcquireArg);
265
266 /**
267 * @brief Release the HDVICP2 resource.
268 *
269 * @remarks This makes the resource available for use by other algorithms.
270 */
271 XDAS_Void (*release)(IALG_Handle algHandle,
272 struct IRES_HDVICP2_Obj *hdvicpHandle);
273
274 /**
275 * @brief Reacquire the HDVICP2 resource recent released.
276 *
277 * @returns XDAS_TRUE The resource was not yet acquired by another
278 * algorithm, and the resource handle is still
279 * valid.
280 * @returns XDAS_FALSE The resource is no longer available and has been
281 * deactivated.
282 */
283 XDAS_UInt32 (*reacquireIfOwner)(IALG_Handle algHandle,
284 struct IRES_HDVICP2_Obj *hdvicpHandle);
285
286 /**
287 * @brief Register a callback function with a HDVICP2 instance.
288 *
289 * @remarks The callback is invoked when an interrupt fires after
290 * processing data.
291 *
292 * @remarks It is the algorithm's responsibility to configure the HDVICP2
293 * to process data and fire the interrupt when done.
294 */
295 XDAS_Void (*configure)(IALG_Handle algHandle,
296 struct IRES_HDVICP2_Obj *hdvicpHandle,
297 IRES_HDVICP2_CallbackFxn cbFunctionPtr, XDAS_Void *cbArgs);
298
299 /**
300 * @brief Wait until the HDVICP2 is done processing and then return.
301 *
302 * @remarks This is a blocking call, unless a positive timeout value
303 * is configured, inwhich case the call returns after timeout.
304 *
305 * @remarks This function is passed a yieldContext, and will relinquish
306 * the processor while it waits for the HDVICP2 to finish the
307 * processing and return from wait.
308 *
309 * @returns XDAS_TRUE Success
310 * @returns XDAS_FALSE Failure/Timeout
311 */
312 XDAS_UInt32 (*wait)(IALG_Handle algHandle,
313 struct IRES_HDVICP2_Obj *hdvicpHandle,
314 IRES_YieldContext *yieldCtxt);
315
316 /**
317 * @brief Processing has completed.
318 *
319 * @remarks This is called from within the interrupt handler function when
320 * processing completes, and is used to unblock the wait() API.
321 *
322 * @remarks Typically, this is called from within the algortihm's callback
323 * function (see acquire() call).
324 */
325 XDAS_Void (*done)(IALG_Handle algHandle,
326 struct IRES_HDVICP2_Obj *hdvicpHandle);
327 /**
328 * @brief Reset the HDVICP2.
329 *
330 * @remarks This can be called by the algorithm to "reset" the HDVICP2, and
331 * is usually called when an acquired HDVICP2 is "dirty", i.e, it
332 * requires both program/data reload.
333 *
334 * @remarks It works off a configured maximum reset cycle delay.
335 *
336 * @returns XDAS_TRUE Success
337 * @returns XDAS_FALSE Failure
338 */
339 XDAS_UInt32 (*reset)(IALG_Handle algHandle,
340 struct IRES_HDVICP2_Obj *hdvicpHandle);
341
342} IRES_HDVICP2_Obj;
343
344
345/**
346 * @brief HDVICP2 Register Layout
347 */
348typedef struct IRES_HDVICP2_RegisterLayer {
349
350 int size;
351 /* TBD */
352} IRES_HDVICP2_RegisterLayer;
353
354/**
355 * @brief Static Resource Properties
356 */
357typedef struct IRES_HDVICP2_Properties {
358
359 int size;
360 IRES_HDVICP2_RegisterLayer *globalRegs; /* Register layer of HDVICP2 */
361} IRES_HDVICP2_Properties;
362
363typedef IRES_Status (*ti_sdo_fc_ires_hdvicp_HDVICP2_GetHdvicp2Fxn)
364 (XDAS_Int32 *Id, IALG_Handle alg, IRES_HDVICP2_Handle handle);
365
366typedef IRES_Status (*ti_sdo_fc_ires_hdvicp_HDVICP2_FreeHdvicp2Fxn)
367 (XDAS_Int32 Id, IALG_Handle alg, IRES_HDVICP2_Handle handle);
368
369#ifdef __cplusplus
370}
371#endif /* extern "C" */
372
373/*@}*/
374
375#endif
376/*
377 * @(#) ti.sdo.fc.ires.hdvicp; 1, 0, 1,1; 6-12-2013 19:57:33; /db/atree/library/trees/fc/fc-t09/src/ xlibrary
378
379 */
380