Developer World
Spresense SDK Library v1.4.2-3df2e9d
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_INITMPP (AUDCMD_CATEGORY_EFFECTOR | 0x04)
132 
135 #define AUDCMD_SETMPPPARAM (AUDCMD_CATEGORY_EFFECTOR | 0x05)
136 
144 #define AUDRLT_INIT_MICFRONTEND AUDCMD_INIT_MICFRONTEND
145 
148 #define AUDRLT_INIT_PREPROCESS_DSP_CMPLT AUDCMD_INIT_PREPROCESS_DSP
149 
152 #define AUDRLT_SET_PREPROCESS_DSP_CMPLT AUDCMD_SET_PREPROCESS_DSP
153 
156 #define AUDRLT_INITMPPCMPLT AUDCMD_INITMPP
157 
160 #define AUDRLT_SETMPPCMPLT AUDCMD_SETMPPPARAM
161 
164 /*--------------------------------------------------------------------------*/
165 /*--- Player Function Code -------------------------------------------------*/
166 /*--------------------------------------------------------------------------*/
167 
173 #define AUDCMD_INITPLAYER (AUDCMD_CATEGORY_PLAYER | 0x01)
174 
177 #define AUDCMD_PLAYPLAYER (AUDCMD_CATEGORY_PLAYER | 0x02)
178 
181 #define AUDCMD_STOPPLAYER (AUDCMD_CATEGORY_PLAYER | 0x03)
182 
185 #define AUDCMD_CLKRECOVERY (AUDCMD_CATEGORY_PLAYER | 0x04)
186 
189 #define AUDCMD_SETGAIN (AUDCMD_CATEGORY_PLAYER | 0x05)
190 
198 #define AUDRLT_INITPLAYERCMPLT AUDCMD_INITPLAYER
199 
202 #define AUDRLT_PLAYCMPLT AUDCMD_PLAYPLAYER
203 
206 #define AUDRLT_STOPCMPLT AUDCMD_STOPPLAYER
207 
210 #define AUDRLT_CLKRECOVERY_CMPLT AUDCMD_CLKRECOVERY
211 
214 #define AUDRLT_SETGAIN_CMPLT AUDCMD_SETGAIN
215 
218 #define AUDRLT_SENDPFCMD_CMPLT AUDCMD_SENDPOSTCMD
219 
222 /*--------------------------------------------------------------------------*/
223 /*--- Recorder Function Code -----------------------------------------------*/
224 /*--------------------------------------------------------------------------*/
225 
231 #define AUDCMD_INITREC (AUDCMD_CATEGORY_RECORDER | 0x01)
232 
235 #define AUDCMD_STARTREC (AUDCMD_CATEGORY_RECORDER | 0x02)
236 
239 #define AUDCMD_STOPREC (AUDCMD_CATEGORY_RECORDER | 0x03)
240 
248 #define AUDRLT_RECCMPLT AUDCMD_STARTREC
249 
252 #define AUDRLT_STOPRECCMPLT AUDCMD_STOPREC
253 
256 #define AUDRLT_INITRECCMPLT AUDCMD_INITREC
257 
260 /*--------------------------------------------------------------------------*/
261 /*--- Recognition Function Code --------------------------------------------*/
262 /*--------------------------------------------------------------------------*/
263 
269 #define AUDCMD_START_RECOGNIZER (AUDCMD_CATEGORY_RECOGNITION | 0x01)
270 
273 #define AUDCMD_STOP_RECOGNIZER (AUDCMD_CATEGORY_RECOGNITION | 0x02)
274 
277 #define AUDCMD_INIT_RECOGNIZER (AUDCMD_CATEGORY_RECOGNITION | 0x03)
278 
281 #define AUDCMD_INIT_RECOGNIZER_DSP (AUDCMD_CATEGORY_RECOGNITION | 0x04)
282 
285 #define AUDCMD_SET_RECOGNIZER_DSP (AUDCMD_CATEGORY_RECOGNITION | 0x05)
286 
289 /* result code */
290 
296 #define AUDRLT_START_RECOGNIZER_CMPLT AUDCMD_START_RECOGNIZER
297 
300 #define AUDRLT_STOP_RECOGNIZER_CMPLT AUDCMD_STOP_RECOGNIZER
301 
304 #define AUDRLT_INIT_RECOGNIZER_CMPLT AUDCMD_INIT_RECOGNIZER
305 
308 #define AUDRLT_INIT_RECOGNIZER_DSP_CMPLT AUDCMD_INIT_RECOGNIZER_DSP
309 
312 #define AUDRLT_SET_RECOGNIZER_DSP_CMPLT AUDCMD_SET_RECOGNIZER_DSP
313 
316 /*--------------------------------------------------------------------------*/
317 /*--- Baseband Function Code -----------------------------------------------*/
318 /*--------------------------------------------------------------------------*/
319 
327 #define AUDCMD_STARTBB (AUDCMD_CATEGORY_BASEBAND | 0x01)
328 
333 #define AUDCMD_STOPBB (AUDCMD_CATEGORY_BASEBAND | 0x02)
334 
337 #define AUDCMD_INITMICGAIN (AUDCMD_CATEGORY_BASEBAND | 0x03)
338 
343 #define AUDCMD_INITI2SPARAM (AUDCMD_CATEGORY_BASEBAND | 0x04)
344 
349 #define AUDCMD_INITDEQPARAM (AUDCMD_CATEGORY_BASEBAND | 0x05)
350 
353 #define AUDCMD_INITOUTPUTSELECT (AUDCMD_CATEGORY_BASEBAND | 0x06)
354 
359 #define AUDCMD_INITDNCPARAM (AUDCMD_CATEGORY_BASEBAND | 0x07)
360 
365 #define AUDCMD_INITCLEARSTEREO (AUDCMD_CATEGORY_BASEBAND | 0x08)
366 
369 #define AUDCMD_SETVOLUME (AUDCMD_CATEGORY_BASEBAND | 0x09)
370 
373 #define AUDCMD_SETVOLUMEMUTE (AUDCMD_CATEGORY_BASEBAND | 0x0a)
374 
377 #define AUDCMD_SETBEEPPARAM (AUDCMD_CATEGORY_BASEBAND | 0x0b)
378 
381 #define AUDCMD_SETRENDERINGCLK (AUDCMD_CATEGORY_BASEBAND | 0x0c)
382 
385 #define AUDCMD_SETSPDRVMODE (AUDCMD_CATEGORY_BASEBAND | 0x0d)
386 
389 #define AUDCMD_SETMICMAP (AUDCMD_CATEGORY_BASEBAND | 0x0e)
390 
400 #define AUDRLT_STARTBBCMPLT AUDCMD_STARTBB
401 
406 #define AUDRLT_STOPBBCMPLT AUDCMD_STOPBB
407 
410 #define AUDRLT_INITMICGAINCMPLT AUDCMD_INITMICGAIN
411 
414 #define AUDRLT_SETMICMAPCMPLT AUDCMD_SETMICMAP
415 
420 #define AUDRLT_INITI2SPARAMCMPLT AUDCMD_INITI2SPARAM
421 
426 #define AUDRLT_INITDEQPARAMCMPLT AUDCMD_INITDEQPARAM
427 
430 #define AUDRLT_INITOUTPUTSELECTCMPLT AUDCMD_INITOUTPUTSELECT
431 
436 #define AUDRLT_INITDNCPARAMCMPLT AUDCMD_INITDNCPARAM
437 
442 #define AUDRLT_INITCLEARSTEREOCMPLT AUDCMD_INITCLEARSTEREO
443 
446 #define AUDRLT_SETVOLUMECMPLT AUDCMD_SETVOLUME
447 
450 #define AUDRLT_SETVOLUMEMUTECMPLT AUDCMD_SETVOLUMEMUTE
451 
454 #define AUDRLT_SETBEEPCMPLT AUDCMD_SETBEEPPARAM
455 
458 #define AUDRLT_SETRENDERINGCLKCMPLT AUDCMD_SETRENDERINGCLK
459 
462 #define AUDRLT_SETSPDRVMODECMPLT AUDCMD_SETSPDRVMODE
463 
466 /*--------------------------------------------------------------------------*/
467 /*--- Through Function Code ------------------------------------------------*/
468 /*--------------------------------------------------------------------------*/
469 
475 #define AUDCMD_SETTHROUGHPATH (AUDCMD_CATEGORY_THROUGH | 0x01)
476 
484 #define AUDRLT_SETTHROUGHPATHCMPLT AUDCMD_SETTHROUGHPATH
485 
488 /*--------------------------------------------------------------------------*/
489 /*--- Transition Function Code ---------------------------------------------*/
490 /*--------------------------------------------------------------------------*/
491 
497 #define AUDCMD_POWERON (AUDCMD_CATEGORY_TRANSITION | 0x01)
498 
501 #define AUDCMD_SETPOWEROFFSTATUS (AUDCMD_CATEGORY_TRANSITION | 0x02)
502 
507 #define AUDCMD_SETBASEBANDSTATUS (AUDCMD_CATEGORY_TRANSITION | 0x03)
508 
511 #define AUDCMD_SETPLAYERSTATUS (AUDCMD_CATEGORY_TRANSITION | 0x04)
512 
515 #define AUDCMD_SETRECORDERSTATUS (AUDCMD_CATEGORY_TRANSITION | 0x05)
516 
519 #define AUDCMD_SETREADYSTATUS (AUDCMD_CATEGORY_TRANSITION | 0x06)
520 
523 #define AUDCMD_SETTHROUGHSTATUS (AUDCMD_CATEGORY_TRANSITION | 0x07)
524 
527 #define AUDCMD_SETPLAYERSTATUSPOST (AUDCMD_CATEGORY_TRANSITION | 0x08)
528 
531 #define AUDCMD_SETRECOGNIZERSTATUS (AUDCMD_CATEGORY_TRANSITION | 0x09)
532 
540 #define AUDRLT_STATUSCHANGED (AUDCMD_CATEGORY_TRANSITION | 0x0f)
541 
544 /*--------------------------------------------------------------------------*/
545 /*--- Error Notification Code ----------------------------------------------*/
546 /*--------------------------------------------------------------------------*/
547 
553 #define AUDRLT_ERRORRESPONSE (AUDCMD_CATEGORY_ERRNOTIFY | 0x01)
554 
557 #define AUDRLT_ERRORATTENTION (AUDCMD_CATEGORY_ERRNOTIFY | 0x02)
558 
561 #endif /* __INCLUDE_AUDIO_AUDIO_COMMAND_ID_H */
562