1 /*******************************************************************************
2 * Copyright (C) 2018 Cadence Design Systems, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files (the
6 * "Software"), to use this Software with Cadence processor cores only and
7 * not with any other processors and platforms, subject to
8 * the following conditions:
9 *
10 * The above copyright notice and this permission notice shall be included
11 * in all copies or substantial portions of the Software.
12 *
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
14 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
17 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
18 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
19 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 
21 ******************************************************************************/
22 /*******************************************************************************
23 *
24 * NOTE, ANY CHANGES TO THIS FILE MAY AFFECT UNDERLYING AUDIO / SPEECH CODEC
25 * LIBRARY COMPONENT FROM CADENCE DESIGN SYSTEMS, INC.
26 *
27 ******************************************************************************/
28 
29 
30 #ifndef __XA_API_CMD_STANDARDS_H__
31 #define __XA_API_CMD_STANDARDS_H__
32 
33 /*****************************************************************************/
34 /* Standard API commands                                                     */
35 /*****************************************************************************/
36 
37 enum xa_api_cmd_generic {
38   XA_API_CMD_GET_LIB_ID_STRINGS	      = 0x0001,
39 
40   XA_API_CMD_GET_API_SIZE             = 0x0002,
41   XA_API_CMD_INIT                     = 0x0003,
42 
43   XA_API_CMD_SET_CONFIG_PARAM         = 0x0004,
44   XA_API_CMD_GET_CONFIG_PARAM         = 0x0005,
45 
46   XA_API_CMD_GET_MEMTABS_SIZE         = 0x0006,
47   XA_API_CMD_SET_MEMTABS_PTR          = 0x0007,
48   XA_API_CMD_GET_N_MEMTABS            = 0x0008,
49 
50   XA_API_CMD_EXECUTE                  = 0x0009,
51 
52   XA_API_CMD_PUT_INPUT_QUERY          = 0x000A,
53   XA_API_CMD_GET_CURIDX_INPUT_BUF     = 0x000B,
54   XA_API_CMD_SET_INPUT_BYTES          = 0x000C,
55   XA_API_CMD_GET_OUTPUT_BYTES         = 0x000D,
56   XA_API_CMD_INPUT_OVER               = 0x000E,
57 
58   XA_API_CMD_GET_MEM_INFO_SIZE        = 0x0010,
59   XA_API_CMD_GET_MEM_INFO_ALIGNMENT   = 0x0011,
60   XA_API_CMD_GET_MEM_INFO_TYPE        = 0x0012,
61   XA_API_CMD_GET_MEM_INFO_PLACEMENT   = 0x0013,
62   XA_API_CMD_GET_MEM_INFO_PRIORITY    = 0x0014,
63   XA_API_CMD_SET_MEM_PTR              = 0x0015,
64   XA_API_CMD_SET_MEM_INFO_SIZE        = 0x0016,
65   XA_API_CMD_SET_MEM_PLACEMENT        = 0x0017,
66 
67   XA_API_CMD_GET_N_TABLES             = 0x0018,
68   XA_API_CMD_GET_TABLE_INFO_SIZE      = 0x0019,
69   XA_API_CMD_GET_TABLE_INFO_ALIGNMENT = 0x001A,
70   XA_API_CMD_GET_TABLE_INFO_PRIORITY  = 0x001B,
71   XA_API_CMD_SET_TABLE_PTR            = 0x001C,
72   XA_API_CMD_GET_TABLE_PTR            = 0x001D
73 };
74 
75 /*****************************************************************************/
76 /* Standard API command indices                                              */
77 /*****************************************************************************/
78 
79 enum xa_cmd_type_generic {
80   /* XA_API_CMD_GET_LIB_ID_STRINGS indices */
81   XA_CMD_TYPE_LIB_NAME                    = 0x0100,
82   XA_CMD_TYPE_LIB_VERSION                 = 0x0200,
83   XA_CMD_TYPE_API_VERSION                 = 0x0300,
84 
85   /* XA_API_CMD_INIT indices */
86   XA_CMD_TYPE_INIT_API_PRE_CONFIG_PARAMS  = 0x0100,
87   XA_CMD_TYPE_INIT_API_POST_CONFIG_PARAMS = 0x0200,
88   XA_CMD_TYPE_INIT_PROCESS                = 0x0300,
89   XA_CMD_TYPE_INIT_DONE_QUERY             = 0x0400,
90 
91   /* XA_API_CMD_EXECUTE indices */
92   XA_CMD_TYPE_DO_EXECUTE                  = 0x0100,
93   XA_CMD_TYPE_DONE_QUERY                  = 0x0200,
94   XA_CMD_TYPE_DO_RUNTIME_INIT             = 0x0300
95 };
96 
97 
98 /*****************************************************************************/
99 /* Standard API configuration parameters                                     */
100 /*****************************************************************************/
101 
102 enum xa_config_param_generic {
103   XA_CONFIG_PARAM_CUR_INPUT_STREAM_POS    = 0x0100,
104   XA_CONFIG_PARAM_GEN_INPUT_STREAM_POS    = 0x0200,
105 };
106 
107 #endif /* __XA_API_CMD_STANDARDS_H__ */
108