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 
00079 #define HDVICP2_MODNAME  "ti.sdo.fc.ires.hdvicp2"
00080 
00081 
00087 #define IRES_HDVICP2_ID_ANY             -2
00088 
00095 #define IRES_HDVICP2_ID_LATE_ACQUIRE    -1
00096 
00103 #define IRES_HDVICP2_INVALID_ADDR 0xFFFFFFFF
00104 
00111 #define IRES_HDVICP2_TIMEOUTFOREVER ((UInt)(-1))
00112 
00123 #define IRES_HDVICP2_UNKNOWNLATEACQUIREARG (-1)
00124 
00125 /*
00126  * Note, we wrap the PROTOCOLVERSION in an ifdef so the
00127  * resource managers and algs get this version data placed in their object
00128  * files.  Apps, which include rman.h, will have this 'NOPROTOCOLREV' defined.
00129  */
00130 #ifndef ti_sdo_fc_ires_NOPROTOCOLREV
00131 
00135 static IRES_ProtocolRevision IRES_HDVICP2_PROTOCOLREVISION = {1, 0, 0};
00136 
00137 #endif
00138 
00142 typedef struct IRES_HDVICP2_Obj *IRES_HDVICP2_Handle;
00143 
00144 
00149 extern unsigned int ti_sdo_fc_ires_hdvicp_HDVICP2_timeoutVal;
00150 
00154 typedef IRES_YieldArgs (* ti_sdo_fc_ires_hdvicp_HDVICP2_GetYieldArgsFxn)
00155         (Int scratchId);
00156 
00160 typedef Void (* ti_sdo_fc_ires_hdvicp_HDVICP2_YieldFxn)
00161         (IRES_YieldResourceType resource, IRES_YieldContextHandle ctxt,
00162         IRES_YieldArgs args);
00163 
00164 
00165 
00169 typedef struct IRES_HDVICP2_ProtocolArgs {
00170 
00171     IRES_ProtocolArgs base;     
00172     XDAS_Int32 id;              
00178 } IRES_HDVICP2_ProtocolArgs;
00179 
00184 typedef void (*IRES_HDVICP2_CallbackFxn)(IALG_Handle handle, Void * args);
00185 
00194 typedef enum IRES_HDVICP2_Status {
00195     SAMECODEC = 0,          
00196     SAMECODECTYPE = 1,      
00198     DIFFERENTCODEC = 2      
00199 } IRES_HDVICP2_Status;
00200 
00201 
00207 typedef struct  IRES_HDVICP2_Obj {
00208 
00209     IRES_Obj ires;                     
00210     Void *info;                        
00211     XDAS_Int32 id;                     
00216     XDAS_Void *registerBaseAddress;    
00219     XDAS_Void *memoryBaseAddress;      
00222     XDAS_Void *resetControlAddress;    
00256     XDAS_Void (*acquire)(IALG_Handle algHandle, struct IRES_HDVICP2_Obj * this,
00257             IRES_YieldContext * yieldCtxt, XDAS_UInt32 * hdvicp2Status,
00258             XDAS_UInt32 *configurationId, XDAS_Int32 lateAcquireArg);
00259 
00265     XDAS_Void (*release)(IALG_Handle algHandle, struct IRES_HDVICP2_Obj * this);
00266 
00276     XDAS_UInt32 (*reacquireIfOwner)(IALG_Handle algHandle,
00277             struct IRES_HDVICP2_Obj * this);
00278 
00288     XDAS_Void (*configure)(IALG_Handle algHandle,
00289             struct IRES_HDVICP2_Obj * this,
00290             IRES_HDVICP2_CallbackFxn cbFunctionPtr, XDAS_Void * cbArgs);
00291 
00305     XDAS_UInt32 (*wait)(IALG_Handle algHandle, struct IRES_HDVICP2_Obj *this,
00306             IRES_YieldContext * yieldCtxt);
00307 
00317     XDAS_Void (*done) (IALG_Handle algHandle, struct IRES_HDVICP2_Obj *this);
00318 
00331     XDAS_UInt32 (*reset)(IALG_Handle algHandle, struct IRES_HDVICP2_Obj *this);
00332 
00333 } IRES_HDVICP2_Obj;
00334 
00335 
00339 typedef struct IRES_HDVICP2_RegisterLayer {
00340 
00341     int size;
00342     /* TBD */
00343 } IRES_HDVICP2_RegisterLayer;
00344 
00348 typedef struct IRES_HDVICP2_Properties {
00349 
00350     int size;
00351     IRES_HDVICP2_RegisterLayer *globalRegs;      /* Register layer of HDVICP2 */
00352 } IRES_HDVICP2_Properties;
00353 
00354 typedef IRES_Status (*ti_sdo_fc_ires_hdvicp_HDVICP2_GetHdvicp2Fxn)
00355         (XDAS_Int32 *Id, IALG_Handle alg, IRES_HDVICP2_Handle handle);
00356 
00357 typedef IRES_Status (*ti_sdo_fc_ires_hdvicp_HDVICP2_FreeHdvicp2Fxn)
00358        (XDAS_Int32 Id, IALG_Handle alg, IRES_HDVICP2_Handle handle);
00359 
00360 #ifdef __cplusplus
00361 }
00362 #endif /* extern "C" */
00363 
00366 #endif
00367 /*
00368  *  @(#) ti.sdo.fc.ires.hdvicp; 1, 0, 1,7; 8-14-2012 00:06:09; /db/atree/library/trees/fc/fc-r13/src/ xlibrary
00369 
00370  */
00371 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2012, Texas Instruments Incorporated