Developer World
Spresense SDK Library v3.3.0-375c679
audio_command_id.h
Go to the documentation of this file.
1/****************************************************************************
2 * modules/include/audio/audio_command_id.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 __INCLUDE_AUDIO_AUDIO_COMMAND_ID_H
37#define __INCLUDE_AUDIO_AUDIO_COMMAND_ID_H
38
53/****************************************************************************
54 * Included Files
55 ****************************************************************************/
56
57
58/****************************************************************************
59 * Pre-processor Definitions
60 ****************************************************************************/
61
62/*--- Category Code --------------------------------------------------------*/
63
67#define AUDCMD_CATEGORY_GENERAL 0x00
68#define AUDCMD_CATEGORY_EFFECTOR 0x10
69#define AUDCMD_CATEGORY_PLAYER 0x20
70#define AUDCMD_CATEGORY_RECORDER 0x30
71#define AUDCMD_CATEGORY_RECOGNITION 0x40
72#define AUDCMD_CATEGORY_BASEBAND 0x50
73#define AUDCMD_CATEGORY_THROUGH 0x60
74#define AUDCMD_CATEGORY_TRANSITION 0x70
75
76#define AUDCMD_CATEGORY_ERRNOTIFY 0xF0
77
80/*--------------------------------------------------------------------------*/
81/*--- General Function Code ------------------------------------------------*/
82/*--------------------------------------------------------------------------*/
83
89#define AUDCMD_GETSTATUS (AUDCMD_CATEGORY_GENERAL | 0x01)
90
93#define AUDCMD_INITATTENTIONS (AUDCMD_CATEGORY_GENERAL | 0x02)
94
102#define AUDRLT_NOTIFYSTATUS AUDCMD_GETSTATUS
103
106#define AUDRLT_INITATTENTIONSCMPLT AUDCMD_INITATTENTIONS
107
110/*--------------------------------------------------------------------------*/
111/*--- Effector Function Code -----------------------------------------------*/
112/*--------------------------------------------------------------------------*/
113
119#define AUDCMD_INIT_MICFRONTEND (AUDCMD_CATEGORY_EFFECTOR | 0x01)
120
123#define AUDCMD_INIT_PREPROCESS_DSP (AUDCMD_CATEGORY_EFFECTOR | 0x02)
124
127#define AUDCMD_SET_PREPROCESS_DSP (AUDCMD_CATEGORY_EFFECTOR | 0x03)
128
131#define AUDCMD_INIT_OUTPUTMIXER (AUDCMD_CATEGORY_EFFECTOR | 0x04)
132
135#define AUDCMD_INITMPP (AUDCMD_CATEGORY_EFFECTOR | 0x05)
136
139#define AUDCMD_SETMPPPARAM (AUDCMD_CATEGORY_EFFECTOR | 0x06)
140
148#define AUDRLT_INIT_MICFRONTEND AUDCMD_INIT_MICFRONTEND
149
152#define AUDRLT_INIT_PREPROCESS_DSP_CMPLT AUDCMD_INIT_PREPROCESS_DSP
153
156#define AUDRLT_SET_PREPROCESS_DSP_CMPLT AUDCMD_SET_PREPROCESS_DSP
157
160#define AUDRLT_INIT_OUTPUTMIXER_CMPLT AUDCMD_INIT_OUTPUTMIXER
161
164#define AUDRLT_INITMPPCMPLT AUDCMD_INITMPP
165
168#define AUDRLT_SETMPPCMPLT AUDCMD_SETMPPPARAM
169
172/*--------------------------------------------------------------------------*/
173/*--- Player Function Code -------------------------------------------------*/
174/*--------------------------------------------------------------------------*/
175
181#define AUDCMD_INITPLAYER (AUDCMD_CATEGORY_PLAYER | 0x01)
182
185#define AUDCMD_PLAYPLAYER (AUDCMD_CATEGORY_PLAYER | 0x02)
186
189#define AUDCMD_STOPPLAYER (AUDCMD_CATEGORY_PLAYER | 0x03)
190
193#define AUDCMD_CLKRECOVERY (AUDCMD_CATEGORY_PLAYER | 0x04)
194
197#define AUDCMD_SETGAIN (AUDCMD_CATEGORY_PLAYER | 0x05)
198
206#define AUDRLT_INITPLAYERCMPLT AUDCMD_INITPLAYER
207
210#define AUDRLT_PLAYCMPLT AUDCMD_PLAYPLAYER
211
214#define AUDRLT_STOPCMPLT AUDCMD_STOPPLAYER
215
218#define AUDRLT_CLKRECOVERY_CMPLT AUDCMD_CLKRECOVERY
219
222#define AUDRLT_SETGAIN_CMPLT AUDCMD_SETGAIN
223
226#define AUDRLT_SENDPFCMD_CMPLT AUDCMD_SENDPOSTCMD
227
230/*--------------------------------------------------------------------------*/
231/*--- Recorder Function Code -----------------------------------------------*/
232/*--------------------------------------------------------------------------*/
233
239#define AUDCMD_INITREC (AUDCMD_CATEGORY_RECORDER | 0x01)
240
243#define AUDCMD_STARTREC (AUDCMD_CATEGORY_RECORDER | 0x02)
244
247#define AUDCMD_STOPREC (AUDCMD_CATEGORY_RECORDER | 0x03)
248
256#define AUDRLT_RECCMPLT AUDCMD_STARTREC
257
260#define AUDRLT_STOPRECCMPLT AUDCMD_STOPREC
261
264#define AUDRLT_INITRECCMPLT AUDCMD_INITREC
265
268/*--------------------------------------------------------------------------*/
269/*--- Recognition Function Code --------------------------------------------*/
270/*--------------------------------------------------------------------------*/
271
277#define AUDCMD_START_RECOGNIZER (AUDCMD_CATEGORY_RECOGNITION | 0x01)
278
281#define AUDCMD_STOP_RECOGNIZER (AUDCMD_CATEGORY_RECOGNITION | 0x02)
282
285#define AUDCMD_INIT_RECOGNIZER (AUDCMD_CATEGORY_RECOGNITION | 0x03)
286
289#define AUDCMD_INIT_RECOGNIZER_DSP (AUDCMD_CATEGORY_RECOGNITION | 0x04)
290
293#define AUDCMD_SET_RECOGNIZER_DSP (AUDCMD_CATEGORY_RECOGNITION | 0x05)
294
297/* result code */
298
304#define AUDRLT_START_RECOGNIZER_CMPLT AUDCMD_START_RECOGNIZER
305
308#define AUDRLT_STOP_RECOGNIZER_CMPLT AUDCMD_STOP_RECOGNIZER
309
312#define AUDRLT_INIT_RECOGNIZER_CMPLT AUDCMD_INIT_RECOGNIZER
313
316#define AUDRLT_INIT_RECOGNIZER_DSP_CMPLT AUDCMD_INIT_RECOGNIZER_DSP
317
320#define AUDRLT_SET_RECOGNIZER_DSP_CMPLT AUDCMD_SET_RECOGNIZER_DSP
321
324/*--------------------------------------------------------------------------*/
325/*--- Baseband Function Code -----------------------------------------------*/
326/*--------------------------------------------------------------------------*/
327
335#define AUDCMD_STARTBB (AUDCMD_CATEGORY_BASEBAND | 0x01)
336
341#define AUDCMD_STOPBB (AUDCMD_CATEGORY_BASEBAND | 0x02)
342
345#define AUDCMD_INITMICGAIN (AUDCMD_CATEGORY_BASEBAND | 0x03)
346
351#define AUDCMD_INITI2SPARAM (AUDCMD_CATEGORY_BASEBAND | 0x04)
352
357#define AUDCMD_INITDEQPARAM (AUDCMD_CATEGORY_BASEBAND | 0x05)
358
361#define AUDCMD_INITOUTPUTSELECT (AUDCMD_CATEGORY_BASEBAND | 0x06)
362
367#define AUDCMD_INITDNCPARAM (AUDCMD_CATEGORY_BASEBAND | 0x07)
368
373#define AUDCMD_INITCLEARSTEREO (AUDCMD_CATEGORY_BASEBAND | 0x08)
374
377#define AUDCMD_SETVOLUME (AUDCMD_CATEGORY_BASEBAND | 0x09)
378
381#define AUDCMD_SETVOLUMEMUTE (AUDCMD_CATEGORY_BASEBAND | 0x0a)
382
385#define AUDCMD_SETBEEPPARAM (AUDCMD_CATEGORY_BASEBAND | 0x0b)
386
389#define AUDCMD_SETRENDERINGCLK (AUDCMD_CATEGORY_BASEBAND | 0x0c)
390
393#define AUDCMD_INITSPDRVMODE (AUDCMD_CATEGORY_BASEBAND | 0x0d)
394#define AUDCMD_SETSPDRVMODE (AUDCMD_INITSPDRVMODE) /* old command name */
395
398#define AUDCMD_SETMICMAP (AUDCMD_CATEGORY_BASEBAND | 0x0e)
399
409#define AUDRLT_STARTBBCMPLT AUDCMD_STARTBB
410
415#define AUDRLT_STOPBBCMPLT AUDCMD_STOPBB
416
419#define AUDRLT_INITMICGAINCMPLT AUDCMD_INITMICGAIN
420
423#define AUDRLT_SETMICMAPCMPLT AUDCMD_SETMICMAP
424
429#define AUDRLT_INITI2SPARAMCMPLT AUDCMD_INITI2SPARAM
430
435#define AUDRLT_INITDEQPARAMCMPLT AUDCMD_INITDEQPARAM
436
439#define AUDRLT_INITOUTPUTSELECTCMPLT AUDCMD_INITOUTPUTSELECT
440
445#define AUDRLT_INITDNCPARAMCMPLT AUDCMD_INITDNCPARAM
446
451#define AUDRLT_INITCLEARSTEREOCMPLT AUDCMD_INITCLEARSTEREO
452
455#define AUDRLT_SETVOLUMECMPLT AUDCMD_SETVOLUME
456
459#define AUDRLT_SETVOLUMEMUTECMPLT AUDCMD_SETVOLUMEMUTE
460
463#define AUDRLT_SETBEEPCMPLT AUDCMD_SETBEEPPARAM
464
467#define AUDRLT_SETRENDERINGCLKCMPLT AUDCMD_SETRENDERINGCLK
468
471#define AUDRLT_INITSPDRVMODECMPLT AUDCMD_INITSPDRVMODE
472#define AUDRLT_SETSPDRVMODECMPLT AUDRLT_INITSPDRVMODECMPLT /* old result code */
473
476/*--------------------------------------------------------------------------*/
477/*--- Through Function Code ------------------------------------------------*/
478/*--------------------------------------------------------------------------*/
479
485#define AUDCMD_SETTHROUGHPATH (AUDCMD_CATEGORY_THROUGH | 0x01)
486
494#define AUDRLT_SETTHROUGHPATHCMPLT AUDCMD_SETTHROUGHPATH
495
498/*--------------------------------------------------------------------------*/
499/*--- Transition Function Code ---------------------------------------------*/
500/*--------------------------------------------------------------------------*/
501
507#define AUDCMD_POWERON (AUDCMD_CATEGORY_TRANSITION | 0x01)
508
511#define AUDCMD_SETPOWEROFFSTATUS (AUDCMD_CATEGORY_TRANSITION | 0x02)
512
517#define AUDCMD_SETBASEBANDSTATUS (AUDCMD_CATEGORY_TRANSITION | 0x03)
518
521#define AUDCMD_SETPLAYERSTATUS (AUDCMD_CATEGORY_TRANSITION | 0x04)
522
525#define AUDCMD_SETRECORDERSTATUS (AUDCMD_CATEGORY_TRANSITION | 0x05)
526
529#define AUDCMD_SETREADYSTATUS (AUDCMD_CATEGORY_TRANSITION | 0x06)
530
533#define AUDCMD_SETTHROUGHSTATUS (AUDCMD_CATEGORY_TRANSITION | 0x07)
534
537#define AUDCMD_SETPLAYERSTATUSPOST (AUDCMD_CATEGORY_TRANSITION | 0x08)
538
541#define AUDCMD_SETRECOGNIZERSTATUS (AUDCMD_CATEGORY_TRANSITION | 0x09)
542
550#define AUDRLT_STATUSCHANGED (AUDCMD_CATEGORY_TRANSITION | 0x0f)
551
554/*--------------------------------------------------------------------------*/
555/*--- Error Notification Code ----------------------------------------------*/
556/*--------------------------------------------------------------------------*/
557
563#define AUDRLT_ERRORRESPONSE (AUDCMD_CATEGORY_ERRNOTIFY | 0x01)
564
567#define AUDRLT_ERRORATTENTION (AUDCMD_CATEGORY_ERRNOTIFY | 0x02)
568
571#endif /* __INCLUDE_AUDIO_AUDIO_COMMAND_ID_H */
572