1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 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 131 132
133