1    /* 
     2     * Copyright (c) 2012, Texas Instruments Incorporated
     3     * All rights reserved.
     4     *
     5     * Redistribution and use in source and binary forms, with or without
     6     * modification, are permitted provided that the following conditions
     7     * are met:
     8     *
     9     * *  Redistributions of source code must retain the above copyright
    10     *    notice, this list of conditions and the following disclaimer.
    11     *
    12     * *  Redistributions in binary form must reproduce the above copyright
    13     *    notice, this list of conditions and the following disclaimer in the
    14     *    documentation and/or other materials provided with the distribution.
    15     *
    16     * *  Neither the name of Texas Instruments Incorporated nor the names of
    17     *    its contributors may be used to endorse or promote products derived
    18     *    from this software without specific prior written permission.
    19     *
    20     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    21     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    22     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    23     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    24     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    25     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    26     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    27     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    28     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    29     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    30     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    31     * 
    32     */
    33    /*!
    34     *  ======== Algorithm ========
    35     *
    36     */
    37    
    38    @Template("./Algorithm.xdt")
    39    
    40    
    41    metaonly module Algorithm {
    42    
    43        /*!
    44         *  ======== useIdma3 ========
    45         *  True if IDMA3 needs to be supported.
    46         *
    47         *  @_nodoc
    48         */
    49        metaonly config bool useIdma3;
    50    
    51        /*!
    52         *  ======== useIres ========
    53         *  True if IRES needs to be supported.
    54         *
    55         *  @_nodoc
    56         */
    57        metaonly config bool useIres;
    58    
    59        /*!
    60         *  ======== useHeap ========
    61         *  Indicates that algorithm memory should be allocated from a heap.
    62         *
    63         *  Flag indicating whether algorithm memory should be allocated from
    64         *  a heap or from a pool.
    65         *
    66         *  This flag is currently only used when CMEM is used to allocate memory
    67         *  (e.g. ARM-side 'local' codecs).
    68         */
    69        config bool useHeap = false;
    70    
    71        /*!
    72         *  ======== useCache ========
    73         *  Indicates that algorithm memory should be cacheable.
    74         *
    75         *  This flag indicates whether algorithm memory should be allocated from
    76         *  cache-enabled buffers.
    77         *
    78         *  This flag is currently only used when CMEM is used to allocate memory
    79         *  (e.g. ARM-side 'local' codecs).
    80         *
    81         *  Note that when cache-enabled buffers are used, it is the application's
    82         *  responsibility to manage this cache.  See the various `Memory_` APIs
    83         *  for cache services.
    84         */
    85        config bool useCache = false;
    86    
    87        /*!
    88         *  ======== ipcKeyBase ========
    89         *  Default base value for ALG's semaphore keys.
    90         *
    91         *  The SemMP objects created by ALG will use keys starting at this
    92         *  value, and incrementing with each new object. There are currently
    93         *  _ALG_NUMGROUPS (20) keys needed for ALG semaphores.
    94         *  The default value of ipcKeyBase is ascii code for "OGLA".
    95         *
    96         *  WARNING: This value should only be changed if it conflicts with
    97         *  another IPC key in the system that cannot be changed. If this value
    98         *  is changed, all programs using Codec Engine that will be run
    99         *  simultaneously must have the ipcKeyBase configured to the new value.
   100         *
   101         *  @_nodoc
   102         */
   103        metaonly config UInt32 ipcKeyBase = 0x4F474C41;
   104    
   105        /*!
   106         *  ======== MAXGROUPID ========
   107         *  Maximum group id.
   108         *
   109         *  @_nodoc
   110         */
   111        const Int MAXGROUPID = 20;
   112    
   113        /*!
   114         *  ======== groupUsed ========
   115         *  Internal array indicating groups with algorithms
   116         *
   117         *  If there is an algorithm with groupId i, then groupUsed[i]
   118         *  will be set to true.
   119         *
   120         *  @_nodoc
   121         */
   122        metaonly config bool groupUsed[MAXGROUPID] = [
   123                false, false, false, false, false,
   124                false, false, false, false, false,
   125                false, false, false, false, false,
   126                false, false, false, false, false
   127        ];
   128    }
   129    /*
   130     *  @(#) ti.sdo.ce.alg; 1, 0, 1,1; 2-24-2012 19:27:09; /db/atree/library/trees/ce/ce-t06/src/ xlibrary
   131    
   132     */
   133