Developer World
Spresense SDK Library v3.3.0-375c679
audio_message_types.h
1/****************************************************************************
2 * modules/include/audio/audio_message_types.h
3 *
4 * Copyright 2018 Sony Semiconductor Solutions Corporation
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in
14 * the documentation and/or other materials provided with the
15 * distribution.
16 * 3. Neither the name of Sony Semiconductor Solutions Corporation nor
17 * the names of its contributors may be used to endorse or promote
18 * products derived from this software without specific prior written
19 * permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
28 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
29 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 *
34 ****************************************************************************/
35
36#ifndef __MODULES_INCLUDE_AUDIO_AUDIO_MESSAGE_TYPE_H
37#define __MODULES_INCLUDE_AUDIO_AUDIO_MESSAGE_TYPE_H
38
39/****************************************************************************
40 * Included Files
41 ****************************************************************************/
42
43#include "memutils/message/message_type.h"
44
45/****************************************************************************
46 * Pre-processor Definitions
47 ****************************************************************************/
48
49/************************************************************************
50 *
51 * request / response
52 *
53 ************************************************************************
54 */
55
56#define MSG_TYPE_AUD_RES (MSG_TYPE_RESPONSE | MSG_TYPE_USER_AUDIO_UTIL)
57#define MSG_TYPE_AUD_REQ (MSG_TYPE_REQUEST | MSG_TYPE_USER_AUDIO_UTIL)
58
59/************************************************************************
60 *
61 * category
62 *
63 ************************************************************************
64 */
65
66#define MSG_CAT_AUD_MNG (MSG_SET_CATEGORY(0x0))
67#define MSG_CAT_AUD_ISR (MSG_SET_CATEGORY(0x1))
68#define MSG_CAT_AUD_PLY (MSG_SET_CATEGORY(0x2))
69#define MSG_CAT_AUD_SEF (MSG_SET_CATEGORY(0x3))
70#define MSG_CAT_AUD_RCG (MSG_SET_CATEGORY(0x4))
71#define MSG_CAT_AUD_MRC (MSG_SET_CATEGORY(0x5))
72#define MSG_CAT_AUD_SNK (MSG_SET_CATEGORY(0x6))
73#define MSG_CAT_AUD_MIX (MSG_SET_CATEGORY(0x7))
74#define MSG_CAT_AUD_MIX_SEF (MSG_SET_CATEGORY(0x8))
75#define MSG_CAT_AUD_CAP (MSG_SET_CATEGORY(0x9))
76#define MSG_CAT_AUD_MFE (MSG_SET_CATEGORY(0xA))
77#define MSG_CAT_AUD_SYN (MSG_SET_CATEGORY(0xB))
78#define MSG_CAT_AUD_BB (MSG_SET_CATEGORY(0xC))
79
80/************************************************************************
81 *
82 * Object Base Sub Type
83 *
84 ************************************************************************
85 */
86
87#define MSG_OBJ_SUBTYPE_ACT (0x00)
88#define MSG_OBJ_SUBTYPE_DEACT (0x01)
89#define MSG_OBJ_SUBTYPE_INIT (0x02)
90#define MSG_OBJ_SUBTYPE_START (0x03)
91#define MSG_OBJ_SUBTYPE_STOP (0x04)
92#define MSG_OBJ_SUBTYPE_EXEC (0x05)
93#define MSG_OBJ_SUBTYPE_SET (0x06)
94#define MSG_OBJ_SUBTYPE_NUM (MSG_OBJ_SUBTYPE_SET + 1)
95
96/************************************************************************
97 *
98 * MSG_CAT_AUD_MNG: Audio Manager Command/Result(bi-directional)
99 *
100 * D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
101 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
102 * |REQ|USER_AUDIO | MSG_CAT_MNG | MSG_SUB_TYPE | MSG_PARAM |
103 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
104 *
105 ************************************************************************
106 */
107#define MSG_AUD_MNG_REQ (MSG_TYPE_AUD_REQ | MSG_CAT_AUD_MNG)
108#define MSG_AUD_MNG_RES (MSG_TYPE_AUD_RES | MSG_CAT_AUD_MNG)
109
110#define MSG_AUD_MGR_CMD_PLAYER (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x00))
111#define MSG_AUD_MGR_CMD_SETREADY (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x01))
112#define MSG_AUD_MGR_CMD_SETBASEBAND (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x02))
113#define MSG_AUD_MGR_CMD_SETPLAYER (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x03))
114#define MSG_AUD_MGR_CMD_SETRECOGNIZER (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x04))
115#define MSG_AUD_MGR_CMD_RECOGNIZER (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x05))
116#define MSG_AUD_MGR_CMD_SETRECORDER (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x06))
117#define MSG_AUD_MGR_CMD_RECORDER (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x07))
118#define MSG_AUD_MGR_CMD_SOUNDFX (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x08))
119#define MSG_AUD_MGR_CMD_MFE (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x09))
120#define MSG_AUD_MGR_CMD_MPP (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x0a))
121#define MSG_AUD_MGR_CMD_GETSTATUS (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x0b))
122#define MSG_AUD_MGR_CMD_SETMICMAP (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x0c))
123#define MSG_AUD_MGR_CMD_INITMICGAIN (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x0d))
124#define MSG_AUD_MGR_CMD_INITDEQPARAM (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x0e))
125#define MSG_AUD_MGR_CMD_INITOUTPUTSELECT (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x0f))
126#define MSG_AUD_MGR_CMD_INITDNCPARAM (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x10))
127#define MSG_AUD_MGR_CMD_INITCLEARSTEREO (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x11))
128#define MSG_AUD_MGR_CMD_SETVOLUME (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x12))
129#define MSG_AUD_MGR_CMD_SETVOLUMEMUTE (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x13))
130#define MSG_AUD_MGR_CMD_SETBEEP (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x14))
131#define MSG_AUD_MGR_CMD_POWERON (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x15))
132#define MSG_AUD_MGR_CMD_POWEROFF (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x16))
133#define MSG_AUD_MGR_CMD_OUTPUTMIXER (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x17))
134#define MSG_AUD_MGR_CMD_SETTHROUGH (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x18))
135#define MSG_AUD_MGR_CMD_SETTHROUGHPATH (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x19))
136#define MSG_AUD_MGR_CMD_SETRENDERINGCLK (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x1a))
137#define MSG_AUD_MGR_CMD_INVALID (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x1b))
138#define MSG_AUD_MGR_CMD_INITSPDRVMODE (MSG_AUD_MNG_REQ | MSG_SET_SUBTYPE(0x1c))
139
140#define LAST_AUD_MGR_MSG (MSG_AUD_MGR_CMD_INITSPDRVMODE + 1)
141#define AUD_MGR_MSG_NUM (LAST_AUD_MGR_MSG & MSG_TYPE_SUBTYPE)
142
143#define MSG_AUD_MGR_CALL_ATTENTION (MSG_AUD_MNG_RES | MSG_SET_SUBTYPE(0x01))
144
145/************************************************************************
146 *
147 * MSG_CAT_ISR: Interrupt (response)
148 *
149 * D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
150 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
151 * |REQ|USER_AUDIO |MSG_CAT_AUD_ISR| MSG_SUB_TYPE | MSG_PARAM |
152 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
153 *
154 ************************************************************************
155 */
156#define MSG_ISR (MSG_TYPE_AUD_RES | MSG_CAT_AUD_ISR)
157
158#define MSG_ISR_DMA_CMPLT (MSG_ISR | MSG_SET_SUBTYPE(0x01))
159#define MSG_ISR_DMA_ERROR (MSG_ISR | MSG_SET_SUBTYPE(0x02))
160#define MSG_ISR_AC_INTRPT (MSG_ISR | MSG_SET_SUBTYPE(0x03))
161#define MSG_ISR_BUS_ERROR (MSG_ISR | MSG_SET_SUBTYPE(0x04))
162#define MSG_ISR_APU0 (MSG_ISR | MSG_SET_SUBTYPE(0x10))
163#define MSG_ISR_APU1 (MSG_ISR | MSG_SET_SUBTYPE(0x11))
164#define MSG_ISR_APU2 (MSG_ISR | MSG_SET_SUBTYPE(0x12))
165
166/************************************************************************
167 *
168 * MSG_CAT_AUD_PLY: Audio Player Command/Result(bi-directional)
169 *
170 * D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
171 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
172 * |REQ|USER_AUDIO |MSG_CAT_AUD_PLY| MSG_SUB_TYPE | MSG_PARAM |
173 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
174 *
175 ************************************************************************
176 */
177#define MSG_AUD_PLY_REQ (MSG_TYPE_AUD_REQ | MSG_CAT_AUD_PLY)
178#define MSG_AUD_PLY_RES (MSG_TYPE_AUD_RES | MSG_CAT_AUD_PLY)
179
180#define MSG_AUD_PLY_CMD_ACT (MSG_AUD_PLY_REQ | MSG_SET_SUBTYPE(0x00))
181#define MSG_AUD_PLY_CMD_INIT (MSG_AUD_PLY_REQ | MSG_SET_SUBTYPE(0x01))
182#define MSG_AUD_PLY_CMD_PLAY (MSG_AUD_PLY_REQ | MSG_SET_SUBTYPE(0x02))
183#define MSG_AUD_PLY_CMD_STOP (MSG_AUD_PLY_REQ | MSG_SET_SUBTYPE(0x03))
184#define MSG_AUD_PLY_CMD_DEACT (MSG_AUD_PLY_REQ | MSG_SET_SUBTYPE(0x04))
185#define MSG_AUD_PLY_CMD_SETGAIN (MSG_AUD_PLY_REQ | MSG_SET_SUBTYPE(0x05))
186
187#define LAST_AUD_PLY_MSG (MSG_AUD_PLY_CMD_SETGAIN + 1)
188#define AUD_PLY_MSG_NUM (LAST_AUD_PLY_MSG & MSG_TYPE_SUBTYPE)
189
190#define MSG_AUD_PLY_CMD_NEXT_REQ (MSG_AUD_PLY_RES | MSG_SET_SUBTYPE(0x00))
191#define MSG_AUD_PLY_CMD_DEC_DONE (MSG_AUD_PLY_RES | MSG_SET_SUBTYPE(0x01))
192#define MSG_AUD_PLY_CMD_DEC_SET_DONE (MSG_AUD_PLY_RES | MSG_SET_SUBTYPE(0x02))
193
194#define LAST_AUD_PLY_RST_MSG (MSG_AUD_PLY_CMD_DEC_SET_DONE + 1)
195#define AUD_PLY_RST_MSG_NUM (LAST_AUD_PLY_RST_MSG & MSG_TYPE_SUBTYPE)
196
197/************************************************************************
198 *
199 * MSG_CAT_AUD_BB: Audio Baseband Command/Result(bi-directional)
200 *
201 * D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
202 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
203 * |REQ|USER_AUDIO |MSG_CAT_AUD_BB | MSG_SUB_TYPE | MSG_PARAM |
204 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
205 *
206 ************************************************************************
207 */
208#define MSG_AUD_BB_REQ (MSG_TYPE_AUD_REQ | MSG_CAT_AUD_BB)
209#define MSG_AUD_BB_RES (MSG_TYPE_AUD_RES | MSG_CAT_AUD_BB)
210
211#define MSG_AUD_BB_CMD_ACT (MSG_AUD_BB_REQ | MSG_SET_SUBTYPE(0x00))
212#define MSG_AUD_BB_CMD_DEACT (MSG_AUD_BB_REQ | MSG_SET_SUBTYPE(0x01))
213#define MSG_AUD_BB_CMD_INIT (MSG_AUD_BB_REQ | MSG_SET_SUBTYPE(0x02))
214#define MSG_AUD_BB_CMD_RUN (MSG_AUD_BB_REQ | MSG_SET_SUBTYPE(0x03))
215#define MSG_AUD_BB_CMD_STOP (MSG_AUD_BB_REQ | MSG_SET_SUBTYPE(0x04))
216#define MSG_AUD_BB_CMD_CMPLT (MSG_AUD_BB_REQ | MSG_SET_SUBTYPE(0x05))
217
218#define LAST_AUD_BB_MSG (MSG_AUD_BB_CMD_CMPLT + 1)
219#define AUD_BB_MSG_NUM (LAST_AUD_BB_MSG & MSG_TYPE_SUBTYPE)
220
221#define MSG_AUD_BB_RST (MSG_AUD_BB_RES | MSG_SET_SUBTYPE(0x00))
222
223/************************************************************************
224 *
225 * MSG_CAT_AUD_RCG: sound recognition Command/Result(bi-directional)
226 *
227 * D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
228 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
229 * |REQ|USER_AUDIO |MSG_CAT_AUD_RCG| MSG_SUB_TYPE | MSG_PARAM |
230 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
231 *
232 ************************************************************************
233 */
234#define MSG_AUD_RCG_REQ (MSG_TYPE_AUD_REQ | MSG_CAT_AUD_RCG)
235#define MSG_AUD_RCG_RES (MSG_TYPE_AUD_RES | MSG_CAT_AUD_RCG)
236
237#define MSG_AUD_RCG_PRM_INITPREPROC (0x00)
238#define MSG_AUD_RCG_PRM_SETPREPROC (0x01)
239
240#define MSG_AUD_RCG_ACT (MSG_AUD_RCG_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_ACT))
241#define MSG_AUD_RCG_DEACT (MSG_AUD_RCG_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_DEACT))
242#define MSG_AUD_RCG_INIT (MSG_AUD_RCG_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_INIT))
243#define MSG_AUD_RCG_START (MSG_AUD_RCG_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_START))
244#define MSG_AUD_RCG_STOP (MSG_AUD_RCG_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_STOP))
245#define MSG_AUD_RCG_EXEC (MSG_AUD_RCG_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_EXEC))
246#define MSG_AUD_RCG_INITRCGPROC (MSG_AUD_RCG_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_SET) | MSG_AUD_RCG_PRM_INITPREPROC)
247#define MSG_AUD_RCG_SETRCGPROC (MSG_AUD_RCG_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_SET) | MSG_AUD_RCG_PRM_SETPREPROC)
248
249#define LAST_AUD_RCG_REQ_MSG (MSG_AUD_RCG_SETRCGPROC)
250#define AUD_RCG_REQ_MSG_NUM (MSG_GET_SUBTYPE(LAST_AUD_RCG_REQ_MSG) + 1)
251
252#define LAST_AUD_RCG_PRM (MSG_AUD_RCG_PRM_SETPREPROC)
253#define AUD_RCG_PRM_NUM (MSG_GET_PARAM(LAST_AUD_RCG_PRM) + 1)
254
255#define MSG_AUD_RCG_RCG_CMPLT (MSG_AUD_RCG_RES | MSG_SET_SUBTYPE(0x00))
256#define MSG_AUD_RCG_FIND_TRIGGER (MSG_AUD_RCG_RES | MSG_SET_SUBTYPE(0x01))
257#define MSG_AUD_RCG_FIND_COMMAND (MSG_AUD_RCG_RES | MSG_SET_SUBTYPE(0x02))
258
259#define LAST_AUDRCG_RES_MSG (MSG_AUD_RCG_RCG_CMPLT)
260#define AUD_RCG_RES_MSG_NUM (MSG_GET_SUBTYPE(LAST_AUDRCG_RES_MSG) + 1)
261
262/************************************************************************
263 *
264 * MSG_CAT_AUD_MRC: Media recorder Command/Result(bi-directional)
265 *
266 * D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
267 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
268 * |REQ|USER_AUDIO |MSG_CAT_AUD_MRC| MSG_SUB_TYPE | MSG_PARAM |
269 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
270 *
271 ************************************************************************
272 */
273#define MSG_AUD_MRC_REQ (MSG_TYPE_AUD_REQ | MSG_CAT_AUD_MRC)
274#define MSG_AUD_MRC_RES (MSG_TYPE_AUD_RES | MSG_CAT_AUD_MRC)
275
276#define MSG_AUD_MRC_CMD_ACTIVATE (MSG_AUD_MRC_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_ACT))
277#define MSG_AUD_MRC_CMD_DEACTIVATE (MSG_AUD_MRC_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_DEACT))
278#define MSG_AUD_MRC_CMD_INIT (MSG_AUD_MRC_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_INIT))
279#define MSG_AUD_MRC_CMD_START (MSG_AUD_MRC_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_START))
280#define MSG_AUD_MRC_CMD_STOP (MSG_AUD_MRC_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_STOP))
281#define MSG_AUD_MRC_CMD_ENCODE (MSG_AUD_MRC_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_EXEC))
282
283#define LAST_AUD_MRC_MSG (MSG_AUD_MRC_CMD_ENCODE)
284#define AUD_MRC_MSG_NUM (MSG_GET_SUBTYPE(LAST_AUD_MRC_MSG) + 1)
285
286#define MSG_AUD_MRC_RST_FILTER (MSG_AUD_MRC_RES | MSG_SET_SUBTYPE(0x00))
287#define MSG_AUD_MRC_RST_ENC (MSG_AUD_MRC_RES | MSG_SET_SUBTYPE(0x01))
288
289#define LAST_AUD_MRC_RST_MSG (MSG_AUD_MRC_RST_ENC)
290#define AUD_MRC_RST_MSG_NUM (MSG_GET_SUBTYPE(LAST_AUD_MRC_RST_MSG) + 1)
291
292/************************************************************************
293 *
294 * MSG_CAT_AUD_SNK: Media recorder data sink Command/Result(bi-directional)
295 *
296 * D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
297 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
298 * |REQ|USER_AUDIO |MSG_CAT_AUD_SNK| MSG_SUB_TYPE | MSG_PARAM |
299 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
300 *
301 ************************************************************************
302 */
303#define MSG_AUD_SNK_REQ (MSG_TYPE_AUD_REQ | MSG_CAT_AUD_SNK)
304#define MSG_AUD_SNK_RES (MSG_TYPE_AUD_RES | MSG_CAT_AUD_SNK)
305
306#define MSG_AUD_SNK_INIT (MSG_AUD_SNK_REQ | MSG_SET_SUBTYPE(0x00))
307#define MSG_AUD_SNK_DATA (MSG_AUD_SNK_REQ | MSG_SET_SUBTYPE(0x01))
308#define MSG_AUD_SNK_STOP (MSG_AUD_SNK_REQ | MSG_SET_SUBTYPE(0x02))
309
310#define LAST_AUD_SNK_MSG (MSG_AUD_SNK_STOP + 1)
311#define AUD_SNK_MSG_NUM (LAST_AUD_SNK_MSG & MSG_TYPE_SUBTYPE)
312
313#define MSG_AUD_SNK_RST (MSG_AUD_SNK_RES | MSG_SET_SUBTYPE(0x00))
314
315/************************************************************************
316 *
317 * MSG_CAT_AUD_MIX: Output mix Command/Result(bi-directional)
318 *
319 * D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
320 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
321 * |REQ|USER_AUDIO |MSG_CAT_AUD_MIX| MSG_SUB_TYPE | MSG_PARAM |
322 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
323 *
324 ************************************************************************
325 */
326#define MSG_AUD_MIX_REQ (MSG_TYPE_AUD_REQ | MSG_CAT_AUD_MIX)
327#define MSG_AUD_MIX_RES (MSG_TYPE_AUD_RES | MSG_CAT_AUD_MIX)
328
329#define MSG_AUD_MIX_CMD_ACT (MSG_AUD_MIX_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_ACT))
330#define MSG_AUD_MIX_CMD_DEACT (MSG_AUD_MIX_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_DEACT))
331#define MSG_AUD_MIX_CMD_INIT (MSG_AUD_MIX_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_INIT))
332#define MSG_AUD_MIX_CMD_DATA (MSG_AUD_MIX_REQ | MSG_SET_SUBTYPE(0x03))
333#define MSG_AUD_MIX_CMD_CLKRECOVERY (MSG_AUD_MIX_REQ | MSG_SET_SUBTYPE(0x04))
334#define MSG_AUD_MIX_CMD_INITMPP (MSG_AUD_MIX_REQ | MSG_SET_SUBTYPE(0x05))
335#define MSG_AUD_MIX_CMD_SETMPP (MSG_AUD_MIX_REQ | MSG_SET_SUBTYPE(0x06))
336
337
338#define LAST_AUD_MIX_MSG MSG_AUD_MIX_CMD_SETMPP
339#define AUD_MIX_MSG_NUM (MSG_GET_SUBTYPE(LAST_AUD_MIX_MSG) + 1)
340
341#define MSG_AUD_MIX_RST_PSTFLT_DONE (MSG_AUD_MIX_RES | MSG_SET_SUBTYPE(0x00))
342#define MSG_AUD_MIX_RST_RENDER_DONE (MSG_AUD_MIX_RES | MSG_SET_SUBTYPE(0x01))
343
344#define LAST_AUD_MIX_RST_MSG (MSG_AUD_MIX_RST_RENDER_DONE)
345#define AUD_MIX_RST_MSG_NUM (MSG_GET_SUBTYPE(LAST_AUD_MIX_RST_MSG) + 1)
346
347/************************************************************************
348 *
349 * MSG_CAT_AUD_SEF: Sound-effect Command/Result(bi-directional)
350 *
351 * D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
352 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
353 * |REQ|USER_AUDIO |MSG_CAT_AUD_SEF| MSG_SUB_TYPE | MSG_PARAM |
354 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
355 *
356 ************************************************************************
357 */
358#define MSG_AUD_SEF_REQ (MSG_TYPE_AUD_REQ | MSG_CAT_AUD_SEF)
359#define MSG_AUD_SEF_RES (MSG_TYPE_AUD_RES | MSG_CAT_AUD_SEF)
360
361#define MSG_AUD_SEF_CMD_ACT (MSG_AUD_SEF_REQ | MSG_SET_SUBTYPE(0x00))
362#define MSG_AUD_SEF_CMD_DEACT (MSG_AUD_SEF_REQ | MSG_SET_SUBTYPE(0x01))
363#define MSG_AUD_SEF_CMD_INIT (MSG_AUD_SEF_REQ | MSG_SET_SUBTYPE(0x02))
364#define MSG_AUD_SEF_CMD_START (MSG_AUD_SEF_REQ | MSG_SET_SUBTYPE(0x03))
365#define MSG_AUD_SEF_CMD_STOP (MSG_AUD_SEF_REQ | MSG_SET_SUBTYPE(0x04))
366#define MSG_AUD_SEF_CMD_INPUT (MSG_AUD_SEF_REQ | MSG_SET_SUBTYPE(0x05))
367#define MSG_AUD_SEF_CMD_FILTER_DATA (MSG_AUD_SEF_REQ | MSG_SET_SUBTYPE(0x06))
368#define MSG_AUD_SEF_CMD_DMA_OUT_DONE (MSG_AUD_SEF_REQ | MSG_SET_SUBTYPE(0x07))
369#define MSG_AUD_SEF_CMD_SETPARAM (MSG_AUD_SEF_REQ | MSG_SET_SUBTYPE(0x08))
370#define MSG_AUD_SEF_CMD_CMPLT (MSG_AUD_SEF_REQ | MSG_SET_SUBTYPE(0x09))
371
372#define LAST_AUD_SEF_MSG (MSG_AUD_SEF_CMD_CMPLT + 1)
373#define AUD_SEF_MSG_NUM (LAST_AUD_SEF_MSG & MSG_TYPE_SUBTYPE)
374
375#define MSG_AUD_SEF_RST (MSG_AUD_SEF_RES | MSG_SET_SUBTYPE(0x00))
376
377/************************************************************************
378 *
379 * MSG_CAT_AUD_CAP: Audio Capture Command/Result(bi-directional)
380 *
381 * D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
382 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
383 * |REQ|USER_AUDIO |MSG_CAT_AUD_CAP| MSG_SUB_TYPE | MSG_PARAM |
384 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
385 *
386 ************************************************************************
387 */
388#define MSG_AUD_CAP_REQ (MSG_TYPE_AUD_REQ | MSG_CAT_AUD_CAP)
389#define MSG_AUD_CAP_RES (MSG_TYPE_AUD_RES | MSG_CAT_AUD_CAP)
390
391#define MSG_AUD_CAP_CMD_ACT (MSG_AUD_CAP_REQ | MSG_SET_SUBTYPE(0x00))
392#define MSG_AUD_CAP_CMD_DEACT (MSG_AUD_CAP_REQ | MSG_SET_SUBTYPE(0x01))
393#define MSG_AUD_CAP_CMD_INIT (MSG_AUD_CAP_REQ | MSG_SET_SUBTYPE(0x02))
394#define MSG_AUD_CAP_CMD_RUN (MSG_AUD_CAP_REQ | MSG_SET_SUBTYPE(0x03))
395#define MSG_AUD_CAP_CMD_STOP (MSG_AUD_CAP_REQ | MSG_SET_SUBTYPE(0x04))
396#define MSG_AUD_CAP_CMD_SETMICGAIN (MSG_AUD_CAP_REQ | MSG_SET_SUBTYPE(0x05))
397#define MSG_AUD_CAP_CMD_CMPLT (MSG_AUD_CAP_REQ | MSG_SET_SUBTYPE(0x06))
398
399#define LAST_AUD_CAP_MSG (MSG_AUD_CAP_CMD_CMPLT + 1)
400#define AUD_CAP_MSG_NUM (LAST_AUD_CAP_MSG & MSG_TYPE_SUBTYPE)
401
402#define MSG_AUD_CAP_RST (MSG_AUD_CAP_RES | MSG_SET_SUBTYPE(0x00))
403
404/************************************************************************
405 *
406 * MSG_CAT_AUD_MFE: Mic Frontend Command/Result(bi-directional)
407 *
408 * D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
409 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
410 * |REQ|USER_AUDIO |MSG_CAT_AUD_MFE| MSG_SUB_TYPE | MSG_PARAM |
411 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
412 *
413 ************************************************************************
414 */
415#define MSG_AUD_MFE_REQ (MSG_TYPE_AUD_REQ | MSG_CAT_AUD_MFE)
416#define MSG_AUD_MFE_RES (MSG_TYPE_AUD_RES | MSG_CAT_AUD_MFE)
417
418#define MSG_AUD_MFE_PRM_INITPREPROC (0x00)
419#define MSG_AUD_MFE_PRM_SETPREPROC (0x01)
420#define MSG_AUD_MFE_PRM_SETMICGAIN (0x02)
421
422#define MSG_AUD_MFE_CMD_ACT (MSG_AUD_MFE_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_ACT))
423#define MSG_AUD_MFE_CMD_DEACT (MSG_AUD_MFE_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_DEACT))
424#define MSG_AUD_MFE_CMD_INIT (MSG_AUD_MFE_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_INIT))
425#define MSG_AUD_MFE_CMD_START (MSG_AUD_MFE_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_START))
426#define MSG_AUD_MFE_CMD_STOP (MSG_AUD_MFE_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_STOP))
427/* This object do not need "execute" */
428#define MSG_AUD_MFE_CMD_INITPREPROC (MSG_AUD_MFE_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_SET) | MSG_AUD_MFE_PRM_INITPREPROC)
429#define MSG_AUD_MFE_CMD_SETPREPROC (MSG_AUD_MFE_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_SET) | MSG_AUD_MFE_PRM_SETPREPROC)
430#define MSG_AUD_MFE_CMD_SETMICGAIN (MSG_AUD_MFE_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_SET) | MSG_AUD_MFE_PRM_SETMICGAIN)
431
432#define LAST_AUD_MFE_MSG (MSG_AUD_MFE_CMD_SETMICGAIN)
433#define AUD_MFE_MSG_NUM (MSG_GET_SUBTYPE(LAST_AUD_MFE_MSG) + 1)
434
435#define LAST_AUD_MFE_PRM (MSG_AUD_MFE_PRM_SETMICGAIN)
436#define AUD_MFE_PRM_NUM (MSG_GET_PARAM(LAST_AUD_MFE_PRM) + 1)
437
438#define MSG_AUD_MFE_RST_CAPTURE_DONE (MSG_AUD_MFE_RES | MSG_SET_SUBTYPE(0x00))
439#define MSG_AUD_MFE_RST_CAPTURE_ERR (MSG_AUD_MFE_RES | MSG_SET_SUBTYPE(0x01))
440#define MSG_AUD_MFE_RST_PREPROC (MSG_AUD_MFE_RES | MSG_SET_SUBTYPE(0x02))
441
442#define LAST_AUD_MFE_RST_MSG (MSG_AUD_MFE_RST_PREPROC)
443#define AUD_MFE_RST_MSG_NUM (MSG_GET_SUBTYPE(LAST_AUD_MFE_RST_MSG) + 1)
444
445/************************************************************************
446 *
447 * MSG_CAT_AUD_SYN: Synthesizer Command/Result(bi-directional)
448 *
449 * D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
450 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
451 * |REQ|USER_AUDIO |MSG_CAT_AUD_SYN| MSG_SUB_TYPE | MSG_PARAM |
452 * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
453 *
454 ************************************************************************
455 */
456#define MSG_AUD_SYN_REQ (MSG_TYPE_AUD_REQ | MSG_CAT_AUD_SYN)
457#define MSG_AUD_SYN_RES (MSG_TYPE_AUD_RES | MSG_CAT_AUD_SYN)
458
459#define MSG_AUD_SYN_CMD_ACT (MSG_AUD_SYN_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_ACT))
460#define MSG_AUD_SYN_CMD_DEACT (MSG_AUD_SYN_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_DEACT))
461#define MSG_AUD_SYN_CMD_INIT (MSG_AUD_SYN_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_INIT))
462#define MSG_AUD_SYN_CMD_START (MSG_AUD_SYN_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_START))
463#define MSG_AUD_SYN_CMD_STOP (MSG_AUD_SYN_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_STOP))
464/* This object do not need "execute" */
465#define MSG_AUD_SYN_CMD_SET (MSG_AUD_SYN_REQ | MSG_SET_SUBTYPE(MSG_OBJ_SUBTYPE_SET))
466
467#define LAST_AUD_SYN_MSG (MSG_AUD_SYN_CMD_SET + 1)
468#define AUD_SYN_MSG_NUM (LAST_AUD_SYN_MSG & MSG_TYPE_SUBTYPE)
469
470#define MSG_AUD_SYN_CMD_NEXT_REQ (MSG_AUD_SYN_RES | MSG_SET_SUBTYPE(0x00))
471#define MSG_AUD_SYN_CMD_DONE (MSG_AUD_SYN_RES | MSG_SET_SUBTYPE(0x01))
472#define MSG_AUD_SYN_CMD_SET_DONE (MSG_AUD_SYN_RES | MSG_SET_SUBTYPE(0x02))
473
474#define LAST_AUD_SYN_RST_MSG (MSG_AUD_SYN_CMD_SET_DONE + 1)
475#define AUD_SYN_RST_MSG_NUM (LAST_AUD_SYN_RST_MSG & MSG_TYPE_SUBTYPE)
476
477
478
479/************************************************************************
480 *
481 * responce from AudioSubSystem
482 *
483 ************************************************************************
484 */
485
486#define MSG_AUD_MGR_RST (MSG_TYPE_AUD_RES)
487#define MSG_AUD_MGR_FIND_TRIGGER (MSG_AUD_RCG_FIND_TRIGGER)
488#define MSG_AUD_MGR_FIND_COMMAND (MSG_AUD_RCG_FIND_COMMAND)
489
490/****************************************************************************
491 * Public Types
492 ****************************************************************************/
493
494/****************************************************************************
495 * Public Data
496 ****************************************************************************/
497
498/****************************************************************************
499 * Inline Functions
500 ****************************************************************************/
501
502/****************************************************************************
503 * Public Function Prototypes
504 ****************************************************************************/
505
506#endif /* __MODULES_INCLUDE_AUDIO_AUDIO_MESSAGE_TYPE_H */