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