ires_hdvicp2.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2012, Texas Instruments Incorporated
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  *
00009  * *  Redistributions of source code must retain the above copyright
00010  *    notice, this list of conditions and the following disclaimer.
00011  *
00012  * *  Redistributions in binary form must reproduce the above copyright
00013  *    notice, this list of conditions and the following disclaimer in the
00014  *    documentation and/or other materials provided with the distribution.
00015  *
00016  * *  Neither the name of Texas Instruments Incorporated nor the names of
00017  *    its contributors may be used to endorse or promote products derived
00018  *    from this software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00021  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00022  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00023  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00024  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00025  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00026  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00027  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00028  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00029  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00030  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031  * 
00032  */
00048 #ifndef ti_sdo_fc_ires_hdvicp_IRES_HDVICP2_
00049 #define ti_sdo_fc_ires_hdvicp_IRES_HDVICP2_
00050 
00053 
00054 
00055 #ifdef __cplusplus
00056 extern "C" {
00057 #endif
00058 
00059 #include <ti/xdais/xdas.h>
00060 #include <ti/xdais/ires_common.h>
00061 #include <ti/xdais/ires.h>
00062 
00066 #define IRES_HDVICP2_PROTOCOLNAME       "ti.sdo.fc.ires.hdvicp.hdvicp2"
00067 
00076 #define HDVICP2_MODNAME  "ti.sdo.fc.ires.hdvicp2"
00077 
00078 
00084 #define IRES_HDVICP2_ID_ANY             -2
00085 
00092 #define IRES_HDVICP2_ID_LATE_ACQUIRE    -1
00093 
00098 #define IRES_HDVICP2_INVALID_ADDR 0xFFFFFFFF
00099 
00104 #define IRES_HDVICP2_TIMEOUTFOREVER ((UInt)(-1))
00105 
00116 #define IRES_HDVICP2_UNKNOWNLATEACQUIREARG (-1)
00117 
00118 /*
00119  * Note, we wrap the PROTOCOLVERSION in an ifdef so the
00120  * resource managers and algs get this version data placed in their object
00121  * files.  Apps, which include rman.h, will have this 'NOPROTOCOLREV' defined.
00122  */
00123 #ifndef ti_sdo_fc_ires_NOPROTOCOLREV
00124 
00128 static IRES_ProtocolRevision IRES_HDVICP2_PROTOCOLREVISION = {1, 0, 0};
00129 
00130 #endif
00131 
00135 typedef struct IRES_HDVICP2_Obj *IRES_HDVICP2_Handle;
00136 
00137 
00142 extern unsigned int ti_sdo_fc_ires_hdvicp_HDVICP2_timeoutVal; 
00143 
00147 typedef IRES_YieldArgs (* ti_sdo_fc_ires_hdvicp_HDVICP2_GetYieldArgsFxn)
00148         (Int scratchId);
00149 
00153 typedef Void (* ti_sdo_fc_ires_hdvicp_HDVICP2_YieldFxn)
00154         (IRES_YieldResourceType resource, IRES_YieldContextHandle ctxt,
00155         IRES_YieldArgs args);
00156 
00157 
00158 
00162 typedef struct IRES_HDVICP2_ProtocolArgs {
00163 
00164    IRES_ProtocolArgs base;
00165 
00166    XDAS_Int32 id;                             
00172 } IRES_HDVICP2_ProtocolArgs;
00173 
00178 typedef void (*IRES_HDVICP2_CallbackFxn)(IALG_Handle handle, Void * args);
00179 
00188 typedef enum IRES_HDVICP2_Status {
00189     SAMECODEC = 0,          
00190     SAMECODECTYPE = 1,      
00192     DIFFERENTCODEC = 2      
00193 } IRES_HDVICP2_Status;
00194 
00195 
00201 typedef struct  IRES_HDVICP2_Obj {
00202 
00203     IRES_Obj ires;
00204     Void * info ;                              
00205     XDAS_Int32 id;                             
00208     XDAS_Void * registerBaseAddress;           
00209     XDAS_Void * memoryBaseAddress;             
00210     XDAS_Void * resetControlAddress;           
00243     XDAS_Void (*acquire)(IALG_Handle algHandle, struct IRES_HDVICP2_Obj * this,
00244             IRES_YieldContext * yieldCtxt, XDAS_UInt32 * hdvicp2Status,
00245             XDAS_UInt32 *configurationId, XDAS_Int32 lateAcquireArg);
00246 
00247     XDAS_Void (*release)(IALG_Handle algHandle, struct IRES_HDVICP2_Obj * this);
00253     XDAS_UInt32 (*reacquireIfOwner)(IALG_Handle algHandle,
00254             struct IRES_HDVICP2_Obj * this);
00265     XDAS_Void (*configure)(IALG_Handle algHandle, 
00266             struct IRES_HDVICP2_Obj * this,
00267             IRES_HDVICP2_CallbackFxn cbFunctionPtr, XDAS_Void * cbArgs);
00272     XDAS_UInt32 (*wait)(IALG_Handle algHandle, struct IRES_HDVICP2_Obj * this,
00273             IRES_YieldContext * yieldCtxt);
00297         XDAS_Void (*done) (IALG_Handle algHandle, 
00298                 struct IRES_HDVICP2_Obj * this);
00299 
00300         XDAS_UInt32 (*reset)(IALG_Handle algHandle, 
00301                 struct IRES_HDVICP2_Obj * this);
00312 } IRES_HDVICP2_Obj;
00313 
00314 
00318 typedef struct IRES_HDVICP2_RegisterLayer {
00319 
00320     int size;
00321     /* TBD */
00322 } IRES_HDVICP2_RegisterLayer;
00323 
00327 typedef struct IRES_HDVICP2_Properties {
00328 
00329     int size;
00330     IRES_HDVICP2_RegisterLayer *globalRegs;      /* Register layer of HDVICP2 */
00331 } IRES_HDVICP2_Properties;
00332 
00333 typedef IRES_Status (*ti_sdo_fc_ires_hdvicp_HDVICP2_GetHdvicp2Fxn) 
00334         (XDAS_Int32 *Id, IALG_Handle alg, IRES_HDVICP2_Handle handle);
00335 
00336 typedef IRES_Status (*ti_sdo_fc_ires_hdvicp_HDVICP2_FreeHdvicp2Fxn) 
00337        (XDAS_Int32 Id, IALG_Handle alg, IRES_HDVICP2_Handle handle);
00338 
00339 #ifdef __cplusplus
00340 }
00341 #endif /* extern "C" */
00342 
00345 #endif
00346 /*
00347  *  @(#) ti.sdo.fc.ires.hdvicp; 1, 0, 1,3; 4-16-2012 00:01:34; /db/atree/library/trees/fc/fc-q08/src/ xlibrary
00348 
00349  */
00350 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2012, Texas Instruments Incorporated