Codec Engine System Programming Interface (SPI): Codec Engine SPI Reference

  • Main Page
  • Modules
  • Data Structures
  • Files
  • Directories
  • Related Pages

Codec Engine SPI Reference

ce-o16

Modules

The Codec Engine SPI is partitioned into a several modules:

  • The SPI for algorithm class interfaces.
  • The SPI for algorithm class stubs.
  • The SPI for algorithm class skeletons.
  • A generic set of SPI routines used by several of the above.

Additionally, there are several utility modules provided:

  • Memory - provides services to manage memory is OS independent environments. Also provides the ability to manage contiguous buffers meeting various alignment constraints.
Copyright 2010, Texas Instruments Incorporated


Codec Engine System Programming Interface (SPI):

  • Files
  • Directories
  • Related Pages
disclaimer.html
IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI's terms and conditions of sale supplied at the time of order acknowledgment.
TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI's standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.
TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of that third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation.
Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements.
Mailing Address:
Texas Instruments
Post Office Box 655303
Dallas, Texas 75265


Codec Engine System Programming Interface (SPI): Deprecated List

Deprecated List

Global Engine_getCpuLoad

This service has been replaced by Server_getCpuLoad() to better indicate that this API is not intended for obtaining the current processor's CPU load, rather it obtains the CPU load of a remote Server.

Global Engine_getUsedMem

This service has been replaced by Server_getMemStat() to better indicate that this API is not intended for obtaining the current processor's memory statistics, rather it obtains the memory statistics of a remote Server. Also, Server_getMemStat() provides more granularity than Engine_getUsedMem().

Global Memory_contigAlloc

This function has been superceded by Memory_alloc() and will be removed in a future release. Users are recommended to modify their applications to use the new, more flexible Memory_alloc() instead.


Codec Engine System Programming Interface (SPI): Module Index

Modules

Here is a list of all modules:
  • IALG - XDAIS Algorithm Interface
  • Codec Engine OSAL - Memory
  • VISA
  • CE Stub SPI
  • CE interface SPI
  • XDAIS Types and Constants
  • Codec Engine Runtime
  • CE Skeleton SPI


Codec Engine System Programming Interface (SPI): IALG - XDAIS Algorithm Interface

IALG - XDAIS Algorithm Interface

Data Structures

struct | IALG_MemRec
Memory records. More...
struct | IALG_Obj
Algorithm instance object definition. More...
struct | IALG_Params
Algorithm instance creation parameters. More...
struct | IALG_Status
Pointer to algorithm specific status structure. More...
struct | IALG_Fxns
Defines the fields and methods that must be supplied by all XDAIS algorithms. More...

Defines

#define | IALG_DEFMEMRECS 4
#define | IALG_OBJMEMREC 0
#define | IALG_SYSCMD 256
#define | IALG_EOK 0
#define | IALG_EFAIL -1
#define | IALG_CUSTOMFAILBASE -2048
#define | IALG_CUSTOMFAILEND -256
#define | IALG_MPROG 0x0008
#define | IALG_MXTRN 0x0010
#define | IALG_isProg(s)
#define | IALG_isOffChip(s)

Typedefs

typedef struct IALG_Obj * | IALG_Handle
Handle to an algorithm instance object.
typedef unsigned int | IALG_Cmd
Algorithm specific command.

Enumerations

enum IALG_MemAttrs {
IALG_SCRATCH,
IALG_PERSIST,
IALG_WRITEONCE
}

Memory attributes.

More...
enum IALG_MemSpace {
IALG_EPROG,
IALG_IPROG,
IALG_ESDATA,
IALG_EXTERNAL,
IALG_DARAM0 = 0,
IALG_DARAM1 = 1,
IALG_SARAM = 2,
IALG_SARAM0 = 2,
IALG_SARAM1 = 3,
IALG_DARAM2 = 4,
IALG_SARAM2 = 5
}

Defined memory spaces.

More...

Detailed Description

This is the XDAIS IALG interface.

Define Documentation

#define IALG_DEFMEMRECS 4

Default number of memory records.

#define IALG_OBJMEMREC 0

Memory record index of instance object.

#define IALG_SYSCMD 256

Minimum "system" IALG_Cmd value.

#define IALG_EOK 0

Successful return status code.

#define IALG_EFAIL -1

Unspecified error return status code.

#define IALG_CUSTOMFAILBASE -2048

Algorithm-specific failure code end.

Remarks:
This is 0xfffff800.
#define IALG_CUSTOMFAILEND -256

Algorithm-specific failure code base.

Remarks:
This is 0xffffff00.
#define IALG_MPROG 0x0008

Program memory space bit.

#define IALG_MXTRN 0x0010

External memory space bit.

#define IALG_isProg ( s )
Value:
(        \
    (((int)(s)) & IALG_MPROG)   \
)
#define IALG_isOffChip ( s )
Value:
(     \
    (((int)(s)) & IALG_MXTRN)   \
)

Typedef Documentation

typedef struct IALG_Obj* IALG_Handle

Handle to an algorithm instance object.

typedef unsigned int IALG_Cmd

Algorithm specific command.

Remarks:
This command is used in conjunction with IALG_Status to get and set algorithm specific attributes via the algControl() method.

Enumeration Type Documentation

enum IALG_MemAttrs

Memory attributes.

Enumerator:
IALG_SCRATCH

Scratch memory.

IALG_PERSIST

Persistent memory.

IALG_WRITEONCE

Write-once persistent memory.

enum IALG_MemSpace

Defined memory spaces.

Enumerator:
IALG_EPROG

External program memory

IALG_IPROG

Internal program memory

IALG_ESDATA

Off-chip data memory (accessed sequentially)

IALG_EXTERNAL

Off-chip data memory (accessed randomly)

IALG_DARAM0

Dual access on-chip data memory

IALG_DARAM1

Block 1, if independant blocks required

IALG_SARAM

Single access on-chip data memory

IALG_SARAM0

Block 0, equivalent to IALG_SARAM

IALG_SARAM1

Block 1, if independant blocks required

IALG_DARAM2

Block 2, if a 3rd independent block required

IALG_SARAM2

Block 2, if a 3rd independent block required


Codec Engine System Programming Interface (SPI): Codec Engine OSAL - Memory

Codec Engine OSAL - Memory

Data Structures

struct | Memory_AllocParams
Parameters for Memory_alloc() & Memory_free(). More...

Defines

#define | Memory_DEFAULTALIGNMENT ((UInt)(-1))
#define | Memory_GTNAME "OM"
#define | Memory_CACHED 0x00000000
#define | Memory_NONCACHED 0x00000001
#define | Memory_CACHEDMASK 0x00000001

Enumerations

enum Memory_type {
Memory_MALLOC = 0,
Memory_SEG = 1,
Memory_CONTIGPOOL = 2,
Memory_CONTIGHEAP = 3
}

Enum values for Memory_AllocParams.type.

More...

Functions

Ptr | Memory_alloc (UInt size, Memory_AllocParams *params)
General memory allocation.
Void | Memory_cacheInv (Ptr addr, Int sizeInBytes)
Invalidate a range of cache.
Void | Memory_cacheWb (Ptr addr, Int sizeInBytes)
Write back cache.
Void | Memory_cacheWbInv (Ptr addr, Int sizeInBytes)
Write back and invalidate cache.
Ptr | Memory_contigAlloc (UInt size, UInt align)
Allocate physically contiguous blocks of memory.
Bool | Memory_contigFree (Ptr addr, UInt size)
Free memory allocated by Memory_contigAlloc().
Bool | Memory_free (Ptr addr, UInt size, Memory_AllocParams *params)
Free memory allocated with Memory_alloc().
Void | Memory_dumpKnownContigBufsList (Void)
Dumps the list of all translated/registered bufs.
UInt32 | Memory_getBufferPhysicalAddress (Ptr virtualAddress, Int sizeInBytes, Bool *isContiguous)
Converts application virtual address to a physical address.
Int | Memory_getHeapId (String name)
Get the heap heap ID corresponding to a heap name. This number will be between 0 and the value returned by Memory_getNumHeaps(). The heap Id can be passed to Memory_redefine(), Memory_restoreHeap(), and Memory_segStat().
Int | Memory_getNumHeaps ()
Get the number of memory heaps.
Ptr | Memory_getBufferVirtualAddress (UInt32 physicalAddress, Int sizeInBytes)
Obtains the virtual address of a physically contiguous buffer.
Void | Memory_registerContigBuf (UInt32 virtualAddress, UInt32 sizeInBytes, UInt32 physicalAddress)
Register a physical buffer allocated without Memory_contigAlloc().
Void | Memory_unregisterContigBuf (UInt32 virtualAddress, UInt32 sizeInBytes)
Unregisters a physical buffer allocated without Memory_contigAlloc().

Variables

Memory_AllocParams Memory_DEFAULTPARAMS
Default parameters for Memory_alloc() & Memory_free().

Define Documentation

#define Memory_DEFAULTALIGNMENT ((UInt)(-1))
#define Memory_GTNAME "OM"
#define Memory_CACHED 0x00000000

Cached allocation.

See also:
Memory_AllocParams.flags
#define Memory_NONCACHED 0x00000001

Non-cached allocation.

See also:
Memory_AllocParams.flags
#define Memory_CACHEDMASK 0x00000001

Mask to isolate cache flag.

See also:
Memory_AllocParams.flags

Enumeration Type Documentation

enum Memory_type

Enum values for Memory_AllocParams.type.

See also:
Memory_AllocParams
Enumerator:
Memory_MALLOC

malloc()-based allocation

Memory_SEG

DSP/BIOS segment-based allocation

Memory_CONTIGPOOL

Contiguous, pool-based allocation

Memory_CONTIGHEAP

Contiguous, heap-based allocation

Function Documentation

Ptr Memory_alloc | ( | UInt | size,
 |  | Memory_AllocParams * | params
 | ) |  |

General memory allocation.

Parameters:
[in] | size | Number of bytes to allocate.
[in] | params | Parameters controlling the allocation.
Return values:
NULL | The memory request failed.
non-NULL | The pointer to a buffer containing the requested memory.
See also:
Memory_free()
Memory_contigAlloc()
Void Memory_cacheInv | ( | Ptr | addr,
 |  | Int | sizeInBytes
 | ) |  |

Invalidate a range of cache.

Parameters:
[in] | addr | Address of the beginning of the buffer to invalidate.
[in] | sizeInBytes | Size of the buffer to invalidate.
Remarks:
In addition to application usage, this is often called by a skeleton implementor after it has received a shared memory buffer from another processor, and before it invokes an algorithm's interface which will operate on that shared memory buffer.
See also:
Memory_cacheWb()
Memory_cacheWbInv()
Void Memory_cacheWb | ( | Ptr | addr,
 |  | Int | sizeInBytes
 | ) |  |

Write back cache.

Parameters:
[in] | addr | Address of the beginning of the buffer to writeback.
[in] | sizeInBytes | Size of the buffer to writeback.
See also:
Memory_cacheInv()
Memory_cacheWbInv()
Void Memory_cacheWbInv | ( | Ptr | addr,
 |  | Int | sizeInBytes
 | ) |  |

Write back and invalidate cache.

Parameters:
[in] | addr | Address of the beginning of the buffer to writeback and invalidate.
[in] | sizeInBytes | Size of the buffer to writeback invalidate.
See also:
Memory_cacheInv()
Memory_cacheWb()
Ptr Memory_contigAlloc | ( | UInt | size,
 |  | UInt | align
 | ) |  |

Allocate physically contiguous blocks of memory.

Deprecated:
This function has been superceded by Memory_alloc() and will be removed in a future release. Users are recommended to modify their applications to use the new, more flexible Memory_alloc() instead.
Parameters:
[in] | size | Size of the buffer to allocate.
[in] | align | Alignment of the buffer; must be divisible by a power of two.
Precondition:
align must be divisible by a power of two.
Return values:
non-NULL | Address of a physically contiguous buffer.
NULL | Unable to obtain the requested buffer.
Remarks:
This is commonly called by an application wishing to obtain a physically contiguous buffer which it must share with another processor.
For portability reasons, applications commonly use this API even in environments which do not have virtual memory or an MMU (e.g. a single processor, DSP/BIOS based system). Doing so makes them portable to environments which do have to provide physically contiguous memory to remote processors.
See also:
Memory_alloc()
Memory_contigFree()
Bool Memory_contigFree | ( | Ptr | addr,
 |  | UInt | size
 | ) |  |

Free memory allocated by Memory_contigAlloc().

Parameters:
[in] | addr | Address of a buffer allocated by Memory_contigAlloc()
[in] | size | Size of the buffer to free.
Return values:
TRUE | The buffer was freed and the memory pointed to by addr is no longer valid.
FALSE | The buffer couldn't be freed.
Precondition:
addr must be a valid address returned by Memory_contigAlloc()
size must be equivalent to the size passed in during the Memory_contigAlloc() allocation.
See also:
Memory_contigAlloc()
Bool Memory_free | ( | Ptr | addr,
 |  | UInt | size,
 |  | Memory_AllocParams * | params
 | ) |  |

Free memory allocated with Memory_alloc().

Parameters:
[in] | addr | Address of a buffer allocated by Memory_alloc().
[in] | size | Size of the buffer to free.
[in] | params | Parameters controlling the free operation.
Return values:
TRUE | The buffer was freed and the memory pointed to by addr is no longer valid.
FALSE | The buffer couldn't be freed.
Precondition:
addr must be a valid address returned by Memory_alloc().
size must be equivalent to the size passed in during the Memory_alloc() allocation.
See also:
Memory_alloc()
Void Memory_dumpKnownContigBufsList ( Void )

Dumps the list of all translated/registered bufs.

Remarks:
The list is printed using the tracing infrastructure at trace level 5 to tracemask Memory_GTNAME.
There are several mechanisms to enable this trace mask, one would be to do the following from your application:
    GT_set(Memory_GTNAME "+5");
See also:
Memory_registerContigBuf()
Memory_unregisterContigBuf()
UInt32 Memory_getBufferPhysicalAddress | ( | Ptr | virtualAddress,
 |  | Int | sizeInBytes,
 |  | Bool * | isContiguous
 | ) |  |

Converts application virtual address to a physical address.

This API also checks verifies that the buffer is really contiguous.

Parameters:
[in] | virtualAddress | Address of a buffer.
[in] | sizeInBytes | Size of the buffer.
[out] | isContiguous | Optional flag indicating whether the buffer was physically contiguous or not.
Return values:
0 | Failure, the physical address could not be obtained.
non-zero | The physical address of the buffer.
Remarks:
sizeInBytes must be non-zero.
isContiguous is an optional parameter, and can be NULL if the caller doesn't want the results of this check. If isContiguous is NULL but the buffer is not contiguous, error trace will be generated.
If a physically discontiguous buffer is provided in virtualAddress, zero will be returned. And if isContiguous is non-null, it will be set to FALSE.
This is typically called by a stub implementation to translate an application-side virtual address into a physical address usable by a remote skeleton and algorithm.
To enable portable code, this is safe to call on systems without virtual memory. In those cases, the returned physical buffer will be the same as the provided "virtual" buffer.
See also:
Memory_getBufferVirtualAddress()
Int Memory_getHeapId ( String name )

Get the heap heap ID corresponding to a heap name. This number will be between 0 and the value returned by Memory_getNumHeaps(). The heap Id can be passed to Memory_redefine(), Memory_restoreHeap(), and Memory_segStat().

Remarks:
This is an unsupported, private function. There is no contract to provide compatibility between releases, and it may be deleted at any time.
Return values:
>= 0 The heap number.
< 0 No heap with the given name was found.
See also:
Memory_getNumHeaps()
Int Memory_getNumHeaps ( )

Get the number of memory heaps.

Remarks:
This is an unsupported, private function. There is no contract to provide compatibility between releases, and it may be deleted at any time.
Return values:
The number of memroy heaps.
See also:
Memory_getHeapId()
Ptr Memory_getBufferVirtualAddress | ( | UInt32 | physicalAddress,
 |  | Int | sizeInBytes
 | ) |  |

Obtains the virtual address of a physically contiguous buffer.

Parameters:
[in] | physicalAddress | Physical address of a buffer.
[in] | sizeInBytes | Size of the buffer.
Return values:
NULL | Failure, the virtual address could not be obtained.
non-zero | The virtual address of the buffer.
Remarks:
sizeInBytes must be non-zero.
If virtualAddress, was not acquired by Memory_getBufferPhysicalAddress(), no attempt is made to map the physically contiguous buffer into a the application's virtual memory space.
This is typically called by a stub implementation to translate a buffer provided by a remote skeleton and/or algorithm into an application-usable, virtual address.
To enable portable code, this is safe to call on systems without virtual memory. In those cases, the returned "virtual" buffer will be the same as the provided physical buffer.
See also:
Memory_getBufferPhysicalAddress()
Void Memory_registerContigBuf | ( | UInt32 | virtualAddress,
 |  | UInt32 | sizeInBytes,
 |  | UInt32 | physicalAddress
 | ) |  |

Register a physical buffer allocated without Memory_contigAlloc().

Parameters:
[in] | virtualAddress | Address of the buffer mapped into the process space
[in] | sizeInBytes | Size of the region
[in] | physicalAddress | Physical address of the buffer
Remarks:
A cache of "app-address to codec-address" mappings (e.g. virtual to physical address mappings in DM644x devices) is internally maintained in some environments (e.g. Linux). This is used, for example, by Memory_getBufferPhysicalAddress() and Memory_getBufferVirtualAddress(). This lookup map is automatically updated when using Memory_contigAlloc() and Memory_contigFree(). However, if the user acquires buffers independently, it must use Memory_registerContigBuf() and Memory_unregisterContigBuf() to ensure the lookup map is current.
Individual sub-blocks of a buffer need not be registered; registering the entire buffer once will suffice.
This API is typically only required for environments with virtual memory (e.g. Linux-based systems).
See also:
Memory_unregisterContigBuf()
Memory_dumpKnownContigBufsList()
Void Memory_unregisterContigBuf | ( | UInt32 | virtualAddress,
 |  | UInt32 | sizeInBytes
 | ) |  |

Unregisters a physical buffer allocated without Memory_contigAlloc().

Parameters:
[in] | virtualAddress | beginning address of the buffer mapped into the process space
[in] | sizeInBytes | size of the region
Remarks:
This API must be used to unregister a buffer allocated outside of Memory_contigAlloc() if the buffer (or a portion of it) is passed on to VISA calls. Segments of the buffer need not be individually unregistered.
See also:
Memory_registerContigBuf()
Memory_dumpKnownContigBufsList()

Variable Documentation

Memory_AllocParams Memory_DEFAULTPARAMS

Default parameters for Memory_alloc() & Memory_free().

Remarks:
Memory_DEFAULTPARAMS will be used when NULL is passed in the Memory_AllocParams parameter for Memory_alloc() & Memory_free(). When passing a non-NULL Memory_AllocParams parameter, you should first copy Memory_DEFAULTPARAMS to your structure and then modify individual elements as needed:
      Memory_AllocParams  myParams;

      myParams = Memory_DEFAULTPARAMS;
      myParams.type = Memory_CONTIGHEAP;
See also:
Memory_alloc()
Memory_free()


Codec Engine System Programming Interface (SPI): VISA

VISA

Defines

#define | VISA_EOK 0
Success.
#define | VISA_ERUNTIME -1
Internal runtime error.
#define | VISA_EFAIL -2
General system error.
#define | VISA_ETIMEOUT -100
Timeout occurred.
#define | VISA_FOREVER Engine_FOREVER
Special value for timeout parameter indicating never timeout.

Typedefs

typedef Int | VISA_Status
VISA result data type.

Functions

VISA_Status | VISA_getAlgMemRecs (VISA_Handle visa, IALG_MemRec *memTab, Int size, Int *numRecs)
Get the IALG_MemRec memory assigned to an algorithm instance.
VISA_Status | VISA_getAlgNumRecs (VISA_Handle visa, Int *numRecs)
Get the number of IALG_MemRecs assigned to an algorithm.
Ptr | VISA_getCodecClassConfig (VISA_Handle visa)
Get codec-specific values for the VISA class-specific (or codec-specific if the codec doesn't extend VISA) stub-and/ or-skeleton configuration data (that some classes have).
UInt | VISA_getMaxMsgSize (VISA_Handle visa)
Returns max size of messages allocated by VISA_allocMsg().
Bool | VISA_isLocal (VISA_Handle visa)
Indicates whether VISA codecs run on a remote or local CPU.

Detailed Description

Codec Engine Algorithm-independent shared definitions and services.

Define Documentation

#define VISA_EOK 0

Success.

#define VISA_ERUNTIME -1

Internal runtime error.

#define VISA_EFAIL -2

General system error.

#define VISA_ETIMEOUT -100

Timeout occurred.

#define VISA_FOREVER Engine_FOREVER

Special value for timeout parameter indicating never timeout.

Typedef Documentation

typedef Int VISA_Status

VISA result data type.

Function Documentation

VISA_Status VISA_getAlgMemRecs | ( | VISA_Handle | visa,
 |  | IALG_MemRec * | memTab,
 |  | Int | size,
 |  | Int * | numRecs
 | ) |  |

Get the IALG_MemRec memory assigned to an algorithm instance.

Parameters:
[in] | visa | Handle to an algorithm instance.
[out] | memTab | Location to store the IALG_MemRecs.
[in] | size | Maximum number of IALG_MemRecs to put in memTab array.
[out] | numRecs | Actual number of IALG_MemRecs copied into memTab array.
Remarks:
Any algorithm instance handle (e.g. VIDDEC2_Handle, AUDDEC1_Handle, etc), can be cast to a visa handle.
Example:
      AUDDEC1_Handle decoder;

      decoder = AUDDEC1_create(...);

      ... likely use VISA_getAlgNumRecs() to alloc enough mem...

      VISA_getAlgMemRecs((VISA_Handle)decoder, ...);
Return values:
VISA_EOK | Success.
VISA_EFAIL | Failure.
See also:
VISA_getAlgNumRecs()
VISA_Status VISA_getAlgNumRecs | ( | VISA_Handle | visa,
 |  | Int * | numRecs
 | ) |  |

Get the number of IALG_MemRecs assigned to an algorithm.

Parameters:
[in] | visa | Handle to an algorithm instance.
[out] | numRecs | Location to store the number of IALG_MemRecs used.
Remarks:
Any algorithm instance handle (e.g. VIDDEC2_Handle, AUDDEC1_Handle, etc), can be cast to a visa handle.
Example:
      Int numRecs;
      AUDDEC1_Handle decoder;

      decoder = AUDDEC1_create(...);

      VISA_getAlgNumRecs((VISA_Handle)decoder, &numRecs);
Return values:
VISA_EOK | Success.
VISA_EFAIL | Failure.
See also:
VISA_getAlgMemRecs()
Ptr VISA_getCodecClassConfig ( VISA_Handle visa )

Get codec-specific values for the VISA class-specific (or codec-specific if the codec doesn't extend VISA) stub-and/ or-skeleton configuration data (that some classes have).

Parameters:
[in] visa Handle to an algorithm instance.
Return values:
address of the codec class config data structure, or NULL if codec class config data not defined for the codec; the format of the structure is class-specific, and the data in it is codec- specific
Precondition:
visa must be a valid algorithm instance handle.
UInt VISA_getMaxMsgSize ( VISA_Handle visa )

Returns max size of messages allocated by VISA_allocMsg().

Return values:
maxMsgSize Max size of messages allocated by VISA_allocMsg()
Remarks:
This is typically called by an algorithm class' stub.
See also:
VISA_allocMsg()
Bool VISA_isLocal ( VISA_Handle visa )

Indicates whether VISA codecs run on a remote or local CPU.

Return values:
FALSE | VISA codecs run on remote CPU
TRUE | VISA codecs run on local CPU
Remarks:
This is typically called by an algorithm class' stub.


Codec Engine System Programming Interface (SPI): CE Stub SPI

CE Stub SPI

Data Structures

struct | VISA_MsgHeader
VISA message header. More...

Functions

VISA_Msg | VISA_allocMsg (VISA_Handle visa)
Obtain an algorithm instance's message.
VISA_Status | VISA_call (VISA_Handle visa, VISA_Msg *msg)
Invoke the operation specified in the message and wait for it to complete.
VISA_Status | VISA_callAsync (VISA_Handle visa, VISA_Msg *msg)
Invoke the operation specified in the message and return without waiting for it to complete.
VISA_Status | VISA_wait (VISA_Handle visa, VISA_Msg *msg, UInt timeout)
Wait for the oldest operation from a command specified with VISA_callAsync() to complete.
Void | VISA_freeMsg (VISA_Handle visa, VISA_Msg msg)
Release an algorithm instance's message.
Void | VISA_getContext (VISA_Handle visa, UInt32 *pContext)
Get optional context parameter.
Void | VISA_setContext (VISA_Handle visa, UInt32 context)
Set optional context parameter.

Detailed Description

Codec Engine System Programming Interface (SPI) for stub implementors.

Function Documentation

VISA_Msg VISA_allocMsg ( VISA_Handle visa )

Obtain an algorithm instance's message.

Parameters:
[in] visa Handle to an algorithm instance.
Return values:
NULL | General system error
non-NULL | The remote algorithm's message.
Remarks:
This is typically called by an algorithm class' stub.
See also:
VISA_allocMsg()
VISA_Status VISA_call | ( | VISA_Handle | visa,
 |  | VISA_Msg * | msg
 | ) |  |

Invoke the operation specified in the message and wait for it to complete.

Parameters:
[in] | visa | Handle to an algorithm instance.
[out] | msg | The remote algorithm's message, to be sent to the skeleton.
Remarks:
This is typically called by an algorithm class' stub.
Return values:
VISA_EOK | Success
VISA_ERUNTIME | General system error
See also:
VISA_callAsync()
VISA_Status VISA_callAsync | ( | VISA_Handle | visa,
 |  | VISA_Msg * | msg
 | ) |  |

Invoke the operation specified in the message and return without waiting for it to complete.

Parameters:
[in] | visa | Handle to an algorithm instance.
[out] | msg | The remote algorithm's message, to be sent to the skeleton.
Remarks:
This is typically called by an algorithm class' stub.
Return values:
VISA_EOK | Success
VISA_ERUNTIME | General system error
See also:
VISA_wait()
VISA_call()
VISA_Status VISA_wait | ( | VISA_Handle | visa,
 |  | VISA_Msg * | msg,
 |  | UInt | timeout
 | ) |  |

Wait for the oldest operation from a command specified with VISA_callAsync() to complete.

Parameters:
[in] | visa | Handle to an algorithm instance.
[out] | msg | Placeholder for the remote algorithm's return message, retrieved from the skeleton.
[in] | timeout | Amount of "time" to wait ("time" depends on underlying mechanism, such as that used with MSGQ_Get()).
Remarks:
This is typically called by an algorithm class' stub.
Return values:
VISA_EOK | Success
VISA_ERUNTIME | General system error
VISA_ETIMEOUT | Operation timed out
See also:
VISA_callAsync()
Void VISA_freeMsg | ( | VISA_Handle | visa,
 |  | VISA_Msg | msg
 | ) |  |

Release an algorithm instance's message.

Parameters:
[in] | visa | Handle to an algorithm instance.
[in] | msg | Message to free, obtained through a call to VISA_allocMsg().
Return values:
NULL | General system error
non-NULL | The remote algorithm's message.
Remarks:
This is typically called by an algorithm class' stub.
See also:
VISA_allocMsg()
Void VISA_getContext | ( | VISA_Handle | visa,
 |  | UInt32 * | pContext
 | ) |  |

Get optional context parameter.

Parameters:
[in] | visa | Handle to an algorithm instance.
[out] | pContext | Location to store context.
Precondition:
visa must be a valid algorithm instance handle.
pContext must be a valid pointer.
Remarks:
The VISA_setContext() / VISA_getContext() pair does not work across processors. That is, the context can only be stored and retrieved on the local processor.
See also:
VISA_setContext()
Void VISA_setContext | ( | VISA_Handle | visa,
 |  | UInt32 | context
 | ) |  |

Set optional context parameter.

Parameters:
[in] | visa | Handle to an algorithm instance.
[in] | context | Context.
Precondition:
visa must be a valid algorithm instance handle.
Remarks:
The VISA_setContext() / VISA_getContext() pair does not work across processors. That is, the context can only be stored and retrieved on the local processor.
See also:
VISA_getContext()


Codec Engine System Programming Interface (SPI): CE interface SPI

CE interface SPI

VISA_Handle | VISA_create (Engine_Handle engine, String name, IALG_Params *params, size_t msgSize, String type)
 | Create a new instance of an algorithm.
Void | VISA_delete (VISA_Handle visa)
 | Delete an instance of an algorithm.
VISA_Handle | VISA_create2 (Engine_Handle engine, String name, IALG_Params *params, Int paramsSize, size_t msgSize, String type)
 | Create a new instance of an algorithm.
Void | VISA_enter (VISA_Handle visa)
 | Enter an algorithm's critical section. This must be called before any of the algorithm's IALG_Fxns are invoked.
Void | VISA_exit (VISA_Handle visa)
 | Leave an algorithm's critical section. This must be called after the API has completed calling an algorithm's IALG_Fxns.
Ptr | VISA_getAlgHandle (VISA_Handle visa)
 | Obtains an algorithm's handle. This is the handle required to be passed to the algorithm's IALG_Fxns.
Ptr | VISA_getAlgorithmHandle (VISA_Handle visa)
 | Obtains an algorithm's handle. If the algorithm is local, this is the handle that can be passed to Algorithm APIs, not to the IALG_Fxns.
IALG_Fxns * | VISA_getAlgFxns (VISA_Handle visa)
 | Get implementation functions for this algorithm.

Detailed Description

Codec Engine System Programming Interface (SPI) for class interface implementors.

Function Documentation

VISA_Handle VISA_create | ( | Engine_Handle | engine,
 |  | String | name,
 |  | IALG_Params * | params,
 |  | size_t | msgSize,
 |  | String | type
 | ) |  |

Create a new instance of an algorithm.

Parameters:
[in] | engine | Handle to an engine in which the algorithm has been configured.
[in] | name | Name of the algorithm to create. name is specified in the engine configuration.
[in] | params | Creation parameters.
[in] | msgSize | Size of the message which will be allocated in the event that this algorithm is configured to run remotely.
[in] | type | String name of the "type" of algorithm.
Return values:
NULL | General failure.
non-NULL | Handle to an algorithm instance.
Remarks:
type must match the package/module name of the interface which the algorithm implements. For example, the VISA interface shipped with CE to support xDM video decoders is named "ti.sdo.ce.video.IVIDDEC". That is, the module IVIDDEC is in the package "ti.sdo.ce.video". You will, by definition, find a file named IVIDDEC.xdc in the ti.sdo.ce.video package.
When calling VISA_create(), a string comparison is done between the type parameter and the actual name of the module (described in the previous paragraph). If these strings don't match exactly, VISA_create() will fail.
See also:
VISA_delete()
Void VISA_delete ( VISA_Handle visa )

Delete an instance of an algorithm.

Parameters:
[in] visa Handle to an algorithm instance to delete.
See also:
VISA_create()
VISA_Handle VISA_create2 | ( | Engine_Handle | engine,
 |  | String | name,
 |  | IALG_Params * | params,
 |  | Int | paramsSize,
 |  | size_t | msgSize,
 |  | String | type
 | ) |  |

Create a new instance of an algorithm.

Parameters:
[in] | engine | Handle to an engine in which the algorithm has been configured.
[in] | name | Name of the algorithm to create. name is specified in the engine configuration.
[in] | params | Creation parameters.
[in] | paramsSize | Size of params.
[in] | msgSize | Size of the message which will be allocated in the event that this algorithm is configured to run remotely.
[in] | type | String name of the "type" of algorithm.
Return values:
NULL | General failure.
non-NULL | Handle to an algorithm instance.
Remarks:
type must match the package/module name of the interface which the algorithm implements. For example, the VISA interface shipped with CE to support xDM video decoders is named "ti.sdo.ce.video.IVIDDEC". That is, the module IVIDDEC is in the package "ti.sdo.ce.video". You will, by definition, find a file named IVIDDEC.xdc in the ti.sdo.ce.video package.
When calling VISA_create2(), a string comparison is done between the type parameter and the actual name of the module (described in the previous paragraph). If these strings don't match exactly, VISA_create2() will fail.
VISA_create() is the preferred method to create algorithms. VISA_create2() is provided to enable creation of algorithms which violate the xDAIS spec and do not have a size field of type "Int" as the first field of params.
See also:
VISA_create()
VISA_delete()
Void VISA_enter ( VISA_Handle visa )

Enter an algorithm's critical section. This must be called before any of the algorithm's IALG_Fxns are invoked.

Parameters:
[in] visa Handle to an algorithm instance.
Remarks:
This is typically called by an algorithm class' application API.
This call has the same semantics as IALG's activate fxn.
See also:
VISA_exit()
Void VISA_exit ( VISA_Handle visa )

Leave an algorithm's critical section. This must be called after the API has completed calling an algorithm's IALG_Fxns.

Parameters:
[in] visa Handle to an algorithm instance.
Remarks:
This call has the same semantics as IALG's de-activate fxn.
See also:
VISA_enter()
Ptr VISA_getAlgHandle ( VISA_Handle visa )

Obtains an algorithm's handle. This is the handle required to be passed to the algorithm's IALG_Fxns.

Parameters:
[in] visa Handle to an algorithm instance.
Return values:
NULL | General system error
non-NULL | The remote algorithm's message.
Remarks:
This is typically called by an algorithm class' application API.
See also:
VISA_getAlgFxns()
Ptr VISA_getAlgorithmHandle ( VISA_Handle visa )

Obtains an algorithm's handle. If the algorithm is local, this is the handle that can be passed to Algorithm APIs, not to the IALG_Fxns.

Parameters:
[in] visa Handle to an algorithm instance.
Return values:
NULL | General system error
non-NULL | The Algorithm handle.
Remarks:
This is used internally.
See also:
VISA_getAlgHandle()
IALG_Fxns* VISA_getAlgFxns ( VISA_Handle visa )

Get implementation functions for this algorithm.

Parameters:
[in] visa Handle to an algorithm instance.
Return values:
NULL | An error has occurred.
non-NULL | The algorithm's IALG_Fxns.
Remarks:
This is typically called by an algorithm class' application API.
Both local and remote implementations return a non-NULL pointer. However, the IALG_Fxns functions may be NULL.
In the case of a local algorithm, the algorithm's IALG_Fxns returned. In the case of a remote algorithm, its stubs are returned. In either case, the handle passed as the first arg to the IALG_Fxns must be the value returned by VISA_getAlgHandle().
See also:
VISA_getAlgHandle()


Codec Engine System Programming Interface (SPI): XDAIS Types and Constants

XDAIS Types and Constants

Defines

#define | XDAS_TRUE 1
#define | XDAS_FALSE 0

Typedefs

typedef Void | XDAS_Void
typedef Uint8 | XDAS_Bool
typedef Int8 | XDAS_Int8
typedef Uint8 | XDAS_UInt8
typedef Int16 | XDAS_Int16
typedef Uint16 | XDAS_UInt16
typedef Int32 | XDAS_Int32
typedef Uint32 | XDAS_UInt32

Define Documentation

#define XDAS_TRUE 1
#define XDAS_FALSE 0

Typedef Documentation

typedef Void XDAS_Void
typedef Uint8 XDAS_Bool
typedef Int8 XDAS_Int8

Actual size chip dependent.

typedef Uint8 XDAS_UInt8

Actual size chip dependent.

typedef Int16 XDAS_Int16

Actual size of type is 16 bits.

typedef Uint16 XDAS_UInt16

Actual size of type is 16 bits.

typedef Int32 XDAS_Int32

Actual size of type is 32 bits.

typedef Uint32 XDAS_UInt32

Actual size of type is 32 bits.


Codec Engine System Programming Interface (SPI): Codec Engine Runtime

Codec Engine Runtime

Data Structures

struct | Engine_Attrs
Attributes of an Engine. More...
struct | Engine_AlgInfo
Properties of an Engine algorithm. More...

Defines

#define | Engine_GTNAME "CE"
Trace name for the Engine module.
#define | Engine_EOK 0
#define | Engine_EEXIST 1
#define | Engine_ENOMEM 2
#define | Engine_EDSPLOAD 3
#define | Engine_ENOCOMM 4
#define | Engine_ENOSERVER 5
#define | Engine_ECOMALLOC 6
#define | Engine_ERUNTIME 7
#define | Engine_ECODECCREATE 8
#define | Engine_ECODECSTART 9
#define | Engine_EINVAL 10
#define | Engine_EBADSERVER 11
#define | Engine_ENOTAVAIL 12
#define | Engine_EWRONGSTATE 13
#define | Engine_EINUSE 14
#define | Engine_ENOTFOUND 15
#define | Engine_ETIMEOUT 16

Typedefs

typedef struct Engine_Obj * | Engine_Handle
Opaque handle to an engine.
typedef Int | Engine_Error
Engine error code.

Functions

Void | Engine_close (Engine_Handle engine)
Close an Engine.
Engine_Handle | Engine_open (String name, Engine_Attrs *attrs, Engine_Error *ec)
Open an Engine.
Int | Engine_fwriteTrace (Engine_Handle engine, String prefix, FILE *out)
Write Server's trace buffer to specifed file stream.
Engine_Error | Engine_getAlgInfo (String name, Engine_AlgInfo *algInfo, Int index)
Get details of an algorithm configured into an engine.
Int | Engine_getCpuLoad (Engine_Handle engine)
Get Server's cpu usage in percent.
Engine_Error | Engine_getLastError (Engine_Handle engine)
Get error code of the last failed operation.
String | Engine_getName (Engine_Handle engine)
Get the name of an opened engine.
Engine_Error | Engine_getNumAlgs (String name, Int *numAlgs)
Get the number of algorithms configured into an engine.
Server_Handle | Engine_getServer (Engine_Handle engine)
Get handle to an Engine's server.
UInt32 | Engine_getUsedMem (Engine_Handle engine)
Get Server's total memory usage.
Int | Engine_setTrace (Engine_Handle engine, String mask)
Set Server's trace mask.

Variables

Engine_Attrs Engine_ATTRS
Default engine attributes.

Define Documentation

#define Engine_GTNAME "CE"

Trace name for the Engine module.

#define Engine_EOK 0

Success.

#define Engine_EEXIST 1

Name does not exist.

#define Engine_ENOMEM 2

Unable to allocate memory.

#define Engine_EDSPLOAD 3

Unable to load the DSP.

#define Engine_ENOCOMM 4

Unable to create a comm connection to the DSP.

#define Engine_ENOSERVER 5

Unable to locate the server on the DSP.

#define Engine_ECOMALLOC 6

Unable to allocate communication buffer.

#define Engine_ERUNTIME 7

Internal engine runtime failure.

#define Engine_ECODECCREATE 8

Creation of the Codec failed.

#define Engine_ECODECSTART 9

Start of the Codec failed. For codecs which are implemented as a thread, this implies that the codec thread of execution failed to start.

#define Engine_EINVAL 10

Bad paramater passed to method.

#define Engine_EBADSERVER 11

Incompatible server specified.

#define Engine_ENOTAVAIL 12

Service not available.

#define Engine_EWRONGSTATE 13

Call can not be made at this time.

#define Engine_EINUSE 14

Call can't be made at this time because a required name/resource is in use.

#define Engine_ENOTFOUND 15

Entity was not found.

#define Engine_ETIMEOUT 16

Timeout-based operation timed out.

Typedef Documentation

typedef struct Engine_Obj* Engine_Handle

Opaque handle to an engine.

typedef Int Engine_Error

Engine error code.

Function Documentation

Void Engine_close ( Engine_Handle engine )

Close an Engine.

Parameters:
[in] engine The handle to an engine, previously acquired by a call to Engine_open().
Precondition:
engine must not be referenced by any codec instance object; i.e., you must first delete all codec instances associated with engine before closing it.
engine is a valid (non-NULL) engine handle which is in the open state.
Engine_Handle Engine_open | ( | String | name,
 |  | Engine_Attrs * | attrs,
 |  | Engine_Error * | ec
 | ) |  |

Open an Engine.

The handle returned may be used to create one or more instances of a codec "contained" in the specified engine.

An engine may be opened more than once; each open returns a unique handle that can be used to create codec instances or get status of any underlying server.

Engine handles must not be concurrently accessed by multiple threads; each thread must either obtain its own handle (via Engine_open()) or explicitly serialize access to a shared handle.

Parameters:
[in] | name | The name of the engine to open. name is specified in the engine configuration.
[in] | attrs | Attributes for the open engine.
[out] | ec | Optional output error code
Return values:
NULL | An error has occurred.
non-NULL | The handle to the opened engine.
Precondition:
name is a non-NULL string.
name is a valid, pre-configured name of an engine.
As with all Codec Engine API's, CERuntime_init() must have previously been called.
Postcondition:
If the return handle is NULL and ec is non-NULL, *ec is set to a non-zero value indicating the cause of the failure.
If ec is non-NULL, the Engine_Error value is set to one of the following values:
  • Engine_EOK success
  • Engine_EEXIST name does not exist
  • Engine_ENOMEM can't allocate memory
  • Engine_EDSPLOAD can't load the DSP
  • Engine_ENOCOMM can't create a comm connection to DSP
  • Engine_ENOSERVER can't locate the server on the DSP
  • Engine_ECOMALLOC can't allocate communication buffer
Int Engine_fwriteTrace | ( | Engine_Handle | engine,
 |  | String | prefix,
 |  | FILE * | out
 | ) |  |

Write Server's trace buffer to specifed file stream.

Parameters:
[in] | engine | The handle to the opened engine.
[in] | prefix | A string to prepend to each line output; this allows one to easily identify trace from the server from the application's trace, for example.
[in] | out | A open FILE stream used to output the Server's trace characters.
Return values:
Integer number of characters copied to the specified FILE stream.
Precondition:
engine is a valid (non-NULL) engine handle and the engine is in the open state.
Postcondition:
In the event a negative value is returned, Engine_getLastError() will return one of the following values:
  • Engine_ERUNTIME Either an internal runtime error occured or the underlying server error occured.
  • Engine_EINUSE Server trace resource is already in use.
Engine_Error Engine_getAlgInfo | ( | String | name,
 |  | Engine_AlgInfo * | algInfo,
 |  | Int | index
 | ) |  |

Get details of an algorithm configured into an engine.

Parameters:
[in] | name | The name of the engine. name is specified in the engine configuration.
[out] | algInfo | Structure to store algorithm details. The algInfoSize field of this structure must be set to sizeof(Engine_AlgInfo) by the application.
[out] | index | The index of the algorithm to get the information.
Return values:
Engine_EOK | Success.
Engine_EEXIST | There is no engine with the given name.
Engine_ENOTFOUND | index is greater than or equal to the total number of algorithms configured for the engine, or index < 0.
Engine_EINVAL | The value of algInfoSize passed to this function does not match the CE library's sizeof(Engine_AlgInfo).
Precondition:
name is a non-NULL string.
algInfo is non-NULL.
As with all Codec Engine API's, CERuntime_init() must have previously been called.
Postcondition:
If name is a valid engine name and 0 <= index < the total number of algorithms configured for the engine, then algInfo will contain the information for the engine's ith (i = index) algorithm.
See also:
Engine_getNumAlgs().
Int Engine_getCpuLoad ( Engine_Handle engine )

Get Server's cpu usage in percent.

Deprecated:
This service has been replaced by Server_getCpuLoad() to better indicate that this API is not intended for obtaining the current processor's CPU load, rather it obtains the CPU load of a remote Server.
Parameters:
[in] engine The handle to the opened engine.
Return values:
integer between 0-100 indicating percentage of time the Server is processing measured over a period of approximately 1 second. If the load is unavailable, a negative value is returned.
Precondition:
engine is a valid (non-NULL) engine handle and the engine is in the open state.
Postcondition:
In the event a negative value is returned, Engine_getLastError() will return one of the following values:
  • Engine_ERUNTIME Either an internal runtime error occured or the underlying server error occured.
  • Engine_ENOTAVAIL The CPU load can not be computed.
See also:
Server_getCpuLoad()
Engine_Error Engine_getLastError ( Engine_Handle engine )

Get error code of the last failed operation.

Parameters:
[in] engine The handle to the opened engine.
Return values:
error code (Engine_Error) of the last failed engine operation.
Precondition:
engine is a valid (non-NULL) engine handle and the engine is in the open state.
String Engine_getName ( Engine_Handle engine )

Get the name of an opened engine.

Parameters:
[in] engine The handle to the opened engine.
Return values:
NULL | An error has occurred.
non-NULL | The name of the opened engine.
Engine_Error Engine_getNumAlgs | ( | String | name,
 |  | Int * | numAlgs
 | ) |  |

Get the number of algorithms configured into an engine.

Parameters:
[in] | name | The name of the engine. name is specified in the engine configuration.
[out] | numAlgs | The number of algorithms that are configured in the given engine.
Return values:
Engine_EOK | Success.
Engine_EEXIST | There is no engine with the given name.
Precondition:
name is a non-NULL string.
numAlgs is non-NULL.
As with all Codec Engine API's, CERuntime_init() must have previously been called.
Postcondition:
If name is a valid engine name, then numAlgs will contain the number of algorithms configured for the given engine.
See also:
Engine_getAlgs().
Server_Handle Engine_getServer ( Engine_Handle engine )

Get handle to an Engine's server.

This function returns the handle to an Engines server, that can be used with Server APIs to obtain information from and control the remote DSP server.

Parameters:
[in] engine The handle to the opened engine.
Return values:
Handle to engine's server.
Precondition:
engine is a valid (non-NULL) engine handle and the engine is in the open state.
UInt32 Engine_getUsedMem ( Engine_Handle engine )

Get Server's total memory usage.

Deprecated:
This service has been replaced by Server_getMemStat() to better indicate that this API is not intended for obtaining the current processor's memory statistics, rather it obtains the memory statistics of a remote Server. Also, Server_getMemStat() provides more granularity than Engine_getUsedMem().
Parameters:
[in] engine The handle to the opened engine.
Return values:
Total amount of used memory (in MAUs). If the amount is not available, 0 is returned and the reason can be retrieved via Engine_getLastError().
Precondition:
engine is a valid (non-NULL) engine handle and the engine is in the open state.
Postcondition:
in the event that 0 is returned, Engine_getLastError() will return one of the following values:
  • Engine_ERUNTIME Either an internal runtime error occured or the underlying server error occured.
  • Engine_ENOTAVAIL The memory usage can not be computed.
Int Engine_setTrace | ( | Engine_Handle | engine,
 |  | String | mask
 | ) |  |

Set Server's trace mask.

Parameters:
[in] | engine | The handle to the opened engine.
[in] | mask | Trace mask, e.g. "*=01234567"
Return values:
Engine_ENOSERVER | No server for this engine.
Engine_EINUSE | Trace resource is already in use.
Engine_ERUNTIME | Internal runtime error has occurred.
Precondition:
engine is a valid (non-NULL) engine handle and the engine is in the open state.
Remarks:
This only sets the trace for a remote server. To change the trace mask for the application-side of the framework, use GT_set().
See also:
GT_set()

Variable Documentation

Engine_Attrs Engine_ATTRS

Default engine attributes.

Default attrs.


Codec Engine System Programming Interface (SPI): CE Skeleton SPI

CE Skeleton SPI

Data Structures

struct | SKEL_Fxns
Table of functions defining the interface of a skeleton. More...

Typedefs

typedef VISA_Status(* | SKEL_CALLFXN )(VISA_Handle handle, VISA_Msg msg)
Prototype for a skeleton's call() implementation.
typedef VISA_Handle(* | SKEL_CREATEFXN )(Void *reserved, String name, Void *params)
Prototype for a skeleton's create() API.
typedef Void(* | SKEL_DESTROYFXN )(VISA_Handle handle)
Prototype for a skeleton's destroy() API.

Typedef Documentation

typedef VISA_Status(* SKEL_CALLFXN)(VISA_Handle handle, VISA_Msg msg)

Prototype for a skeleton's call() implementation.

Parameters:
[in] | handle | A handle to the current skeleton.
[in] | msg | A message sent by the algorithm's stub
typedef VISA_Handle(* SKEL_CREATEFXN)(Void *reserved, String name, Void *params)

Prototype for a skeleton's create() API.

Parameters:
[in] | reserved | Reserved.
[in] | name | Name of the algorithm to create.
[in] | params | Creation parameters for the algorithm.
Return values:
NULL | Error, unable to create the algorithm.
non-NULL | Handle to the successfully created algorithm.
typedef Void(* SKEL_DESTROYFXN)(VISA_Handle handle)

Prototype for a skeleton's destroy() API.

Parameters:
[in] | handle | A handle to the current skeleton.
[in] | msg | A message sent by the algorithm's stub


Codec Engine System Programming Interface (SPI): Data Structures

  • Data Structures
  • Data Structure Index
  • Data Fields

Data Structures

Here are the data structures with brief descriptions:
Engine_AlgInfo | Properties of an Engine algorithm
Engine_Attrs | Attributes of an Engine
IALG_Fxns | Defines the fields and methods that must be supplied by all XDAIS algorithms
IALG_MemRec | Memory records
IALG_Obj | Algorithm instance object definition
IALG_Params | Algorithm instance creation parameters
IALG_Status | Pointer to algorithm specific status structure
Memory_AllocParams | Parameters for Memory_alloc() & Memory_free()
SKEL_Fxns | Table of functions defining the interface of a skeleton
VISA_MsgHeader | VISA message header


Codec Engine System Programming Interface (SPI): Engine_AlgInfo Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields

Engine_AlgInfo Struct Reference
[Codec Engine Runtime]

Properties of an Engine algorithm. More...

#include <Engine.h>

Data Fields

Int | algInfoSize
String | name
String * | typeTab
Bool | isLocal

Detailed Description

Properties of an Engine algorithm.

See also:
Engine_getAlgInfo()

Field Documentation

Int Engine_AlgInfo::algInfoSize

Size of this structure.

String Engine_AlgInfo::name

Name of algorithm.

String* Engine_AlgInfo::typeTab

Inheritance hierarchy.

Bool Engine_AlgInfo::isLocal

If TRUE, run locally.

The documentation for this struct was generated from the following file:
  • Engine.h


Codec Engine System Programming Interface (SPI): Engine_Attrs Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields

Engine_Attrs Struct Reference
[Codec Engine Runtime]

Attributes of an Engine. More...

#include <Engine.h>

Data Fields

String procId

Detailed Description

Attributes of an Engine.

See also:
Engine_open() and Engine_ATTRS.

Field Documentation

String Engine_Attrs::procId

id of the processor that runs the server; only needed in the case that there's more than one processor that can provide the same server.

The documentation for this struct was generated from the following file:
  • Engine.h


Codec Engine System Programming Interface (SPI): IALG_Fxns Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields

IALG_Fxns Struct Reference
[IALG - XDAIS Algorithm Interface]

Defines the fields and methods that must be supplied by all XDAIS algorithms. More...

#include <ialg.h>

Data Fields

Void * | implementationId
Unique pointer that identifies the module implementing this interface.
Void(* | algActivate )(IALG_Handle handle)
Notification to the algorithm that its memory is "active" and algorithm processing methods may be called.
Int(* | algAlloc )(const IALG_Params *params, struct IALG_Fxns **parentFxns, IALG_MemRec *memTab)
Apps call this to query the algorithm about its memory requirements. Must be non-NULL.
Int(* | algControl )(IALG_Handle handle, IALG_Cmd cmd, IALG_Status *status)
Algorithm specific control and status.
Void(* | algDeactivate )(IALG_Handle handle)
Save all persistent data to non-scratch memory.
Int(* | algFree )(IALG_Handle handle, IALG_MemRec *memTab)
Apps call this to allow the algorithm to initialize memory requested via algAlloc(). Must be non-NULL.
Int(* | algInit )(IALG_Handle handle, const IALG_MemRec *memTab, IALG_Handle parent, const IALG_Params *params)
Initialize an algorithm's instance object. Must be non-NULL.
Void(* | algMoved )(IALG_Handle handle, const IALG_MemRec *memTab, IALG_Handle parent, const IALG_Params *params)
Notify algorithm instance that instance memory has been relocated.
Int(* | algNumAlloc )(Void)
Number of memory allocation requests required.

Detailed Description

Defines the fields and methods that must be supplied by all XDAIS algorithms.

Field Documentation

Void* IALG_Fxns::implementationId

Unique pointer that identifies the module implementing this interface.

Void(* IALG_Fxns::algActivate)(IALG_Handle handle)

Notification to the algorithm that its memory is "active" and algorithm processing methods may be called.

Parameters:
[in] handle Handle to an algorithm instance.
Remarks:
algActivate() initializes any of the instance's scratch buffers using the persistent memory that is part of the algorithm's instance object.
The implementation of algActivate() (and algDeactivate()) is required if the algorithm requests memory of type IALG_SCRATCH.
The algActivate() method should only be implemented if a module wants to factor out initialization code that can be executed once prior to processing multiple consecutive frames of data.
If a module does not implement this method, the algActivate() field in the module's static function table (of type IALG_Fxns) must be set to NULL. This is equivalent to the following implementation:
      Void algActivate(IALG_Handle handle)
      {
      }
Precondition:
algActivate() can only be called after a successful return from algInit().
handle must be a valid handle for the algorithm's instance object.
No other algorithm method is currently being run on this instance. This method never preempts any other method on the same instance.
If the algorithm has implemented the IDMA2 interface, algActivate() can only be called after a successful return from dmaInit().
Postcondition:
All methods related to the algorithm may now be executed by client (subject to algorithm specific restrictions).
See also:
algDeactivate().
Int(* IALG_Fxns::algAlloc)(const IALG_Params *params, struct IALG_Fxns **parentFxns, IALG_MemRec *memTab)

Apps call this to query the algorithm about its memory requirements. Must be non-NULL.

Parameters:
[in] | params | Algorithm specific attributes.
[out] | parentFxns | Parent algorithm functions.
[out] | memTab | array of memory records.
Remarks:
algAlloc() returns a table of memory records that describe the size, alignment, type and memory space of all buffers required by an algorithm (including the algorithm's instance object itself). If successful, this function returns a positive non-zero value indicating the number of records initialized. This function can never initialize more memory records than the number returned by algNumAlloc().
If algNumAlloc() is not implemented, the maximum number of initialized memory records is IALG_DEFMEMRECS.
The first argument to algAlloc() is a pointer to the creation parameters for the instance of the algorithm object to be created. This pointer is algorithm-specific; i.e., it points to a structure that is defined by each particular algorithm. This pointer may be NULL; however, in this case, algAlloc() must assume default creation parameters and must not fail.
The second argument to algAlloc() is an optional parameter. algAlloc() may return a pointer to its parent's IALG functions. If this output value is assigned a non-NULL value, the client must create the parent instance object using the designated IALG functions pointer. The parent instance object must then be passed to algInit().
algAlloc() may be called at any time and it must be idempotent; i.e., it can be called repeatedly without any side effects, and always returns the same result.
Algorithms are encouraged to return (and document!) clear, algorithm-specific error codes from algAlloc(). Create-time failures are a common integration issue, and the clearer a return value, the sooner the algorithm integrator can identify and resolve the issue.
Precondition:
The number of memory records in the array memTab[] is no less than the number returned by algNumAlloc().
*parentFxns is a valid pointer to an IALG_Fxns pointer variable.
Postcondition:
If the algorithm needs a parent object to be created, the pointer *parentFxns is set to a non-NULL value that points to a valid IALG_Fxns structure, the parent's IALG implementation. Otherwise, this pointer is not set. algAlloc() may elect to ignore the parentFxns pointer altogether.
For each memory descriptor in memTab with an IALG_WRITEONCE attribute, the algorithm has either set the base field to a non-NULL value, which is the address of a statically allocated and initialized memory buffer of the indicated 'size', or has set the base field to NULL, thereby requiring the memory for the buffer to be provided by the client.
Exactly n elements of the memTab[] array are initialized, where n is the return value from this operation.
For each memory descriptor in memTab with an IALG_PERSIST or IALG_SCRATCH attribute, the algorithm does not set its base field.
memTab[0] defines the memory required for the instance's object and this object's first field is an IALG_Obj structure.
memTab[0] is requested as persistent memory.
See also:
algFree()
Int(* IALG_Fxns::algControl)(IALG_Handle handle, IALG_Cmd cmd, IALG_Status *status)

Algorithm specific control and status.

Parameters:
[in] | handle | Algorithm instance handle.
[in] | cmd | Algorithm specific command.
[out] | status | Algorithm specific status.
Remarks:
algControl() sends an algorithm specific command, cmd, and an input/output status buffer pointer to an algorithm's instance object.
In preemptive execution environments, algControl() may preempt a module's other metods (for example, its processing methods).
The implementation of algControl() is optional. If a module does not implement this method, the algControl() field in the module's static function table (of type IALG_Fxns) must be set to NULL. This is equivalent to the following implementation:
      Void algControl(IALG_Handle handle, IALG_Cmd cmd, IALG_Status *status)
      {
          return (IALG_EFAIL);
      }
Precondition:
algControl() can only be called after a successful return from algInit().
handle must be a valid handle for the algorithm's instance object.
Algorithm specific cmd values are always less than IALG_SYSCMD.
Postcondition:
If the cmd value is not recognized by the algorithm, the return value is not equal to IALG_EOK.
See also:
algInit()
Void(* IALG_Fxns::algDeactivate)(IALG_Handle handle)

Save all persistent data to non-scratch memory.

Parameters:
[in] handle Algorithm instance handle.
Remarks:
algDeactivate() saves any persistent information to non-scratch buffers using the persistent memory that is part of the algorithm's instance object.
handle is used by the algorithm to identify the various buffers that must be saved prior to the next cycle of algActivate() and processing.
The implementation of algDeactivate() (and algActivate()) is required if the algorithm requests memory of type IALG_SCRATCH.
The algDeactivate() method is only implemented if a module wants to factor out initialization code that can be executed once prior to processing multiple consecutive frames of data.
If a module does not implement this method, the algDeactivate() field in the module's static function table (of type IALG_Fxns) must be set to NULL. This is equivalent to the following implementation:
      Void algDeactivate(IALG_Handle handle)
      {
      }
Precondition:
algDeactivate() can only be called after a successful return from algInit().
The instance object is currently "active"; i.e., all instance memory is active and if an algActivate() method is defined, it has been called.
handle must be a valid handle for the algorithm's instance object.
No other algorithm method is currently being run on this instance. This method never preempts any other method on the same instance.
Postcondition:
No methods related to the algorithm may now be executed by the client; only algActivate() or algFree() may be called.
All instance scratch memory may be safely overwritten.
See also:
algActivate()
Int(* IALG_Fxns::algFree)(IALG_Handle handle, IALG_MemRec *memTab)

Apps call this to allow the algorithm to initialize memory requested via algAlloc(). Must be non-NULL.

Parameters:
[in] | handle | Algorithm instance handle.
[out] | memTab | Output array of memory records.
Remarks:
algFree() returns a table of memory records that describe the base address, size, alignment, type and memory space of all buffers previously allocated for the algorithm's instance (including the algorithm's instance object itself) specified by handle. This function always returns a positive non-zero value indicating the number of records initialized. This function can never initialize more memory records than the value returned by algNumAlloc().
Precondition:
The memTab[] array contains at least algNumAlloc() records.
handle must be a valid handle for the algorithm's instance object.
If the prior call to algAlloc() returned a non-NULL parent functions pointer, then the parent instance must be an active instance object created via that function pointer.
No other agorithm method is currently being run on this instance. This method never preempts any other method on the same instance.
Postcondition:
memTab[] contains pointers to all of the memory passed to the algorithm via algInit().
The size and alignment fields contain the same values passed to the client via algAlloc(); i.e., if the client makes changes to the values returned via algAlloc() and passes these new values to algInit(), the algorithm is not responsible for retaining any such changes.
See also:
algAlloc()
Int(* IALG_Fxns::algInit)(IALG_Handle handle, const IALG_MemRec *memTab, IALG_Handle parent, const IALG_Params *params)

Initialize an algorithm's instance object. Must be non-NULL.

Parameters:
[in] | handle | Algorithm instance handle. This is a pointer to an initialized IALG_Obj structure. Its value is identical to the memTab[0].base.
[in] | memTab | Array of allocated buffers.
[in] | parent | Handle of algorithm's parent instance.
[in] | params | Pointer to algorithm's instance parameters.
Remarks:
algInit() performs all initialization necessary to complete the run-time creation of an algorithm's instance object. After a successful return from algInit(), the algorithm's instance object is ready to be used to process data.
handle is a pointer to an initialized IALG_Obj structure. Its value is identical to the memTab[0].base.
memTab is a table of memory records that describe the base address, size, alignment, type, and memory space of all buffers allocated for an algorithm instance (including the algorithm's instance object itself). The number of initialized records is identical to the number returned by a prior call to algAlloc().
parent is a handle to another algorithm instance object. This parameter is often NULL; indicating that no parent object exists. This parameter allows clients to create a shared algorithm instance object and pass it to other algorithm instances. For example, a parent instance object might contain global read-only tables that are used by several instances of a vocoder.
params is a pointer to algorithm-specific parameters that are necessary for the creation and initialization of the instance object. This pointer points to the same parameters passed to the algAlloc() operation. However, this pointer may be NULL. In this case, algInit(), must assume default creation parameters.
Algorithms are encouraged to return (and document!) clear, algorithm-specific error codes from algInit(). Create-time failures are a common integration issue, and the clearer a return value, the sooner the algorithm integrator can identify and resolve the issue.
The algorithm must not access any scratch resources, memory or otherwise, until it has been activated (see algActivate()). A common error is to initialize scratch resources during algInit(). This is an error as another algorithm, or instance of the same algorithm, may be active when this instance's algInit() is called. This algorithm must not access scratch resources until it is active.
The client is not required to satisfy the IALG_MemSpace attribute of the requested memory. Note however that C6000 algorithms that use DMA may strictly require the client to satisfy its on-chip memory requirements and may not function correctly otherwise.
The client may allocate the requested IALG_WRITEONCE buffers once (or never, if the algorithm has assigned a base address in the prior call to algAlloc) and use the same buffers to initialize multiple instances of the same algorithm that are created with identical parameters.
Example:
      typedef struct EncoderObj {
          IALG_Obj ialgObj;
          int workBuf;
          Int workBufLen;
          ... ;
      } EncoderObj;

      Int algInit(IALG_Handle handle, IALG_MemRec memTab[],
              IALG_Handle parent, IALG_Params *params)
      {
          EncoderObj *inst = (EncoderObj *)handle;
          EncoderParams *encParams = (EncoderParams *)params;

          if (encParams == NULL) {
              encParams = MYDEFAULTPARAMS;
          }

          if (IALG_isOffChip(memTab[1].space)) {
              // unsupported off-chip memory, return documented error code
              return (MYMOD_MYVENDOR_EUNSUPPORTEDOFFCHIPWORKBUF);
          }

          inst->workBuf = memTab[1].base;
          inst->workBufLen = encParams->frameDuration * 8;
          ...

          return (IALG_EOK);
      }
Precondition:
memTab contains pointers to non-overlapping buffers with the size and alignment requested via a prior call to algAlloc(). In addition, the algorithm parameters, params, passed to algAlloc() are identical to those passed to this operation.
handle must be a valid handle for the algorithm's instance object; i.e., handle == memTab[0].base and handle->fxns is initialized to point to the appropriate IALG_Fxns structure.
The prior call to algAlloc() using same creation params must have returned value > 1. This pre-condition ensures that any create-time parameter validation can be done once (in algAlloc()), and is not required to be done in algInit(). Note that algInit() can, and should, validate any algorithm- specific requirements on resources received (e.g. internal memory, etc).
If the prior call to algAlloc() has not assigned a non-NULL base address to an IALG_WRITEONCE memTab entry, the client must provide the memory resource with the requested size and alignment.
If the prior call to algAlloc() returned a non-NULL parent functions pointer, then the parent handle, parent, must be a valid handle to an instance object created via that function pointer.
No other algorithm method is currently being run on this instance. This method never preempts any other method on the same instance.
If parent is non-NULL, no other method is currently being run on the parent instance; i.e., this method never preempts any other method on the parent instance.
If the prior call to algAlloc() assigned a non-NULL base address to an IALG_WRITEONCE memTab[] entry, the client may pass back the same address in the base field without allocating additional memory for that persistent write-once buffer. Alternatively, the client may treat IALG_WRITEONCE buffers in the same way as IALG_PERSIST buffers; by allocating new memory and granting it to the algorithm using the base field.
The buffer pointed to in memTab[0] is initialized with a pointer to the appropriate IALG_Fxns structure followed by all 0s.
Postcondition:
With the exception of any initialization performed by algActivate() and any optional auxilary interface initialization functions (such as IRES and IDMA3), all of the instance's persistent and write-once memory is initialized and the object is ready to be used.
All subsequent memory accesses to the IALG_WRITEONCE buffers by this algorithm instance will be read-only.
If the algorithm has implemented the IDMA2 interface, the dmaGetChannels() operation can be called.
Return values:
IALG_EOK | Successful return status code.
IALG_EFAIL | Unspecified error return status code.
Custom error | Algorithm-specific error - see algorithm's documentation.
See also:
algAlloc()
algMoved()
Void(* IALG_Fxns::algMoved)(IALG_Handle handle, const IALG_MemRec *memTab, IALG_Handle parent, const IALG_Params *params)

Notify algorithm instance that instance memory has been relocated.

Parameters:
[in] | handle | Algorithm instance handle.
[in] | memTab | Array of allocated buffers.
[in] | parent | Handle of algorithm's parent instance.
[in] | params | Pointer to algorithm's instance parameters.
Remarks:
algMoved() performs any reinitialization necessary to insure that, if an algorithm's instance object has been moved by the client, all internal data references are recomputed.
The implementation of algMoved() is optional. However, it is highly recommended that this method be implemented. If a module does not implement this method, the algMoved() field in the module's static function table (of type IALG_Fxns) must be set to NULL. This is equivalent to asserting that the algorithm's instance objects cannot be moved.
Int(* IALG_Fxns::algNumAlloc)(Void)

Number of memory allocation requests required.

Remarks:
algNumAlloc() returns the maximum number of memory allocation requests that the algAlloc() method requires. This operation allows clients to allocate sufficient space to call the algAlloc() method or fail because insufficient space exists to support the creation of the algorithm's instance object. algNumAlloc() may be called at any time, and it must be idempotent; i.e., it can be called repeatedly without any side effects, and always returns the same result.
algNumAlloc() is optional; if it is not implemented, the maximum number of memory records for algAlloc() is assumed to be IALG_DEFMEMRECS. This is equivalent to the following implementation:
      Void algNumAlloc(Void)
      {
          return (IALG_DEFNUMRECS);
      }
If a module does not implement this method, the algNumAlloc() field in the module's static function table (of type IALG_Fxns) must be set to NULL.
Postcondition:
The return value from algNumAlloc() is always greater than or equal to one and always equals or exceeds the value returned by algAlloc().
Example:
      #define NUMBUF 3
      extern IALG_Fxns *subAlg;

      Int algNumAlloc(Void)
      {
          return (NUMBUF + subAlg->algNumAlloc());
      }

      Int algAlloc(const IALG_Params *p, struct IALG_Fxns **pFxns,
              IALG_MemRec memTab)
      {
          Int n;

          ...

          n = subAlg->algAlloc(0, memTab);
          return (n + NUMBUF);
      }
See also:
algAlloc()
The documentation for this struct was generated from the following file:
  • ialg.h


Codec Engine System Programming Interface (SPI): IALG_MemRec Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields

IALG_MemRec Struct Reference
[IALG - XDAIS Algorithm Interface]

Memory records. More...

#include <ialg.h>

Data Fields

Uns | size
Int | alignment
IALG_MemSpace space
IALG_MemAttrs attrs
Void * | base

Detailed Description

Memory records.

Field Documentation

Uns IALG_MemRec::size

Size in MAU of allocation

Int IALG_MemRec::alignment

Alignment requirement (MAU)

IALG_MemSpace IALG_MemRec::space

Allocation space

IALG_MemAttrs IALG_MemRec::attrs

Memory attributes

Void* IALG_MemRec::base

Base address of allocated buf

The documentation for this struct was generated from the following file:
  • ialg.h


Codec Engine System Programming Interface (SPI): IALG_Obj Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields

IALG_Obj Struct Reference
[IALG - XDAIS Algorithm Interface]

Algorithm instance object definition. More...

#include <ialg.h>

Collaboration diagram for IALG_Obj:
[legend]

Data Fields

struct IALG_Fxns * fxns

Detailed Description

Algorithm instance object definition.

Remarks:
All XDAIS algorithm instance objects must have this structure as their first element. However, they do not need to initialize it; initialization of this sub-structure is done by the "framework".

Field Documentation

struct IALG_Fxns* IALG_Obj::fxns [read]

Pointer to IALG function table.

The documentation for this struct was generated from the following file:
  • ialg.h


Codec Engine System Programming Interface (SPI): IALG_Params Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields

IALG_Params Struct Reference
[IALG - XDAIS Algorithm Interface]

Algorithm instance creation parameters. More...

#include <ialg.h>

Data Fields

Int size

Detailed Description

Algorithm instance creation parameters.

Remarks:
All XDAS algorithm parameter structures must have a this as their first element.

Field Documentation

Int IALG_Params::size

Number of MAU in the structure

The documentation for this struct was generated from the following file:
  • ialg.h


Codec Engine System Programming Interface (SPI): IALG_Status Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields

IALG_Status Struct Reference
[IALG - XDAIS Algorithm Interface]

Pointer to algorithm specific status structure. More...

#include <ialg.h>

Data Fields

Int size

Detailed Description

Pointer to algorithm specific status structure.

Remarks:
All XDAIS algorithm parameter structures must have this as their first element.

Field Documentation

Int IALG_Status::size

Number of MAU in the structure

The documentation for this struct was generated from the following file:
  • ialg.h


Codec Engine System Programming Interface (SPI): Memory_AllocParams Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields

Memory_AllocParams Struct Reference
[Codec Engine OSAL - Memory]

Parameters for Memory_alloc() & Memory_free(). More...

#include <Memory.h>

Data Fields

Memory_type type
UInt | flags
UInt | align
UInt | seg

Detailed Description

Parameters for Memory_alloc() & Memory_free().

See also:
Memory_DEFAULTPARAMS

Field Documentation

Memory_type Memory_AllocParams::type

Type of allocation.

See also:
Memory_type
UInt Memory_AllocParams::flags

Flags affecting allocation.

See also:
Memory_CACHED
Memory_NONCACHED
UInt Memory_AllocParams::align

Alignment of allocation.

UInt Memory_AllocParams::seg

Segment for allocation.

The documentation for this struct was generated from the following file:
  • Memory.h


Codec Engine System Programming Interface (SPI): SKEL_Fxns Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields

SKEL_Fxns Struct Reference
[CE Skeleton SPI]

Table of functions defining the interface of a skeleton. More...

#include <skel.h>

Data Fields

SKEL_CALLFXN call
SKEL_CREATEFXN apiCreate
SKEL_DESTROYFXN apiDestroy

Detailed Description

Table of functions defining the interface of a skeleton.

Field Documentation

SKEL_CALLFXN SKEL_Fxns::call

A skeleton's "call" implementation.

SKEL_CREATEFXN SKEL_Fxns::apiCreate

A skeleton's "create" API.

SKEL_DESTROYFXN SKEL_Fxns::apiDestroy

A skeleton's "destroy" API.

The documentation for this struct was generated from the following file:
  • skel.h


Codec Engine System Programming Interface (SPI): VISA_MsgHeader Struct Reference

  • Data Structures
  • Data Structure Index
  • Data Fields

VISA_MsgHeader Struct Reference
[CE Stub SPI]

VISA message header. More...

#include <visa.h>

Data Fields

NODE_MsgHeader | header
Int | cmd
VISA_Status status

Detailed Description

VISA message header.

Remarks:
This must be the first field in a message

Field Documentation

NODE_MsgHeader VISA_MsgHeader::header
Int VISA_MsgHeader::cmd

Command id

VISA_Status VISA_MsgHeader::status

Return status

The documentation for this struct was generated from the following file:
  • visa.h


Codec Engine System Programming Interface (SPI): Data Fields

  • Data Structures
  • Data Structure Index
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • f
  • h
  • i
  • n
  • p
  • s
  • t
Here is a list of all struct and union fields with links to the structures/unions they belong to:

- a -

  • algActivate : IALG_Fxns
  • algAlloc : IALG_Fxns
  • algControl : IALG_Fxns
  • algDeactivate : IALG_Fxns
  • algFree : IALG_Fxns
  • algInfoSize : Engine_AlgInfo
  • algInit : IALG_Fxns
  • algMoved : IALG_Fxns
  • algNumAlloc : IALG_Fxns
  • align : Memory_AllocParams
  • alignment : IALG_MemRec
  • apiCreate : SKEL_Fxns
  • apiDestroy : SKEL_Fxns
  • attrs : IALG_MemRec

- b -

  • base : IALG_MemRec

- c -

  • call : SKEL_Fxns
  • cmd : VISA_MsgHeader

- f -

  • flags : Memory_AllocParams
  • fxns : IALG_Obj

- h -

  • header : VISA_MsgHeader

- i -

  • implementationId : IALG_Fxns
  • isLocal : Engine_AlgInfo

- n -

  • name : Engine_AlgInfo

- p -

  • procId : Engine_Attrs

- s -

  • seg : Memory_AllocParams
  • size : IALG_MemRec , IALG_Status , IALG_Params
  • space : IALG_MemRec
  • status : VISA_MsgHeader

- t -

  • type : Memory_AllocParams
  • typeTab : Engine_AlgInfo


Codec Engine System Programming Interface (SPI): File Index

  • File List
  • Globals

File List

Here is a list of all files with brief descriptions:
Engine.h [code] | The Codec Engine Runtime. Provides the user an inteface to open and manipulate an engine which can instantiate and communicate with xDAIS algorithms that run either on the local CPU or on a "remote" DSP Server
ialg.h [code] | This header defines all types, constants, and functions defined by XDAIS for algorithms
Memory.h [code] | The Codec Engine OSAL Memory interface. Provides the user an OS-independent Memory abstraction
skel.h [code] | The Codec Engine System Programming Interface (SPI) for skeleton developers
spi.h [code] |
visa.h [code] | The Codec Engine System Programming Interface. Provides system developers with services necessary to implement stubs and skeletons
xdas.h [code] | This header defines all types and constants used in the XDAS interfaces


Codec Engine System Programming Interface (SPI): Engine.h File Reference

  • File List
  • Globals
packages » ti » sdo » ce

Engine.h File Reference

Detailed Description

The Codec Engine Runtime. Provides the user an inteface to open and manipulate an engine which can instantiate and communicate with xDAIS algorithms that run either on the local CPU or on a "remote" DSP Server.

#include <ti/sdo/ce/Server.h>
#include <ti/sdo/ce/ipc/Comm.h>
#include <ti/xdais/ialg.h>
#include <ti/sdo/ce/node/node.h>
#include <stddef.h>
#include <stdio.h>
Include dependency graph for Engine.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | Engine_Attrs
Attributes of an Engine. More...
struct | Engine_AlgInfo
Properties of an Engine algorithm. More...

Defines

#define | Engine_GTNAME "CE"
Trace name for the Engine module.
#define | Engine_EOK 0
#define | Engine_EEXIST 1
#define | Engine_ENOMEM 2
#define | Engine_EDSPLOAD 3
#define | Engine_ENOCOMM 4
#define | Engine_ENOSERVER 5
#define | Engine_ECOMALLOC 6
#define | Engine_ERUNTIME 7
#define | Engine_ECODECCREATE 8
#define | Engine_ECODECSTART 9
#define | Engine_EINVAL 10
#define | Engine_EBADSERVER 11
#define | Engine_ENOTAVAIL 12
#define | Engine_EWRONGSTATE 13
#define | Engine_EINUSE 14
#define | Engine_ENOTFOUND 15
#define | Engine_ETIMEOUT 16

Typedefs

typedef struct Engine_Obj * | Engine_Handle
Opaque handle to an engine.
typedef Int | Engine_Error
Engine error code.

Functions

Void | Engine_close (Engine_Handle engine)
Close an Engine.
Engine_Handle | Engine_open (String name, Engine_Attrs *attrs, Engine_Error *ec)
Open an Engine.
Int | Engine_fwriteTrace (Engine_Handle engine, String prefix, FILE *out)
Write Server's trace buffer to specifed file stream.
Engine_Error | Engine_getAlgInfo (String name, Engine_AlgInfo *algInfo, Int index)
Get details of an algorithm configured into an engine.
Int | Engine_getCpuLoad (Engine_Handle engine)
Get Server's cpu usage in percent.
Engine_Error | Engine_getLastError (Engine_Handle engine)
Get error code of the last failed operation.
String | Engine_getName (Engine_Handle engine)
Get the name of an opened engine.
Engine_Error | Engine_getNumAlgs (String name, Int *numAlgs)
Get the number of algorithms configured into an engine.
Server_Handle | Engine_getServer (Engine_Handle engine)
Get handle to an Engine's server.
UInt32 | Engine_getUsedMem (Engine_Handle engine)
Get Server's total memory usage.
Int | Engine_setTrace (Engine_Handle engine, String mask)
Set Server's trace mask.

Variables

Engine_Attrs Engine_ATTRS
Default engine attributes.


Codec Engine System Programming Interface (SPI): ialg.h File Reference

  • File List
  • Globals
cetools » packages » ti » xdais

ialg.h File Reference

Detailed Description

This header defines all types, constants, and functions defined by XDAIS for algorithms.

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | IALG_MemRec
Memory records. More...
struct | IALG_Obj
Algorithm instance object definition. More...
struct | IALG_Params
Algorithm instance creation parameters. More...
struct | IALG_Status
Pointer to algorithm specific status structure. More...
struct | IALG_Fxns
Defines the fields and methods that must be supplied by all XDAIS algorithms. More...

Defines

#define | IALG_DEFMEMRECS 4
#define | IALG_OBJMEMREC 0
#define | IALG_SYSCMD 256
#define | IALG_EOK 0
#define | IALG_EFAIL -1
#define | IALG_CUSTOMFAILBASE -2048
#define | IALG_CUSTOMFAILEND -256
#define | IALG_MPROG 0x0008
#define | IALG_MXTRN 0x0010
#define | IALG_isProg(s)
#define | IALG_isOffChip(s)

Typedefs

typedef struct IALG_Obj * | IALG_Handle
Handle to an algorithm instance object.
typedef unsigned int | IALG_Cmd
Algorithm specific command.

Enumerations

enum IALG_MemAttrs {
IALG_SCRATCH,
IALG_PERSIST,
IALG_WRITEONCE
}

Memory attributes.

More...
enum IALG_MemSpace {
IALG_EPROG,
IALG_IPROG,
IALG_ESDATA,
IALG_EXTERNAL,
IALG_DARAM0 = 0,
IALG_DARAM1 = 1,
IALG_SARAM = 2,
IALG_SARAM0 = 2,
IALG_SARAM1 = 3,
IALG_DARAM2 = 4,
IALG_SARAM2 = 5
}

Defined memory spaces.

More...


Codec Engine System Programming Interface (SPI): Memory.h File Reference

  • File List
  • Globals
packages » ti » sdo » ce » osal

Memory.h File Reference

Detailed Description

The Codec Engine OSAL Memory interface. Provides the user an OS-independent Memory abstraction.

Go to the source code of this file.

Data Structures

struct | Memory_AllocParams
Parameters for Memory_alloc() & Memory_free(). More...

Defines

#define | Memory_DEFAULTALIGNMENT ((UInt)(-1))
#define | Memory_GTNAME "OM"
#define | Memory_CACHED 0x00000000
#define | Memory_NONCACHED 0x00000001
#define | Memory_CACHEDMASK 0x00000001

Enumerations

enum Memory_type {
Memory_MALLOC = 0,
Memory_SEG = 1,
Memory_CONTIGPOOL = 2,
Memory_CONTIGHEAP = 3
}

Enum values for Memory_AllocParams.type.

More...

Functions

Ptr | Memory_alloc (UInt size, Memory_AllocParams *params)
General memory allocation.
Void | Memory_cacheInv (Ptr addr, Int sizeInBytes)
Invalidate a range of cache.
Void | Memory_cacheWb (Ptr addr, Int sizeInBytes)
Write back cache.
Void | Memory_cacheWbInv (Ptr addr, Int sizeInBytes)
Write back and invalidate cache.
Ptr | Memory_contigAlloc (UInt size, UInt align)
Allocate physically contiguous blocks of memory.
Bool | Memory_contigFree (Ptr addr, UInt size)
Free memory allocated by Memory_contigAlloc().
Bool | Memory_free (Ptr addr, UInt size, Memory_AllocParams *params)
Free memory allocated with Memory_alloc().
Void | Memory_dumpKnownContigBufsList (Void)
Dumps the list of all translated/registered bufs.
UInt32 | Memory_getBufferPhysicalAddress (Ptr virtualAddress, Int sizeInBytes, Bool *isContiguous)
Converts application virtual address to a physical address.
Int | Memory_getHeapId (String name)
Get the heap heap ID corresponding to a heap name. This number will be between 0 and the value returned by Memory_getNumHeaps(). The heap Id can be passed to Memory_redefine(), Memory_restoreHeap(), and Memory_segStat().
Int | Memory_getNumHeaps ()
Get the number of memory heaps.
Ptr | Memory_getBufferVirtualAddress (UInt32 physicalAddress, Int sizeInBytes)
Obtains the virtual address of a physically contiguous buffer.
Void | Memory_registerContigBuf (UInt32 virtualAddress, UInt32 sizeInBytes, UInt32 physicalAddress)
Register a physical buffer allocated without Memory_contigAlloc().
Void | Memory_unregisterContigBuf (UInt32 virtualAddress, UInt32 sizeInBytes)
Unregisters a physical buffer allocated without Memory_contigAlloc().

Variables

Memory_AllocParams Memory_DEFAULTPARAMS
Default parameters for Memory_alloc() & Memory_free().


Codec Engine System Programming Interface (SPI): skel.h File Reference

  • File List
  • Globals
packages » ti » sdo » ce

skel.h File Reference

Detailed Description

The Codec Engine System Programming Interface (SPI) for skeleton developers.

#include <ti/sdo/ce/visa.h>
Include dependency graph for skel.h:

Go to the source code of this file.

Data Structures

struct | SKEL_Fxns
Table of functions defining the interface of a skeleton. More...

Typedefs

typedef VISA_Status(* | SKEL_CALLFXN )(VISA_Handle handle, VISA_Msg msg)
Prototype for a skeleton's call() implementation.
typedef VISA_Handle(* | SKEL_CREATEFXN )(Void *reserved, String name, Void *params)
Prototype for a skeleton's create() API.
typedef Void(* | SKEL_DESTROYFXN )(VISA_Handle handle)
Prototype for a skeleton's destroy() API.


Codec Engine System Programming Interface (SPI): spi.h File Reference

  • File List
  • Globals

spi.h File Reference

Go to the source code of this file.


Codec Engine System Programming Interface (SPI): visa.h File Reference

  • File List
  • Globals
packages » ti » sdo » ce

visa.h File Reference

Detailed Description

The Codec Engine System Programming Interface. Provides system developers with services necessary to implement stubs and skeletons.

#include <stddef.h>
#include <ti/sdo/ce/node/node.h>
#include <ti/xdais/ialg.h>
#include <ti/sdo/ce/Engine.h>
Include dependency graph for visa.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct | VISA_MsgHeader
VISA message header. More...

Defines

#define | VISA_EOK 0
Success.
#define | VISA_ERUNTIME -1
Internal runtime error.
#define | VISA_EFAIL -2
General system error.
#define | VISA_ETIMEOUT -100
Timeout occurred.
#define | VISA_FOREVER Engine_FOREVER
Special value for timeout parameter indicating never timeout.

Typedefs

typedef Int | VISA_Status
VISA result data type.
typedef struct VISA_Obj * | VISA_Handle
Opaque handle to a node.
typedef VISA_MsgHeader * | VISA_Msg

Functions

VISA_Msg | VISA_allocMsg (VISA_Handle visa)
Obtain an algorithm instance's message.
VISA_Status | VISA_call (VISA_Handle visa, VISA_Msg *msg)
Invoke the operation specified in the message and wait for it to complete.
VISA_Status | VISA_callAsync (VISA_Handle visa, VISA_Msg *msg)
Invoke the operation specified in the message and return without waiting for it to complete.
VISA_Status | VISA_wait (VISA_Handle visa, VISA_Msg *msg, UInt timeout)
Wait for the oldest operation from a command specified with VISA_callAsync() to complete.
Void | VISA_freeMsg (VISA_Handle visa, VISA_Msg msg)
Release an algorithm instance's message.
VISA_Status | VISA_getAlgMemRecs (VISA_Handle visa, IALG_MemRec *memTab, Int size, Int *numRecs)
Get the IALG_MemRec memory assigned to an algorithm instance.
VISA_Status | VISA_getAlgNumRecs (VISA_Handle visa, Int *numRecs)
Get the number of IALG_MemRecs assigned to an algorithm.
Void | VISA_getContext (VISA_Handle visa, UInt32 *pContext)
Get optional context parameter.
Ptr | VISA_getCodecClassConfig (VISA_Handle visa)
Get codec-specific values for the VISA class-specific (or codec-specific if the codec doesn't extend VISA) stub-and/ or-skeleton configuration data (that some classes have).
UInt | VISA_getMaxMsgSize (VISA_Handle visa)
Returns max size of messages allocated by VISA_allocMsg().
Void | VISA_setContext (VISA_Handle visa, UInt32 context)
Set optional context parameter.
Bool | VISA_isLocal (VISA_Handle visa)
Indicates whether VISA codecs run on a remote or local CPU.

VISA_Handle | VISA_create (Engine_Handle engine, String name, IALG_Params *params, size_t msgSize, String type)
Create a new instance of an algorithm.
Void | VISA_delete (VISA_Handle visa)
Delete an instance of an algorithm.
VISA_Handle | VISA_create2 (Engine_Handle engine, String name, IALG_Params *params, Int paramsSize, size_t msgSize, String type)
Create a new instance of an algorithm.
Void | VISA_enter (VISA_Handle visa)
Enter an algorithm's critical section. This must be called before any of the algorithm's IALG_Fxns are invoked.
Void | VISA_exit (VISA_Handle visa)
Leave an algorithm's critical section. This must be called after the API has completed calling an algorithm's IALG_Fxns.
Ptr | VISA_getAlgHandle (VISA_Handle visa)
Obtains an algorithm's handle. This is the handle required to be passed to the algorithm's IALG_Fxns.
Ptr | VISA_getAlgorithmHandle (VISA_Handle visa)
Obtains an algorithm's handle. If the algorithm is local, this is the handle that can be passed to Algorithm APIs, not to the IALG_Fxns.
IALG_Fxns * | VISA_getAlgFxns (VISA_Handle visa)
Get implementation functions for this algorithm.

Typedef Documentation

typedef struct VISA_Obj* VISA_Handle

Opaque handle to a node.

typedef VISA_MsgHeader* VISA_Msg


Codec Engine System Programming Interface (SPI): xdas.h File Reference

  • File List
  • Globals
cetools » packages » ti » xdais

xdas.h File Reference

Detailed Description

This header defines all types and constants used in the XDAS interfaces.

Remarks:
The types are mapped to the types defined in std.h.

Go to the source code of this file.

Defines

#define | XDAS_TRUE 1
#define | XDAS_FALSE 0

Typedefs

typedef Void | XDAS_Void
typedef Uint8 | XDAS_Bool
typedef Int8 | XDAS_Int8
typedef Uint8 | XDAS_UInt8
typedef Int16 | XDAS_Int16
typedef Uint16 | XDAS_UInt16
typedef Int32 | XDAS_Int32
typedef Uint32 | XDAS_UInt32


Codec Engine System Programming Interface (SPI): Directory Hierarchy

Directories

This directory hierarchy is sorted roughly, but not completely, alphabetically:
  • cetools
    • packages
      • ti
        • xdais
  • packages
    • ti
      • sdo
        • ce
          • osal


Codec Engine System Programming Interface (SPI): cetools/ Directory Reference

cetools

cetools Directory Reference

Directories

directory packages


Codec Engine System Programming Interface (SPI): cetools/packages/ Directory Reference

cetools » packages

packages Directory Reference

Directories

directory ti


Codec Engine System Programming Interface (SPI): cetools/packages/ti/ Directory Reference

cetools » packages » ti

ti Directory Reference

Directories

directory xdais


Codec Engine System Programming Interface (SPI): cetools/packages/ti/xdais/ Directory Reference

cetools » packages » ti » xdais

xdais Directory Reference

Files

file | ialg.h [code]

This header defines all types, constants, and functions defined by XDAIS for algorithms.

file | xdas.h [code]

This header defines all types and constants used in the XDAS interfaces.


Codec Engine System Programming Interface (SPI): packages/ Directory Reference

packages

packages Directory Reference

Directories

directory ti


Codec Engine System Programming Interface (SPI): packages/ti/ Directory Reference

packages » ti

ti Directory Reference

Directories

directory sdo


Codec Engine System Programming Interface (SPI): packages/ti/sdo/ Directory Reference

packages » ti » sdo

sdo Directory Reference

Directories

directory ce


Codec Engine System Programming Interface (SPI): packages/ti/sdo/ce/ Directory Reference

packages » ti » sdo » ce

ce Directory Reference

Directories

directory | osal

Files

file | Engine.h [code]

The Codec Engine Runtime. Provides the user an inteface to open and manipulate an engine which can instantiate and communicate with xDAIS algorithms that run either on the local CPU or on a "remote" DSP Server.

file | skel.h [code]

The Codec Engine System Programming Interface (SPI) for skeleton developers.

file | visa.h [code]

The Codec Engine System Programming Interface. Provides system developers with services necessary to implement stubs and skeletons.


Codec Engine System Programming Interface (SPI): packages/ti/sdo/ce/osal/ Directory Reference

packages » ti » sdo » ce » osal

osal Directory Reference

Files

file Memory.h [code]

The Codec Engine OSAL Memory interface. Provides the user an OS-independent Memory abstraction.


Codec Engine System Programming Interface (SPI): Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • e
  • i
  • m
  • s
  • v
  • x
Here is a list of all functions, variables, defines, enums, and typedefs with links to the files they belong to:

- e -

  • Engine_ATTRS : Engine.h
  • Engine_close() : Engine.h
  • Engine_EBADSERVER : Engine.h
  • Engine_ECODECCREATE : Engine.h
  • Engine_ECODECSTART : Engine.h
  • Engine_ECOMALLOC : Engine.h
  • Engine_EDSPLOAD : Engine.h
  • Engine_EEXIST : Engine.h
  • Engine_EINUSE : Engine.h
  • Engine_EINVAL : Engine.h
  • Engine_ENOCOMM : Engine.h
  • Engine_ENOMEM : Engine.h
  • Engine_ENOSERVER : Engine.h
  • Engine_ENOTAVAIL : Engine.h
  • Engine_ENOTFOUND : Engine.h
  • Engine_EOK : Engine.h
  • Engine_Error : Engine.h
  • Engine_ERUNTIME : Engine.h
  • Engine_ETIMEOUT : Engine.h
  • Engine_EWRONGSTATE : Engine.h
  • Engine_fwriteTrace() : Engine.h
  • Engine_getAlgInfo() : Engine.h
  • Engine_getCpuLoad() : Engine.h
  • Engine_getLastError() : Engine.h
  • Engine_getName() : Engine.h
  • Engine_getNumAlgs() : Engine.h
  • Engine_getServer() : Engine.h
  • Engine_getUsedMem() : Engine.h
  • Engine_GTNAME : Engine.h
  • Engine_Handle : Engine.h
  • Engine_open() : Engine.h
  • Engine_setTrace() : Engine.h

- i -

  • IALG_Cmd : ialg.h
  • IALG_CUSTOMFAILBASE : ialg.h
  • IALG_CUSTOMFAILEND : ialg.h
  • IALG_DARAM0 : ialg.h
  • IALG_DARAM1 : ialg.h
  • IALG_DARAM2 : ialg.h
  • IALG_DEFMEMRECS : ialg.h
  • IALG_EFAIL : ialg.h
  • IALG_EOK : ialg.h
  • IALG_EPROG : ialg.h
  • IALG_ESDATA : ialg.h
  • IALG_EXTERNAL : ialg.h
  • IALG_Handle : ialg.h
  • IALG_IPROG : ialg.h
  • IALG_isOffChip : ialg.h
  • IALG_isProg : ialg.h
  • IALG_MemAttrs : ialg.h
  • IALG_MemSpace : ialg.h
  • IALG_MPROG : ialg.h
  • IALG_MXTRN : ialg.h
  • IALG_OBJMEMREC : ialg.h
  • IALG_PERSIST : ialg.h
  • IALG_SARAM : ialg.h
  • IALG_SARAM0 : ialg.h
  • IALG_SARAM1 : ialg.h
  • IALG_SARAM2 : ialg.h
  • IALG_SCRATCH : ialg.h
  • IALG_SYSCMD : ialg.h
  • IALG_WRITEONCE : ialg.h

- m -

  • Memory_alloc() : Memory.h
  • Memory_CACHED : Memory.h
  • Memory_CACHEDMASK : Memory.h
  • Memory_cacheInv() : Memory.h
  • Memory_cacheWb() : Memory.h
  • Memory_cacheWbInv() : Memory.h
  • Memory_contigAlloc() : Memory.h
  • Memory_contigFree() : Memory.h
  • Memory_CONTIGHEAP : Memory.h
  • Memory_CONTIGPOOL : Memory.h
  • Memory_DEFAULTALIGNMENT : Memory.h
  • Memory_DEFAULTPARAMS : Memory.h
  • Memory_dumpKnownContigBufsList() : Memory.h
  • Memory_free() : Memory.h
  • Memory_getBufferPhysicalAddress() : Memory.h
  • Memory_getBufferVirtualAddress() : Memory.h
  • Memory_getHeapId() : Memory.h
  • Memory_getNumHeaps() : Memory.h
  • Memory_GTNAME : Memory.h
  • Memory_MALLOC : Memory.h
  • Memory_NONCACHED : Memory.h
  • Memory_registerContigBuf() : Memory.h
  • Memory_SEG : Memory.h
  • Memory_type : Memory.h
  • Memory_unregisterContigBuf() : Memory.h

- s -

  • SKEL_CALLFXN : skel.h
  • SKEL_CREATEFXN : skel.h
  • SKEL_DESTROYFXN : skel.h

- v -

  • VISA_allocMsg() : visa.h
  • VISA_call() : visa.h
  • VISA_callAsync() : visa.h
  • VISA_create() : visa.h
  • VISA_create2() : visa.h
  • VISA_delete() : visa.h
  • VISA_EFAIL : visa.h
  • VISA_enter() : visa.h
  • VISA_EOK : visa.h
  • VISA_ERUNTIME : visa.h
  • VISA_ETIMEOUT : visa.h
  • VISA_exit() : visa.h
  • VISA_FOREVER : visa.h
  • VISA_freeMsg() : visa.h
  • VISA_getAlgFxns() : visa.h
  • VISA_getAlgHandle() : visa.h
  • VISA_getAlgMemRecs() : visa.h
  • VISA_getAlgNumRecs() : visa.h
  • VISA_getAlgorithmHandle() : visa.h
  • VISA_getCodecClassConfig() : visa.h
  • VISA_getContext() : visa.h
  • VISA_getMaxMsgSize() : visa.h
  • VISA_Handle : visa.h
  • VISA_isLocal() : visa.h
  • VISA_Msg : visa.h
  • VISA_setContext() : visa.h
  • VISA_Status : visa.h
  • VISA_wait() : visa.h

- x -

  • XDAS_Bool : xdas.h
  • XDAS_FALSE : xdas.h
  • XDAS_Int16 : xdas.h
  • XDAS_Int32 : xdas.h
  • XDAS_Int8 : xdas.h
  • XDAS_TRUE : xdas.h
  • XDAS_UInt16 : xdas.h
  • XDAS_UInt32 : xdas.h
  • XDAS_UInt8 : xdas.h
  • XDAS_Void : xdas.h


Codec Engine System Programming Interface (SPI): Engine.h Source File

  • File List
  • Globals
packages » ti » sdo » ce

Engine.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2010, 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  */
00033 /*
00034  *  ======== Engine.h ========
00035  */
00036
00049 #ifndef Engine_
00050 #define Engine_
00051
00052 #ifdef __cplusplus
00053 extern "C" {
00054 #endif
00055
00056
00057 #include <ti/sdo/ce/Server.h>
00058 #include <ti/sdo/ce/ipc/Comm.h>
00059 #include <ti/xdais/ialg.h>
00060 #include <ti/sdo/ce/node/node.h>
00061
00062 #include <stddef.h> /* def of size_t */
00063 #include <stdio.h>  /* def of FILE * */
00064
00067
00071 #define Engine_GTNAME "CE"
00072
00076 typedef struct Engine_Obj *Engine_Handle;
00077
00081 typedef Int Engine_Error;
00082
00083 #define Engine_EOK          0
00084 #define Engine_EEXIST       1
00085 #define Engine_ENOMEM       2
00086 #define Engine_EDSPLOAD     3
00087 #define Engine_ENOCOMM      4
00090 #define Engine_ENOSERVER    5
00091 #define Engine_ECOMALLOC    6
00092 #define Engine_ERUNTIME     7
00093 #define Engine_ECODECCREATE 8
00094 #define Engine_ECODECSTART  9
00099 #define Engine_EINVAL       10
00100 #define Engine_EBADSERVER   11
00101 #define Engine_ENOTAVAIL    12
00102 #define Engine_EWRONGSTATE  13
00103 #define Engine_EINUSE       14
00106 #define Engine_ENOTFOUND    15
00107 #define Engine_ETIMEOUT     16
00114 typedef struct Engine_NodeObj *Engine_Node;
00115
00119 #define Engine_FOREVER Comm_FOREVER
00120
00128 typedef struct Engine_Attrs {
00129     String procId;
00133 } Engine_Attrs;
00134
00140 typedef struct Engine_AlgInfo {
00141     Int         algInfoSize;
00142     String      name;
00143     String      *typeTab;
00144     Bool        isLocal;
00145 } Engine_AlgInfo;
00146
00150 extern Engine_Attrs Engine_ATTRS;
00154 typedef Int Engine_Ctrl;
00155
00156 #define Engine_CEXIT    0
00157 #define Engine_MAXSEGNAMELENGTH 32
00158
00164 typedef enum Engine_CachedMemType {
00165     Engine_USECACHEDMEM_DEFAULT = -1,
00166     Engine_USECACHEDMEM_NONCACHED = 0,
00167     Engine_USECACHEDMEM_CACHED = 1
00168 } Engine_CachedMemType;
00169
00170
00171 /*
00172  *  ======== Engine_AlgDesc ========
00173  */
00174 typedef struct Engine_AlgDesc {
00175     String      name;
00176     NODE_Uuid   uuid;
00177     IALG_Fxns   *fxns;
00178     Ptr         idmaFxns;
00179     String      *typeTab;
00180     Bool        isLocal;
00181     Int         groupId;
00182     Int         rpcProtocolVersion;
00183     Ptr         iresFxns;
00184     Void        *codecClassConfig;
00185     Engine_CachedMemType memType;
00186 } Engine_AlgDesc;
00187
00188 /*
00189  *  ======== Engine_AlgCreateAttrs ========
00190  */
00191 typedef struct Engine_AlgCreateAttrs {
00192     Bool            useExtHeap;
00197     Int             priority;
00199 } Engine_AlgCreateAttrs;
00200
00201 /*
00202  *  ======== Engine_Desc ========
00203  */
00204 typedef struct Engine_Desc {
00205     String          name;
00206     Engine_AlgDesc  *algTab;
00207     String          remoteName;
00208     String          linkCfg;
00209     Int             numAlgs;
00211 } Engine_Desc;
00212
00213 /*
00214  *  ======== Engine_Config ========
00215  */
00216 typedef struct Engine_Config {
00217     Engine_Desc *engineTab;
00218     String      localEngine;
00219 } Engine_Config;
00220
00221 /*
00222  *  ======== Engine_MemStat ========
00223  *  This structure must match Server_MemStat.
00224  */
00225 typedef struct Engine_MemStat {
00226     Char   name[Engine_MAXSEGNAMELENGTH + 1]; /* Name of memory segment */
00227     Uint32 base;           /* Base address of memory segment */
00228     Uint32 size;           /* Original size of the memory segment. */
00229     Uint32 used;           /* Number of bytes used. */
00230     Uint32 maxBlockLen;    /* Size of the largest contiguous free block. */
00231 } Engine_MemStat;
00232
00233 /* Default alg create attributes */
00234 extern Engine_AlgCreateAttrs Engine_ALGCREATEATTRS;
00235
00236 /*
00237  *  ======== Engine_config ========
00238  */
00239 extern Engine_Config Engine_config;
00240
00241 /*
00242  *  ======== Engine_call ========
00243  */
00244 extern Int Engine_call(Engine_Node node, Comm_Msg *msg);
00245
00246 /*
00247  *  ======== Engine_callAsync ========
00248  */
00249 extern Int Engine_callAsync(Engine_Node node, Comm_Msg *msg);
00250
00251 /*
00252  *  ======== Engine_callWait ========
00253  */
00254 extern Int Engine_callWait(Engine_Node node, Comm_Msg *msg, UInt timeout);
00255
00256 /*
00257  *  ======== Engine_ctrlNode ========
00258  */
00259 extern Int Engine_ctrlNode(Engine_Node node, Comm_Msg *msg, Engine_Ctrl code);
00260
00263 /*
00264  *  ======== Engine_close ========
00265  */
00280 extern Void Engine_close(Engine_Handle engine);
00281
00283 /*
00284  *  ======== Engine_createNode ========
00285  */
00311 extern Engine_Node Engine_createNode(Engine_Handle engine, String name,
00312     size_t msgSize, IALG_Params *nodeAttrs, Engine_AlgCreateAttrs *attrs);
00313
00314
00315 /*
00316  *  ======== Engine_createNode2 ========
00317  */
00348 extern Engine_Node Engine_createNode2(Engine_Handle engine, String name,
00349     size_t msgSize, IALG_Params *nodeAttrs, Int nodeAttrsSize,
00350     Engine_AlgCreateAttrs *attrs);
00351
00352
00353 /*
00354  *  ======== Engine_deleteNode ========
00355  */
00356 extern Void Engine_deleteNode(Engine_Node node);
00357
00358 /*
00359  *  ======== Engine_getAlgMemRecs ========
00360  */
00374 extern Engine_Error Engine_getAlgMemRecs(Engine_Node node, IALG_MemRec *memTab, Int size,
00375         Int *numRecs);
00376
00377 /*
00378  *  ======== Engine_getAlgNumRecs ========
00379  */
00391 extern Engine_Error Engine_getAlgNumRecs(Engine_Node node, Int *numRecs);
00392
00393 /*
00394  *  ======== Engine_getConstName ========
00395  */
00396 extern String Engine_getConstName(Engine_Handle engine, String name,
00397     String type);
00398
00399 /*
00400  *  ======== Engine_getFxns ========
00401  */
00402 extern IALG_Fxns *Engine_getFxns(Engine_Handle svr, String name, String type,
00403         Bool *isLocal, Ptr *idmaFxns, Ptr *iresFxns, Int *groupId,
00404         Engine_CachedMemType *memType);
00405
00406 /*
00407  *  ======== Engine_getMemId ========
00408  */
00409 extern Int Engine_getMemId(Engine_Handle engine);
00410
00411 /*
00412  *  ======== Engine_getLocalEngine ========
00413  */
00414 extern Engine_Handle Engine_getLocalEngine(Void);
00415
00416 /*
00417  *  ======== Engine_getEngine ========
00418  */
00419 extern Engine_Handle Engine_getEngine(Engine_Node node);
00420
00421 /*
00422  *  ======== Engine_getMemStat ========
00423  */
00424 extern Engine_Error Engine_getMemStat(Server_Handle server, Int segNum,
00425     Engine_MemStat *stat);
00426
00427 /*
00428  *  ======== Engine_getNumMemSegs ========
00429  */
00430 extern Engine_Error Engine_getNumMemSegs(Server_Handle server, Int *numSegs);
00431
00432 /*
00433  *  ======== Engine_hasServer ========
00434  */
00435 extern Bool Engine_hasServer(Engine_Handle engine);
00436
00437 /*
00438  *  ======== Engine_init ========
00439  */
00440 extern Void Engine_init(Void);
00441
00442 /*
00443  *  ======== Engine_getRemoteVisa ========
00444  */
00445 extern UInt32 Engine_getRemoteVisa(Engine_Node node);
00446
00447 /*
00448  *  ======== Engine_getCodecClassConfig ========
00449  */
00450 extern Ptr Engine_getCodecClassConfig(Engine_Handle engine, String name,
00451     String type);
00452
00453 /*
00454  *  ======== Engine_getNodeQueues ========
00455  */
00456 extern Void Engine_getNodeQueues(Engine_Node node, Comm_Queue *stdIn,
00457         Comm_Queue *stdOut);
00458
00459 /*
00460  *  ======== Engine_redefineHeap ========
00461  */
00462 extern Engine_Error Engine_redefineHeap(Server_Handle server, String name,
00463         Uint32 base, Uint32 size);
00464
00465 /*
00466  *  ======== Engine_releaseTraceToken ========
00467  */
00468 extern Bool Engine_releaseTraceToken(Server_Handle server);
00469
00470 /*
00471  *  ======== Engine_requestTraceToken ========
00472  */
00473 extern Engine_Error Engine_requestTraceToken(Server_Handle server);
00474
00475 /*
00476  *  ======== Engine_restoreHeap ========
00477  */
00478 extern Engine_Error Engine_restoreHeap(Server_Handle server, String name);
00479
00482 /*
00483  *  ======== Engine_open ========
00484  */
00527 extern Engine_Handle Engine_open(String name, Engine_Attrs *attrs,
00528     Engine_Error *ec);
00529
00530 /*
00531  *  ======== Engine_fwriteTrace ========
00532  */
00558 extern Int Engine_fwriteTrace(Engine_Handle engine, String prefix, FILE *out);
00559
00560 /*
00561  *  ======== Engine_getAlgInfo ========
00562  */
00597 extern Engine_Error Engine_getAlgInfo(String name, Engine_AlgInfo *algInfo,
00598         Int index);
00599
00600 /*
00601  *  ======== Engine_getCpuLoad ========
00602  */
00631 extern Int Engine_getCpuLoad(Engine_Handle engine);
00632
00633 /*
00634  *  ======== Engine_getLastError ========
00635  */
00647 extern Engine_Error Engine_getLastError(Engine_Handle engine);
00648
00649 /*
00650  *  ======== Engine_getName ========
00651  */
00660 extern String Engine_getName(Engine_Handle engine);
00661
00662
00663 /*
00664  *  ======== Engine_getNumAlgs ========
00665  */
00689 extern Engine_Error Engine_getNumAlgs(String name, Int *numAlgs);
00690
00691 /*
00692  *  ======== Engine_getServer ========
00693  */
00708 extern Server_Handle Engine_getServer(Engine_Handle engine);
00709
00710
00711 /*
00712  *  ======== Engine_getUsedMem ========
00713  */
00740 extern UInt32 Engine_getUsedMem(Engine_Handle engine);
00741
00742
00743 /*
00744  *  ======== Engine_setTrace ========
00745  */
00765 extern Int Engine_setTrace(Engine_Handle engine, String mask);
00766
00769 #ifdef __cplusplus
00770 }
00771 #endif
00772
00773 #endif
00774 /*
00775  *  @(#) ti.sdo.ce; 1, 0, 6,410; 6-19-2010 19:51:24; /db/atree/library/trees/ce/ce-o16x/src/
00776  */
00777


Codec Engine System Programming Interface (SPI): Memory.h Source File

  • File List
  • Globals
packages » ti » sdo » ce » osal

Memory.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2010, 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  */
00033 /*
00034  *  ======== Memory.h ========
00035  */
00046 #ifndef ti_sdo_ce_osal_Memory_
00047 #define ti_sdo_ce_osal_Memory_
00048
00049 #ifdef __cplusplus
00050 extern "C" {
00051 #endif
00052
00055
00056 /*
00057  *  ======== Memory_DEFAULTALIGNMENT ========
00058  */
00059 #define Memory_DEFAULTALIGNMENT ((UInt)(-1))
00060
00061 /*
00062  *  ======== Memory_GTNAME ========
00063  */
00064 #define Memory_GTNAME "OM"
00065
00073 typedef struct Memory_Stat {
00074     String name;
00075     Uint32 base;
00076     UInt size;
00077     UInt used;
00078     UInt length;
00079 } Memory_Stat;
00080
00088 typedef enum {
00089     Memory_MALLOC = 0,
00090     Memory_SEG = 1,
00091     Memory_CONTIGPOOL = 2,
00092     Memory_CONTIGHEAP =3
00093 } Memory_type;
00094
00100 typedef struct Memory_AllocParams {
00101     Memory_type type;
00105     UInt flags;
00110     UInt align;
00111     UInt seg;
00112 } Memory_AllocParams;
00113
00114
00115 #define Memory_CACHED           0x00000000
00119 #define Memory_NONCACHED        0x00000001
00124 #define Memory_CACHEDMASK       0x00000001
00149 extern Memory_AllocParams Memory_DEFAULTPARAMS;
00150
00151 /*
00152  *  ======== Memory_alloc ========
00153  */
00167 extern Ptr Memory_alloc(UInt size, Memory_AllocParams *params);
00168
00169 /*
00170  *  ======== Memory_cacheInv ========
00171  */
00188 extern Void Memory_cacheInv(Ptr addr, Int sizeInBytes);
00189
00190
00191 /*
00192  *  ======== Memory_cacheWb ========
00193  */
00204 extern Void Memory_cacheWb(Ptr addr, Int sizeInBytes);
00205
00206
00207 /*
00208  *  ======== Memory_cacheWbInv ========
00209  */
00220 extern Void Memory_cacheWbInv(Ptr addr, Int sizeInBytes);
00221
00224 /*
00225  *  ======== Memory_cacheWbInvAll ========
00226  */
00235 extern Void Memory_cacheWbInvAll();
00236
00239 /*
00240  *  ======== Memory_contigAlloc ========
00241  */
00273 extern Ptr Memory_contigAlloc(UInt size, UInt align);
00274
00275
00276 /*
00277  *  ======== Memory_contigFree ========
00278  */
00297 extern Bool Memory_contigFree(Ptr addr, UInt size);
00298
00299
00302 /*
00303  *  ======== Memory_contigStat ========
00304  */
00323 extern Bool Memory_contigStat(Memory_Stat *statbuf);
00324
00328 /*
00329  *  ======== Memory_free ========
00330  */
00350 extern Bool Memory_free(Ptr addr, UInt size, Memory_AllocParams *params);
00351
00352
00353 /*
00354  *  ======== Memory_dumpKnownContigBufs ========
00355  */
00371 extern Void Memory_dumpKnownContigBufsList(Void);
00372
00373
00374 /*
00375  *  ======== Memory_getBufferPhysicalAddress ========
00376  */
00413 extern UInt32 Memory_getBufferPhysicalAddress(Ptr virtualAddress,
00414     Int sizeInBytes, Bool *isContiguous);
00415
00416 /*
00417  *  ======== Memory_getHeapId ========
00418  */
00432 extern Int Memory_getHeapId(String name);
00433
00434 /*
00435  *  ======== Memory_getNumHeaps ========
00436  */
00446 extern Int Memory_getNumHeaps();
00447
00448
00451 #ifdef ti_sdo_ce_osal_Memory_USEDEPRECATEDAPIS
00452
00453 /*
00454  *  ======== Memory_getPhysicalAddress ========
00455  *  Convert user virtual address to physical address
00456  *  (returns the exact same value everywhere other than on Linux)
00457  *
00458  *  This function is deprecated -- everyone should be calling
00459  *  Memory_getBufferPhysicalAddress() instead.
00460  */
00461 static inline UInt32 Memory_getPhysicalAddress(Ptr virtualAddress)
00462 {
00463     return(Memory_getBufferPhysicalAddress(virtualAddress, 4, NULL));
00464 }
00465
00466 #endif
00467
00471 /*
00472  *  ======== Memory_getBufferVirtualAddress ========
00473  */
00503 extern Ptr Memory_getBufferVirtualAddress(UInt32 physicalAddress,
00504     Int sizeInBytes);
00505
00508 /*
00509  *  ======== Memory_init ========
00510  */
00511 extern Bool Memory_init(Void);
00512
00513
00514 /*
00515  *  ======== Memory_exit ========
00516  */
00517 extern Void Memory_exit(Void);
00518
00519
00520 /*
00521  *  ======== Memory_redefine ========
00522  */
00539 extern Bool Memory_redefine(Int segId, Uint32 base, Uint32 size);
00540
00543 /*
00544  *  ======== Memory_registerContigBuf ========
00545  */
00575 extern Void Memory_registerContigBuf(UInt32 virtualAddress, UInt32 sizeInBytes,
00576     UInt32 physicalAddress);
00577
00580 /*
00581  *  ======== Memory_restoreHeap ========
00582  */
00596 extern Bool Memory_restoreHeap(Int segId);
00597
00598 /*
00599  *  ======== Memory_segAlloc ========
00600  */
00619 extern Ptr Memory_segAlloc(Int segId, UInt size, UInt align);
00620
00621
00622 /*
00623  *  ======== Memory_segFree ========
00624  */
00650 extern Bool Memory_segFree(Int segId, Ptr addr, UInt size);
00651
00652
00653 /*
00654  *  ======== Memory_segStat ========
00655  */
00675 extern Bool Memory_segStat(Int segId, Memory_Stat *statbuf);
00676
00679 /*
00680  *  ======== Memory_unregisterContigBuf ========
00681  */
00698 extern Void Memory_unregisterContigBuf(UInt32 virtualAddress,
00699     UInt32 sizeInBytes);
00700
00701   /* ingroup */
00703
00704 #ifdef __cplusplus
00705 }
00706 #endif
00707
00708 #endif
00709 /*
00710  *  @(#) ti.sdo.ce.osal; 2, 0, 2,405; 6-19-2010 19:56:35; /db/atree/library/trees/ce/ce-o16x/src/
00711  */
00712


Codec Engine System Programming Interface (SPI): Alphabetical List

  • Data Structures
  • Data Structure Index
  • Data Fields

Data Structure Index

E | I | M | S | V
E
I
IALG_Obj
M
SKEL_Fxns
Engine_AlgInfo IALG_Fxns IALG_Params Memory_AllocParams
V
Engine_Attrs IALG_MemRec IALG_Status
S
VISA_MsgHeader


Codec Engine System Programming Interface (SPI): packages/ti/ -> cetools Relation

packages » ti

ti → cetools Relation

File in packages » ti Includes file in cetools


Codec Engine System Programming Interface (SPI): packages/ti/sdo/ -> cetools Relation

packages » ti » sdo

sdo → cetools Relation

File in packages » ti » sdo Includes file in cetools


Codec Engine System Programming Interface (SPI): packages/ti/sdo/ce/ -> cetools Relation

packages » ti » sdo » ce

ce → cetools Relation

File in packages » ti » sdo » ce Includes file in cetools


Codec Engine System Programming Interface (SPI): disclaimer.dox File Reference

  • File List
  • Globals

disclaimer.dox File Reference

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines


Codec Engine System Programming Interface (SPI): Data Fields - Variables

  • Data Structures
  • Data Structure Index
  • Data Fields
  • All
  • Variables
  • a
  • b
  • c
  • f
  • h
  • i
  • n
  • p
  • s
  • t

- a -

  • algActivate : IALG_Fxns
  • algAlloc : IALG_Fxns
  • algControl : IALG_Fxns
  • algDeactivate : IALG_Fxns
  • algFree : IALG_Fxns
  • algInfoSize : Engine_AlgInfo
  • algInit : IALG_Fxns
  • algMoved : IALG_Fxns
  • algNumAlloc : IALG_Fxns
  • align : Memory_AllocParams
  • alignment : IALG_MemRec
  • apiCreate : SKEL_Fxns
  • apiDestroy : SKEL_Fxns
  • attrs : IALG_MemRec

- b -

  • base : IALG_MemRec

- c -

  • call : SKEL_Fxns
  • cmd : VISA_MsgHeader

- f -

  • flags : Memory_AllocParams
  • fxns : IALG_Obj

- h -

  • header : VISA_MsgHeader

- i -

  • implementationId : IALG_Fxns
  • isLocal : Engine_AlgInfo

- n -

  • name : Engine_AlgInfo

- p -

  • procId : Engine_Attrs

- s -

  • seg : Memory_AllocParams
  • size : IALG_MemRec , IALG_Status , IALG_Params
  • space : IALG_MemRec
  • status : VISA_MsgHeader

- t -

  • type : Memory_AllocParams
  • typeTab : Engine_AlgInfo


Codec Engine System Programming Interface (SPI): Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • e
  • i
  • m
  • v
  • x

- e -

  • Engine_EBADSERVER : Engine.h
  • Engine_ECODECCREATE : Engine.h
  • Engine_ECODECSTART : Engine.h
  • Engine_ECOMALLOC : Engine.h
  • Engine_EDSPLOAD : Engine.h
  • Engine_EEXIST : Engine.h
  • Engine_EINUSE : Engine.h
  • Engine_EINVAL : Engine.h
  • Engine_ENOCOMM : Engine.h
  • Engine_ENOMEM : Engine.h
  • Engine_ENOSERVER : Engine.h
  • Engine_ENOTAVAIL : Engine.h
  • Engine_ENOTFOUND : Engine.h
  • Engine_EOK : Engine.h
  • Engine_ERUNTIME : Engine.h
  • Engine_ETIMEOUT : Engine.h
  • Engine_EWRONGSTATE : Engine.h
  • Engine_GTNAME : Engine.h

- i -

  • IALG_CUSTOMFAILBASE : ialg.h
  • IALG_CUSTOMFAILEND : ialg.h
  • IALG_DEFMEMRECS : ialg.h
  • IALG_EFAIL : ialg.h
  • IALG_EOK : ialg.h
  • IALG_isOffChip : ialg.h
  • IALG_isProg : ialg.h
  • IALG_MPROG : ialg.h
  • IALG_MXTRN : ialg.h
  • IALG_OBJMEMREC : ialg.h
  • IALG_SYSCMD : ialg.h

- m -

  • Memory_CACHED : Memory.h
  • Memory_CACHEDMASK : Memory.h
  • Memory_DEFAULTALIGNMENT : Memory.h
  • Memory_GTNAME : Memory.h
  • Memory_NONCACHED : Memory.h

- v -

  • VISA_EFAIL : visa.h
  • VISA_EOK : visa.h
  • VISA_ERUNTIME : visa.h
  • VISA_ETIMEOUT : visa.h
  • VISA_FOREVER : visa.h

- x -

  • XDAS_FALSE : xdas.h
  • XDAS_TRUE : xdas.h


Codec Engine System Programming Interface (SPI): Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • IALG_MemAttrs : ialg.h
  • IALG_MemSpace : ialg.h
  • Memory_type : Memory.h


Codec Engine System Programming Interface (SPI): Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • IALG_DARAM0 : ialg.h
  • IALG_DARAM1 : ialg.h
  • IALG_DARAM2 : ialg.h
  • IALG_EPROG : ialg.h
  • IALG_ESDATA : ialg.h
  • IALG_EXTERNAL : ialg.h
  • IALG_IPROG : ialg.h
  • IALG_PERSIST : ialg.h
  • IALG_SARAM : ialg.h
  • IALG_SARAM0 : ialg.h
  • IALG_SARAM1 : ialg.h
  • IALG_SARAM2 : ialg.h
  • IALG_SCRATCH : ialg.h
  • IALG_WRITEONCE : ialg.h
  • Memory_CONTIGHEAP : Memory.h
  • Memory_CONTIGPOOL : Memory.h
  • Memory_MALLOC : Memory.h
  • Memory_SEG : Memory.h


Codec Engine System Programming Interface (SPI): Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • e
  • m
  • v

- e -

  • Engine_close() : Engine.h
  • Engine_fwriteTrace() : Engine.h
  • Engine_getAlgInfo() : Engine.h
  • Engine_getCpuLoad() : Engine.h
  • Engine_getLastError() : Engine.h
  • Engine_getName() : Engine.h
  • Engine_getNumAlgs() : Engine.h
  • Engine_getServer() : Engine.h
  • Engine_getUsedMem() : Engine.h
  • Engine_open() : Engine.h
  • Engine_setTrace() : Engine.h

- m -

  • Memory_alloc() : Memory.h
  • Memory_cacheInv() : Memory.h
  • Memory_cacheWb() : Memory.h
  • Memory_cacheWbInv() : Memory.h
  • Memory_contigAlloc() : Memory.h
  • Memory_contigFree() : Memory.h
  • Memory_dumpKnownContigBufsList() : Memory.h
  • Memory_free() : Memory.h
  • Memory_getBufferPhysicalAddress() : Memory.h
  • Memory_getBufferVirtualAddress() : Memory.h
  • Memory_getHeapId() : Memory.h
  • Memory_getNumHeaps() : Memory.h
  • Memory_registerContigBuf() : Memory.h
  • Memory_unregisterContigBuf() : Memory.h

- v -

  • VISA_allocMsg() : visa.h
  • VISA_call() : visa.h
  • VISA_callAsync() : visa.h
  • VISA_create() : visa.h
  • VISA_create2() : visa.h
  • VISA_delete() : visa.h
  • VISA_enter() : visa.h
  • VISA_exit() : visa.h
  • VISA_freeMsg() : visa.h
  • VISA_getAlgFxns() : visa.h
  • VISA_getAlgHandle() : visa.h
  • VISA_getAlgMemRecs() : visa.h
  • VISA_getAlgNumRecs() : visa.h
  • VISA_getAlgorithmHandle() : visa.h
  • VISA_getCodecClassConfig() : visa.h
  • VISA_getContext() : visa.h
  • VISA_getMaxMsgSize() : visa.h
  • VISA_isLocal() : visa.h
  • VISA_setContext() : visa.h
  • VISA_wait() : visa.h


Codec Engine System Programming Interface (SPI): Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • Engine_Error : Engine.h
  • Engine_Handle : Engine.h
  • IALG_Cmd : ialg.h
  • IALG_Handle : ialg.h
  • SKEL_CALLFXN : skel.h
  • SKEL_CREATEFXN : skel.h
  • SKEL_DESTROYFXN : skel.h
  • VISA_Handle : visa.h
  • VISA_Msg : visa.h
  • VISA_Status : visa.h
  • XDAS_Bool : xdas.h
  • XDAS_Int16 : xdas.h
  • XDAS_Int32 : xdas.h
  • XDAS_Int8 : xdas.h
  • XDAS_UInt16 : xdas.h
  • XDAS_UInt32 : xdas.h
  • XDAS_UInt8 : xdas.h
  • XDAS_Void : xdas.h


Codec Engine System Programming Interface (SPI): Data Fields

  • File List
  • Globals
  • All
  • Functions
  • Variables
  • Typedefs
  • Enumerations
  • Enumerator
  • Defines
  • Engine_ATTRS : Engine.h
  • Memory_DEFAULTPARAMS : Memory.h


Codec Engine System Programming Interface (SPI): Graph Legend

Graph Legend

This page explains how to interpret the graphs that are generated by doxygen.

Consider the following example:

/*! Invisible class because of truncation */
class Invisible { };

/*! Truncated class, inheritance relation is hidden */
class Truncated : public Invisible { };

/* Class not documented with doxygen comments */
class Undocumented { };

/*! Class that is inherited using public inheritance */
class PublicBase : public Truncated { };

/*! A template class */
template<class T> class Templ { };

/*! Class that is inherited using protected inheritance */
class ProtectedBase { };

/*! Class that is inherited using private inheritance */
class PrivateBase { };

/*! Class that is used by the Inherited class */
class Used { };

/*! Super class that inherits a number of other classes */
class Inherited : public PublicBase,
                  protected ProtectedBase,
                  private PrivateBase,
                  public Undocumented,
                  public Templ<int>
{
  private:
    Used *m_usedClass;
};

This will result in the following graph:

The boxes in the above graph have the following meaning:

  • A filled gray box represents the struct or class for which the graph is generated.
  • A box with a black border denotes a documented struct or class.
  • A box with a grey border denotes an undocumented struct or class.
  • A box with a red border denotes a documented struct or class forwhich not all inheritance/containment relations are shown. A graph is truncated if it does not fit within the specified boundaries.

The arrows have the following meaning:

  • A dark blue arrow is used to visualize a public inheritance relation between two classes.
  • A dark green arrow is used for protected inheritance.
  • A dark red arrow is used for private inheritance.
  • A purple dashed arrow is used if a class is contained or used by another class. The arrow is labeled with the variable(s) through which the pointed class or struct is accessible.
  • A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance.


Codec Engine System Programming Interface (SPI): ialg.h Source File

  • File List
  • Globals
cetools » packages » ti » xdais

ialg.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2010, 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  */
00033
00046 #ifndef ti_xdais_IALG_
00047 #define ti_xdais_IALG_
00048
00049 #ifdef __cplusplus
00050 extern "C" {
00051 #endif
00052
00055
00056 /*---------------------------*/
00057 /*    TYPES AND CONSTANTS    */
00058 /*---------------------------*/
00059
00060 #define IALG_DEFMEMRECS 4
00061 #define IALG_OBJMEMREC  0
00062 #define IALG_SYSCMD     256
00064 #define IALG_EOK        0
00065 #define IALG_EFAIL      -1
00067 #define IALG_CUSTOMFAILBASE  -2048
00071 #define IALG_CUSTOMFAILEND -256
00079 typedef enum IALG_MemAttrs {
00080     IALG_SCRATCH,
00081     IALG_PERSIST,
00082     IALG_WRITEONCE
00083 } IALG_MemAttrs;
00084
00085 #define IALG_MPROG  0x0008
00086 #define IALG_MXTRN  0x0010
00091 /*
00092  *  ======== IALG_MemSpace ========
00093  */
00094 typedef enum IALG_MemSpace {
00095     IALG_EPROG =
00096         IALG_MPROG | IALG_MXTRN,
00097
00098     IALG_IPROG =
00099         IALG_MPROG,
00100
00101     IALG_ESDATA =
00102         IALG_MXTRN + 0,
00103
00104     IALG_EXTERNAL =
00105         IALG_MXTRN + 1,
00106
00107     IALG_DARAM0 = 0,
00108     IALG_DARAM1 = 1,
00110     IALG_SARAM  = 2,
00111     IALG_SARAM0 = 2,
00112     IALG_SARAM1 = 3,
00114     IALG_DARAM2 = 4,
00115     IALG_SARAM2 = 5
00116 } IALG_MemSpace;
00117
00118 /*
00119  *  ======== IALG_isProg ========
00120  */
00121 #define IALG_isProg(s) (        \
00122     (((int)(s)) & IALG_MPROG)   \
00123 )
00124
00125 /*
00126  *  ======== IALG_isOffChip ========
00127  */
00128 #define IALG_isOffChip(s) (     \
00129     (((int)(s)) & IALG_MXTRN)   \
00130 )
00131
00132
00136 typedef struct IALG_MemRec {
00137     Uns             size;
00138     Int             alignment;
00139     IALG_MemSpace   space;
00140     IALG_MemAttrs   attrs;
00141     Void            *base;
00142 } IALG_MemRec;
00143
00144
00153 typedef struct IALG_Obj {
00154     struct IALG_Fxns *fxns;
00155 } IALG_Obj;
00156
00157
00161 typedef struct IALG_Obj *IALG_Handle;
00162
00163
00170 typedef struct IALG_Params {
00171     Int size;
00172 } IALG_Params;
00173
00174
00181 typedef struct IALG_Status {
00182     Int size;
00183 } IALG_Status;
00184
00185
00193 typedef unsigned int IALG_Cmd;
00194
00195
00200 /*
00201  *      algAlloc()        - apps call this to query the algorithm about
00202  *                          its memory requirements. Must be non-NULL.
00203  *      algControl()      - algorithm specific control operations.  May be
00204  *                          NULL; NULL => no operations supported.
00205  *      algDeactivate()   - notification that current instance is about to
00206  *                          be "deactivated".  May be NULL; NULL => do nothing.
00207  *      algFree()         - query algorithm for memory to free when removing
00208  *                          an instance.  Must be non-NULL.
00209  *      algInit()         - apps call this to allow the algorithm to
00210  *                          initialize memory requested via algAlloc().  Must
00211  *                          be non-NULL.
00212  *      algMoved()        - apps call this whenever an algorithms object or
00213  *                          any pointer parameters are moved in real-time.
00214  *                          May be NULL; NULL => object can not be moved.
00215  *      algNumAlloc()     - query algorithm for number of memory requests.
00216  *                          May be NULL; NULL => number of mem recs is less
00217  *                          then #IALG_DEFMEMRECS.
00218  */
00219 typedef struct IALG_Fxns {
00224     Void    *implementationId;
00225
00275     Void    (*algActivate)(IALG_Handle handle);
00276
00355     Int     (*algAlloc)(const IALG_Params *params,
00356         struct IALG_Fxns **parentFxns, IALG_MemRec *memTab);
00357
00398     Int     (*algControl)(IALG_Handle handle, IALG_Cmd cmd,
00399         IALG_Status *status);
00400
00454     Void    (*algDeactivate)(IALG_Handle handle);
00455
00496     Int     (*algFree)(IALG_Handle handle, IALG_MemRec *memTab);
00497
00671     Int     (*algInit)(IALG_Handle handle, const IALG_MemRec *memTab,
00672         IALG_Handle parent, const IALG_Params *params);
00673
00694     Void    (*algMoved)(IALG_Handle handle, const IALG_MemRec *memTab,
00695         IALG_Handle parent, const IALG_Params *params);
00696
00753     Int     (*algNumAlloc)(Void);
00754 } IALG_Fxns;
00755
00758 #ifdef __cplusplus
00759 }
00760 #endif
00761
00762 #endif  /* ti_xdais_IALG_ */
00763 /*
00764  *  @(#) ti.xdais; 1, 2.0, 1,243; 5-4-2010 08:43:56; /db/wtree/library/trees/dais/dais-q11x/src/
00765  */
00766


Codec Engine System Programming Interface (SPI): Page Index

Related Pages

Here is a list of all related documentation pages:
  • Disclaimer
  • Deprecated List


Codec Engine System Programming Interface (SPI): skel.h Source File

  • File List
  • Globals
packages » ti » sdo » ce

skel.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2010, 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  */
00033 /*
00034  *  ======== skel.h ========
00035  */
00046 #ifndef ti_sdo_ce_SKEL_
00047 #define ti_sdo_ce_SKEL_
00048
00049 #ifdef __cplusplus
00050 extern "C" {
00051 #endif
00052
00053 #include <ti/sdo/ce/visa.h>
00054
00057
00064 typedef VISA_Status (*SKEL_CALLFXN)(VISA_Handle handle, VISA_Msg msg);
00065
00076 typedef VISA_Handle (*SKEL_CREATEFXN)(Void *reserved, String name,
00077     Void *params);
00078
00085 typedef Void (*SKEL_DESTROYFXN)(VISA_Handle handle);
00086
00087
00088 /*
00089  *  ======== SKEL_Fxns ========
00090  */
00094 typedef struct SKEL_Fxns {
00095     SKEL_CALLFXN    call;
00096     SKEL_CREATEFXN  apiCreate;
00097     SKEL_DESTROYFXN apiDestroy;
00098 } SKEL_Fxns;
00099
00105 #define SKEL_LOCALBUFFERINVWB 0
00106 #define SKEL_WBINVALL         1
00107 #define SKEL_CACHENONE        2
00108
00113 extern Int ti_sdo_ce_Server_skelCachingPolicy;
00114
00115 #define SKEL_cachingPolicy ti_sdo_ce_Server_skelCachingPolicy
00116
00120 #define Engine_FOREVER Comm_FOREVER
00121
00127
00128 #ifdef __cplusplus
00129 }
00130 #endif
00131
00132 #endif /* _SKEL_ */
00133 /*
00134  *  @(#) ti.sdo.ce; 1, 0, 6,410; 6-19-2010 19:51:26; /db/atree/library/trees/ce/ce-o16x/src/
00135  */
00136


Codec Engine System Programming Interface (SPI): spi.h Source File

  • File List
  • Globals

spi.h

Go to the documentation of this file.
00001 /* --COPYRIGHT--,BSD
00002  * Copyright (c) $(CPYYEAR), 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  * --/COPYRIGHT--
00032  */
00033 /*
00034  * This is a little header file which doxygen parses to generate the main
00035  * documentation page
00036  */
00037


Codec Engine System Programming Interface (SPI): visa.h Source File

  • File List
  • Globals
packages » ti » sdo » ce

visa.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2010, 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  */
00033 /*
00034  *  ======== visa.h ========
00035  */
00060 #ifndef ti_sdo_ce_VISA_
00061 #define ti_sdo_ce_VISA_
00062
00063 #include <stddef.h>     /* for size_t */
00064
00065 #include <ti/sdo/ce/node/node.h>
00066 #include <ti/xdais/ialg.h>
00067 #include <ti/sdo/ce/Engine.h>
00068
00069 #ifdef __cplusplus
00070 extern "C" {
00071 #endif
00072
00077 typedef Int VISA_Status;
00078
00083 #define VISA_EOK        0
00084
00089 #define VISA_ERUNTIME   -1
00090
00095 #define VISA_EFAIL     -2
00096
00101 #define VISA_ETIMEOUT  -100
00102
00107 #define VISA_FOREVER Engine_FOREVER
00108
00112 typedef struct VISA_Obj *VISA_Handle;
00113
00121 typedef struct VISA_MsgHeader {
00122     NODE_MsgHeader  header;
00123     Int             cmd;
00124     VISA_Status     status;
00125 } VISA_MsgHeader;
00126
00127 /*
00128  *  ======== VISA_Msg ========
00129  */
00130 typedef VISA_MsgHeader *VISA_Msg;
00131
00132 /*
00133  *  ======== VISA_allocMsg ========
00134  */
00149 extern VISA_Msg VISA_allocMsg(VISA_Handle visa);
00150
00151 /*
00152  *  ======== VISA_call ========
00153  */
00171 extern VISA_Status VISA_call(VISA_Handle visa, VISA_Msg *msg);
00172
00173 /*
00174  *  ======== VISA_callAsync ========
00175  */
00194 extern VISA_Status VISA_callAsync(VISA_Handle visa, VISA_Msg *msg);
00195
00196 /*
00197  *  ======== VISA_wait ========
00198  */
00219 extern VISA_Status VISA_wait(VISA_Handle visa, VISA_Msg *msg, UInt timeout);
00220
00221 /*
00222  *  ======== VISA_freeMsg ========
00223  */
00240 extern Void VISA_freeMsg(VISA_Handle visa, VISA_Msg msg);
00241
00242
00245
00246 /*
00247  *  ======== VISA_create ========
00248  */
00280 extern VISA_Handle VISA_create(Engine_Handle engine, String name,
00281     IALG_Params *params, size_t msgSize, String type);
00282
00283 /*
00284  *  ======== VISA_delete ========
00285  */
00293 extern Void VISA_delete(VISA_Handle visa);
00294
00295
00296 /*
00297  *  ======== VISA_create2 ========
00298  */
00337 extern VISA_Handle VISA_create2(Engine_Handle engine, String name,
00338     IALG_Params *params, Int paramsSize, size_t msgSize, String type);
00339
00340
00341 /*
00342  *  ======== VISA_enter ========
00343  */
00356 extern Void VISA_enter(VISA_Handle visa);
00357
00358 /*
00359  *  ======== VISA_exit ========
00360  */
00371 extern Void VISA_exit(VISA_Handle visa);
00372
00373 /*
00374  *  ======== VISA_getAlgHandle ========
00375  */
00389 extern Ptr VISA_getAlgHandle(VISA_Handle visa);
00390
00391 /*
00392  *  ======== VISA_getAlgorithmHandle ========
00393  */
00407 extern Ptr VISA_getAlgorithmHandle(VISA_Handle visa);
00408
00409 /*
00410  *  ======== VISA_getAlgFxns ========
00411  */
00433 extern IALG_Fxns *VISA_getAlgFxns(VISA_Handle visa);
00434   /* ingroup */
00436
00437 /*
00438  *  ======== VISA_getAlgMemRecs ========
00439  */
00470 extern VISA_Status VISA_getAlgMemRecs(VISA_Handle visa, IALG_MemRec *memTab,
00471         Int size, Int *numRecs);
00472
00473 /*
00474  *  ======== VISA_getAlgNumRecs ========
00475  */
00503 extern VISA_Status VISA_getAlgNumRecs(VISA_Handle visa, Int *numRecs);
00504
00505
00506 /*
00507  *  ======== VISA_getContext ========
00508  */
00527 extern Void VISA_getContext(VISA_Handle visa, UInt32 * pContext);
00528
00529 /*
00530  *  ======== VISA_getCodecClassConfig ========
00531  */
00548 extern Ptr VISA_getCodecClassConfig(VISA_Handle visa);
00549
00550
00551 /*
00552  *  ======== VISA_getMaxMsgSize ========
00553  */
00566 extern UInt VISA_getMaxMsgSize(VISA_Handle visa);
00567
00568
00569 /*
00570  *  ======== VISA_isChecked ========
00571  */
00585 static inline Bool VISA_isChecked(Void)
00586 {
00587     extern Bool VISA_checked;  /* generated by Settings.xdt based 'checked' */
00588
00589     return (VISA_checked);
00590 }
00591
00592 /*
00593  *  ======== VISA_setContext ========
00594  */
00611 extern Void VISA_setContext(VISA_Handle visa, UInt32 context);
00612
00613 /*
00614  *  ======== VISA_isLocal ========
00615  */
00626 extern Bool VISA_isLocal(VISA_Handle visa);
00627
00628 #ifdef __cplusplus
00629 }
00630 #endif
00631
00632 #endif
00633 /*
00634  *  @(#) ti.sdo.ce; 1, 0, 6,410; 6-19-2010 19:51:26; /db/atree/library/trees/ce/ce-o16x/src/
00635  */
00636


Codec Engine System Programming Interface (SPI): xdas.h Source File

  • File List
  • Globals
cetools » packages » ti » xdais

xdas.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2010, 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  */
00045 #ifndef ti_xdais_XDAS_
00046 #define ti_xdais_XDAS_
00047
00048 #ifdef __cplusplus
00049 extern "C" {
00050 #endif
00051
00054
00055
00056 #define XDAS_TRUE       1
00057 #define XDAS_FALSE      0
00058
00059
00060 typedef Void            XDAS_Void;
00061 typedef Uint8           XDAS_Bool;
00062
00063
00064 typedef Int8            XDAS_Int8;
00065 typedef Uint8           XDAS_UInt8;
00066 typedef Int16           XDAS_Int16;
00067 typedef Uint16          XDAS_UInt16;
00068 typedef Int32           XDAS_Int32;
00069 typedef Uint32          XDAS_UInt32;
00073
00074
00075 #ifdef __cplusplus
00076 }
00077 #endif
00078
00079 #endif  /* ti_xdais_XDAS_ */
00080 /*
00081  *  @(#) ti.xdais; 1, 2.0, 1,243; 5-4-2010 08:43:56; /db/wtree/library/trees/dais/dais-q11x/src/
00082  */
00083