Developer World
Spresense SDK Library v2.3.0-e949ae4
audio_high_level_api.h
Go to the documentation of this file.
1 /****************************************************************************
2  * modules/include/audio/audio_high_level_api.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_HIGH_LEVEL_API_H
37 #define __MODULES_INCLUDE_AUDIO_AUDIO_HIGH_LEVEL_API_H
38 
44 /* API Documents creater with Doxgen */
45 
55 /****************************************************************************
56  * Included Files
57  ****************************************************************************/
58 
59 #include <sdk/config.h>
60 
61 #include "audio/audio_command_id.h"
63 #ifdef CONFIG_AUDIOUTILS_PLAYER
64 # include "audio/audio_player_api.h"
67 #endif
68 #ifdef CONFIG_AUDIOUTILS_RECORDER
71 # include "audio/audio_capture_api.h"
72 #endif
73 #ifdef CONFIG_AUDIOUTILS_SOUND_RECOGNIZER
77 # include "audio/audio_capture_api.h"
78 #endif
79 #ifdef CONFIG_AUDIOUTILS_SYNTHESIZER
80 # include "audio/audio_player_api.h"
84 #endif
85 
86 #include <stdint.h>
87 #include <stdbool.h>
88 
89 /****************************************************************************
90  * Pre-processor Definitions
91  ****************************************************************************/
92 
98 #define LENGTH_AUDRLT 2
99 
102 #define LENGTH_AUDRLT_ERRORRESPONSE_MAX 8
103 
106 #define LENGTH_AUDRLT_ERRORRESPONSE_MIN 5
107 
115 #define LENGTH_GETSTATUS 2
116 
119 #define LENGTH_SET_PLAYER_STATUS 6
120 
123 #define LENGTH_SET_RECORDER_STATUS 4
124 
127 #define LENGTH_SET_RECOGNIZER_STATUS 4
128 
131 #define LENGTH_SET_BASEBAND_STATUS 9
132 
135 #define LENGTH_SET_THROUGH_STATUS 3
136 
139 #define LENGTH_SET_READY_STATUS 2
140 
143 #define LENGTH_POWERON 2
144 
147 #define LENGTH_SET_POWEROFF_STATUS 2
148 
151 #define LENGTH_SETMICMAP 4
152 
155 #define LENGTH_INITMICGAIN 5
156 
159 #define LENGTH_INITI2SPARAM 3
160 
163 #define LENGTH_INITDEQPARAM 8
164 
167 #define LENGTH_INITOUTPUTSELECT 2
168 
171 #define LENGTH_INITDNCPARAM 2
172 
175 #define LENGTH_INITCLEARSTEREO 2
176 
179 #define LENGTH_SETVOLUME 3
180 
183 #define LENGTH_SETVOLUMEMUTE 2
184 
187 #define LENGTH_SETBEEPPARAM 3
188 
191 #define LENGTH_SETRENDERINGCLK 2
192 
195 #define LENGTH_INIT_SOUNDEFFECT 3
196 
199 #define LENGTH_START_SOUNDEFFECT 2
200 
203 #define LENGTH_STOP_SOUNDEFFECT 2
204 
207 #define LENGTH_SET_THROUGH_PATH 4
208 
211 #define LENGTH_INITSPDRVMODE 2
212 #define LENGTH_SETSPDRVMODE LENGTH_INITSPDRVMODE /* old command name */
213 
221 #define AS_ECODE_OK 0x00
222 
225 #define AS_ECODE_STATE_VIOLATION 0x01
226 
229 #define AS_ECODE_PACKET_LENGTH_ERROR 0x02
230 
233 #define AS_ECODE_COMMAND_CODE_ERROR 0x03
234 
237 #define AS_ECODE_COMMAND_NOT_SUPPOT 0x04
238 
241 #define AS_ECODE_AUDIO_POWER_ON_ERROR 0x05
242 
245 #define AS_ECODE_AUDIO_POWER_OFF_ERROR 0x06
246 
249 #define AS_ECODE_DSP_LOAD_ERROR 0x07
250 
253 #define AS_ECODE_DSP_UNLOAD_ERROR 0x08
254 
257 #define AS_ECODE_DSP_VERSION_ERROR 0x09
258 
261 #define AS_ECODE_DSP_EXEC_ERROR 0x3b
262 
265 #define AS_ECODE_DSP_STOP_ERROR 0x3c
266 
269 #define AS_ECODE_DSP_SET_ERROR 0x3d
270 
273 #define AS_ECODE_SET_AUDIO_DATA_PATH_ERROR 0x0A
274 
277 #define AS_ECODE_CLEAR_AUDIO_DATA_PATH_ERROR 0x0B
278 
281 #define AS_ECODE_NOT_AUDIO_DATA_PATH 0x0C
282 
285 #define AS_ECODE_DECODER_LIB_INITIALIZE_ERROR 0x0D
286 
289 #define AS_ECODE_ENCODER_LIB_INITIALIZE_ERROR 0x0E
290 
293 #define AS_ECODE_FILTER_LIB_INITIALIZE_ERROR 0x0F
294 
297 #define AS_ECODE_DUMP_INITIALIZE_ERROR 0x10
298 
301 #define AS_ECODE_COMMAND_PARAM_CODEC_TYPE 0x11
302 
305 #define AS_ECODE_COMMAND_PARAM_AREA_INSUFFICIENT 0x12
306 
309 #define AS_ECODE_COMMAND_PARAM_CHANNEL_NUMBER 0x13
310 
313 #define AS_ECODE_COMMAND_PARAM_SAMPLING_RATE 0x14
314 
317 #define AS_ECODE_COMMAND_PARAM_BIT_RATE 0x15
318 
321 #define AS_ECODE_COMMAND_PARAM_BIT_LENGTH 0x16
322 
325 #define AS_ECODE_COMMAND_PARAM_COMPLEXITY 0x17
326 
329 #define AS_ECODE_COMMAND_PARAM_ACTIVE_PLAYER 0x18
330 
333 #define AS_ECODE_COMMAND_PARAM_INPUT_DEVICE 0x19
334 
337 #define AS_ECODE_COMMAND_PARAM_OUTPUT_DEVICE 0x1A
338 
341 #define AS_ECODE_COMMAND_PARAM_INPUT_HANDLER 0x1B
342 
345 #define AS_ECODE_COMMAND_PARAM_OUTPUT_HANDLER 0x1C
346 
349 #define AS_ECODE_COMMAND_PARAM_CALLBACK 0x1D
350 
353 #define AS_ECODE_COMMAND_PARAM_FUNCTION_ENABLE 0x1E
354 
357 #define AS_ECODE_COMMAND_PARAM_CONFIG_TABLE 0x1F
358 
361 #define AS_ECODE_COMMAND_PARAM_WITH_MFE 0x20
362 
365 #define AS_ECODE_COMMAND_PARAM_WITH_MPP 0x21
366 
369 #define AS_ECODE_COMMAND_PARAM_OUTPUT_DATE 0x22
370 
373 #define AS_ECODE_COMMAND_PARAM_SELECT_MIC 0x23
374 
377 #define AS_ECODE_COMMAND_PARAM_MIC_GAIN 0x24
378 
381 #define AS_ECODE_COMMAND_PARAM_I2S_ID 0x25
382 
385 #define AS_ECODE_COMMAND_PARAM_BYPASS_MODE 0x26
386 
389 #define AS_ECODE_COMMAND_PARAM_VOLLUME 0x27
390 
393 #define AS_ECODE_COMMAND_PARAM_INPUT_DB 0x28
394 
397 #define AS_ECODE_COMMAND_PARAM_MASTER_DB 0x29
398 
401 #define AS_ECODE_COMMAND_PARAM_BEEP_FREQ 0x2A
402 
405 #define AS_ECODE_DMAC_INITIALIZE_ERROR 0x2B
406 
409 #define AS_ECODE_DMAC_READ_ERROR 0x2C
410 
413 #define AS_ECODE_DMAC_WRITE_ERROR 0x2D
414 
417 #define AS_ECODE_CHECK_MEMORY_POOL_ERROR 0x2E
418 
421 #define AS_ECODE_SIMPLE_FIFO_UNDERFLOW 0x2F
422 
425 #define AS_ECODE_SET_MIC_GAIN_ERROR 0x30
426 
429 #define AS_ECODE_SET_I2S_PARAM_ERROR 0x31
430 
433 #define AS_ECODE_SET_OUTPUT_SELECT_ERROR 0x32
434 
437 #define AS_ECODE_INIT_CLEAR_STEREO_ERROR 0x33
438 
441 #define AS_ECODE_SET_VOLUME_ERROR 0x34
442 
445 #define AS_ECODE_SET_VOLUME_MUTE_ERROR 0x35
446 
449 #define AS_ECODE_SET_BEEP_ERROR 0x36
450 
453 #define AS_ECODE_QUEUE_OPERATION_ERROR 0x37
454 
457 #define AS_ECODE_INTERNAL_COMMAND_CODE_ERROR 0x38
458 
461 #define AS_ECODE_COMMAND_PARAM_RENDERINGCLK 0x39
462 
465 #define AS_ECODE_SET_RENDERINGCLK_ERROR 0x3A
466 
469 #define AS_ECODE_COMMAND_PARAM_INITSPDRVMODE 0x3B
470 #define AS_ECODE_COMMAND_PARAM_SETSPDRVMODE AS_ECODE_COMMAND_PARAM_INITSPDRVMODE
471 
474 #define AS_ECODE_SET_MICMAP_ERROR 0x3D
475 
478 #define AS_ECODE_OBJECT_NOT_AVAILABLE_ERROR 0x3E
479 
482 #define AS_ECODE_OSCILLATOR_LIB_INITIALIZE_ERROR 0x3F
483 
486 /****************************************************************************
487  * Public Types
488  ****************************************************************************/
489 
492 typedef struct
493 {
496  uint8_t reserved;
497 
500  uint8_t sub_code;
501 
504  uint8_t command_code;
505 
508  uint8_t packet_length;
510 
513 typedef struct
514 {
517  uint8_t instance_id;
518 
521  uint8_t sub_code;
522 
525  uint8_t result_code;
526 
529  uint8_t packet_length;
531 
534 typedef struct
535 {
557  uint8_t mic_map[AS_MIC_CHANNEL_MAX];
558 
560 
563 typedef struct
564 {
571  int16_t mic_gain[AS_MIC_CHANNEL_MAX];
573 
576 typedef enum
577 {
578  AS_I2S1,
579  AS_I2S2
580 } AsI2sId;
581 
582 typedef enum
583 {
584  AS_I2S_BYPASS_MODE_DISABLE,
585  AS_I2S_BYPASS_MODE_ENABLE
586 } AsI2SBypassMode;
587 
588 typedef struct
589 {
594  uint8_t i2s_id;
595 
601  uint8_t bypass_mode_en;
602  uint16_t reserved2;
603 
606  uint32_t rate;
607 } InitI2SParam;
608 
611 typedef enum
612 {
616 
620 
624 } AsOutDevice;
625 
626 typedef struct
627 {
634  uint8_t reserved1;
635  uint16_t reserved2;
637 
642 typedef enum
643 {
644  AS_DNC_MODE_A,
645  AS_DNC_MODE_B,
646  AS_DNC_MODE_C
647 } AsDncMode;
648 
649 typedef struct
650 {
656  uint8_t mode;
657  uint8_t reserved1;
658  uint16_t reserved2;
659 } InitDNCParam;
660 
663 typedef struct {
666  uint8_t cs_en;
667  uint8_t reserved1;
668 
675  int16_t cs_vol;
677 
680 typedef struct
681 {
688  int16_t master_db;
689  uint16_t reserved1;
690 
697  int16_t input1_db;
698 
705  int16_t input2_db;
707 
710 typedef struct
711 {
717  uint8_t master_mute;
718 
721  uint8_t input1_mute;
722 
725  uint8_t input2_mute;
726  uint8_t reserved1;
728 
731 typedef struct
732 {
738  uint8_t beep_en;
739  uint8_t reserved1;
740  uint16_t reserved2;
741 
748  int16_t beep_vol;
749 
756  uint16_t beep_freq;
757 } SetBeepParam;
758 
761 typedef struct
762 {
769  uint8_t reserved1;
770  uint8_t reserved2;
771  uint8_t reserved3;
772 } PowerOnParam;
773 
776 typedef struct
777 {
783  uint8_t clk_mode;
784  uint8_t reserved1;
785  uint8_t reserved2;
786  uint8_t reserved3;
788 
791 typedef struct
792 {
798  uint8_t mode;
799  uint8_t reserved1;
800  uint8_t reserved2;
801  uint8_t reserved3;
803 
804 #define SetSpDrvModeParam InitSpDrvModeParam /* old command name */
805 
808 typedef enum
809 {
810  AS_CLKMODE_NORMAL,
811  AS_CLKMODE_HIRES
812 } AsClkMode;
813 
816 typedef enum
817 {
821 
827  AS_SOUNDEFFECT_NUM
829 
832 typedef enum
833 {
837 
841  AS_STARTSOUNDEFFECT_MODE_NUM
843 
846 typedef enum
847 {
848  AS_THROUGH_PATH_IN_MIC = 0,
849  AS_THROUGH_PATH_IN_I2S1,
850  AS_THROUGH_PATH_IN_I2S2,
851  AS_THROUGH_PATH_IN_MIXER,
852  AS_THROUGH_PATH_IN_NUM
854 
857 typedef enum
858 {
859  AS_THROUGH_PATH_OUT_MIXER1 = 0,
860  AS_THROUGH_PATH_OUT_MIXER2,
861  AS_THROUGH_PATH_OUT_I2S1,
862  AS_THROUGH_PATH_OUT_I2S2,
863  AS_THROUGH_PATH_OUT_NUM
865 
868 typedef enum
869 {
870  AS_SP_DRV_MODE_LINEOUT = 0,
871  AS_SP_DRV_MODE_1DRIVER,
872  AS_SP_DRV_MODE_2DRIVER,
873  AS_SP_DRV_MODE_4DRIVER,
874  AS_SP_DRV_MODE_NUM
875 } AsSpDrvMode;
876 
879 typedef struct
880 {
886  bool en;
887 
893  uint8_t in;
894 
900  uint8_t out;
901 
902 } AsThroughPath;
903 
906 typedef struct
907 {
911 
915 
917 
918 #ifdef AS_FEATURE_OUTPUTMIX_ENABLE
919 
920 /* Init OutputMixer Command (#AUDCMD_INIT_OUTPUTMIXER) */
921 
922 typedef struct
923 {
924  uint8_t player_id;
925 
928  uint8_t postproc_type;
929 
933 
935 
938 typedef struct
939 {
942  uint8_t player_id;
943 
944  int8_t direction;
945 
946  uint32_t times;
947 
949 
952 typedef struct
953 {
954  uint8_t player_id;
955 
956  AsInitPostProc initpp_param;
957 
959 
962 typedef struct
963 {
964  uint8_t player_id;
965 
966  AsSetPostProc setpp_param;
967 
969 
970 #endif
971 
972 #ifdef AS_FEATURE_FRONTEND_ENABLE
973 
974 typedef enum
975 {
980 
985 
987 
990 typedef struct
991 {
995  uint8_t ch_num;
996 
1000  uint8_t bit_length;
1001 
1005  uint16_t samples;
1006 
1012  uint32_t out_fs;
1013 
1019  uint8_t preproc_type;
1020 
1024  char preprocess_dsp_path[AS_PREPROCESS_FILE_PATH_LEN];
1025 
1031  uint8_t data_dest;
1032 
1034 
1035 #endif
1036 
1037 #ifdef AS_FEATURE_RECOGNIZER_ENABLE
1038 
1041 typedef struct
1042 {
1048  uint8_t input_device;
1049 
1050 } AsSetRecognizerStatus;
1051 
1054 typedef void (*RecognizerFindCallback)(AsRecognitionInfo info);
1055 
1056 typedef struct
1057 {
1061  uint8_t recognizer_type;
1062 
1066  char recognizer_dsp_path[AS_RECOGNIZER_FILE_PATH_LEN];
1067 
1070  RecognizerFindCallback fcb;
1071 
1072 } AsInitRecognizer;
1073 
1076 typedef struct
1077 {
1078  uint32_t reserve;
1079 
1080 } AsStartRecognizer;
1081 
1084 typedef struct
1085 {
1086  uint32_t reserve;
1087 
1088 } AsStopRecognizer;
1089 #endif /* AS_FEATURE_RECOGNIZER_ENABLE */
1090 
1093 #if defined(__CC_ARM)
1094 #pragma anon_unions
1095 #endif
1096 
1097 typedef struct
1098 {
1102  union
1103  {
1104 #ifdef AS_FEATURE_EFFECTOR_ENABLE
1105 
1110  StartBBParam start_bb_param;
1111 
1117  StopBBParam stop_bb_param;
1118 
1124  SetBaseBandStatusParam set_baseband_status_param;
1125 #endif
1126 #ifdef AS_FEATURE_PLAYER_ENABLE
1127 
1131  SetPlayerStsParam set_player_sts_param;
1132 
1136  PlayerCommand player;
1137 
1138 #endif
1139 #ifdef AS_FEATURE_OUTPUTMIX_ENABLE
1140 
1145 
1151 
1157 
1163 
1164 #endif
1165 #ifdef AS_FEATURE_FRONTEND_ENABLE
1166 
1172 
1178 
1184 
1185 #endif
1186 #ifdef AS_FEATURE_RECORDER_ENABLE
1187 
1192  AsActivateRecorderParam set_recorder_status_param;
1193 
1197  RecorderCommand recorder;
1198 
1199 #endif
1200 #ifdef AS_FEATURE_RECOGNIZER_ENABLE
1201 
1206  AsSetRecognizerStatus set_recognizer_status_param;
1207 
1212  AsInitRecognizer init_recognizer;
1213 
1218  AsStartRecognizer start_recognizer;
1219 
1224  AsStopRecognizer stop_recognizer;
1225 
1230  AsInitRecognizerProcParam init_rcg_param;
1231 
1236  AsSetRecognizerProcParam set_rcg_param;
1237 
1238 #endif
1239 
1245 
1251 
1258 
1264 
1271 
1278 
1284 
1290 
1296 
1302 
1308 
1314 
1320  SetSpDrvModeParam set_sp_drv_mode;
1321  };
1322 
1323 #ifdef __cplusplus
1324  uint8_t getCode(void)
1325  {
1326  return header.command_code;
1327  }
1328  bool isStateChange(void)
1329  {
1330  return ((getCode() & 0x40) != 0);
1331  }
1332 #endif
1333 
1334 #if !defined(__CC_ARM)
1335 } AudioCommand ;
1336 #else
1337 } AudioCommand __attribute__((transparent_union));
1338 #endif
1339 
1340 
1341 /* Result Structures */
1342 
1343 /* NotifyStatus */
1344 
1347 typedef enum
1348 {
1352 
1356 
1360 
1364 
1368 
1372 
1376 
1377  AS_MNG_STATUS_NUM
1378 } AsMngStatus;
1379 
1382 typedef enum
1383 {
1387 
1391 
1395 
1399 
1403 
1407 
1411 
1415 
1419 
1423 
1427  AS_MNG_SUB_STATUS_NUM
1428 } AsMngSubStatus;
1429 
1434 typedef enum
1435 {
1439 
1443  AS_VAD_STATUS_NUM
1444 } AsVadStatus;
1445 
1448 typedef enum
1449 {
1453 
1457 
1461 
1465 
1469 
1473 
1474  AS_STATUS_CHANGED_STS_NUM
1476 
1477 
1478 
1481 typedef enum
1482 {
1486 
1490 
1494 } AsErrorCode_e;
1495 
1498 typedef enum
1499 {
1503 
1507 
1511  AS_VOLUMEMUTE_NUM
1512 } AsVolumeMute;
1513 
1516 typedef enum
1517 {
1521 
1525  AS_BEEPEN_NUM
1526 } asBeepEn;
1527 
1530 typedef struct
1531 {
1537  uint8_t vad_status;
1538 
1541  uint8_t reserved;
1542 
1549 
1555  uint8_t status_info;
1556 } NotifyStatus;
1557 
1560 typedef struct
1561 {
1568 
1571  uint8_t reserved1;
1572 
1575  uint8_t reserved2;
1576 
1579  uint8_t reserved3;
1581 
1584 typedef struct
1585 {
1588  uint32_t error_code;
1589 
1592  uint16_t reserved1;
1593 
1596  uint8_t sub_module_id;
1597 
1600  uint8_t module_id;
1601 
1604  uint32_t error_sub_code;
1605 
1608  uint32_t reserved2;
1609 
1614 
1617 #if defined(__CC_ARM)
1618 #pragma anon_unions
1619 #endif
1620 
1621 typedef struct {
1625 
1626  union
1627  {
1633 
1639 
1645  };
1646 
1647 #if !defined(__CC_ARM)
1648 } AudioResult ;
1649 #else
1650 } AudioResult __attribute__((transparent_union));
1651 #endif
1652 
1653 /* Error Code */
1654 /* [T.B.D]
1655  *
1656  * no error = 0
1657  * state error
1658  * paramater error
1659  * timeout
1660  *
1661  */
1662 
1665 typedef struct
1666 {
1669  uint8_t app;
1670 
1673  uint8_t mng;
1674 
1677  uint8_t player_main;
1678 
1681  uint8_t player_sub;
1682 
1685  uint8_t micfrontend;
1686 
1689  uint8_t recorder;
1690 
1693  uint8_t mixer;
1694 
1697  uint8_t effector;
1698 
1701  uint8_t recognizer;
1703 
1704 /****************************************************************************
1705  * Public Data
1706  ****************************************************************************/
1707 
1708 /****************************************************************************
1709  * Inline Functions
1710  ****************************************************************************/
1711 
1712 /****************************************************************************
1713  * Public Function Prototypes
1714  ****************************************************************************/
1715 
1724 int AS_SendAudioCommand(AudioCommand* packet);
1725 
1734 int AS_ReceiveAudioResult(AudioResult* packet);
1735 
1750 int AS_ReceiveAudioResult(FAR AudioResult *packet, uint8_t id, uint32_t tmo);
1751 
1761 
1772 __attribute__((deprecated("\nDeprecated attention callback type is used. \
1773  \nPlease use \"AudioAttentionCb\" as callback type. \
1774  \n")))
1775 int AS_CreateAudioManager(AudioSubSystemIDs ids, obs_AudioAttentionCb obs_att_cb);
1776 
1783 int AS_DeleteAudioManager(void);
1784 
1787 #endif /* __MODULES_INCLUDE_AUDIO_AUDIO_HIGH_LEVEL_API_H */
1788 
Definition: audio_effector_api.h:450
uint8_t result_code
[out] result code
Definition: audio_high_level_api.h:525
RecorderReady.
Definition: audio_high_level_api.h:1402
to PowerOff
Definition: audio_high_level_api.h:1468
SetVolumeMuteParam set_volume_mute_param
[in] for SetVolumeMute (header.command_code==AUDCMD_SETVOLUMEMUTE)
Definition: audio_high_level_api.h:1289
Play effect sound infinitely.
Definition: audio_high_level_api.h:840
uint8_t instance_id
[out] instance id
Definition: audio_high_level_api.h:517
Definition: audio_high_level_api.h:680
SetBeepParam set_beep_param
[in] for SetBeep (header.command_code==AUDCMD_SETBEEPPARAM)
Definition: audio_high_level_api.h:1295
Definition: audio_frontend_api.h:293
int16_t master_db
[in] Set Master Volume
Definition: audio_high_level_api.h:688
AsStatusChangedSts
Definition: audio_high_level_api.h:1448
Definition: audio_high_level_api.h:534
uint8_t vad_status
VAD status.
Definition: audio_high_level_api.h:1537
int AS_CreateAudioManager(AudioSubSystemIDs ids, AudioAttentionCb att_cb)
Activate AudioSubSystem.
uint8_t command_code
[in] Command code
Definition: audio_high_level_api.h:504
CXD5602 Audio OutputMix API.
Out of voice section.
Definition: audio_high_level_api.h:1438
int16_t cs_vol
[in] Set ClearStero Volume
Definition: audio_high_level_api.h:675
AsInitMediaPlayerPost init_mpp_param
[in] for InitMPP (header.command_code==AUDCMD_INITMPP)
Definition: audio_high_level_api.h:1156
bool en
Select direct path Enable/Disable.
Definition: audio_high_level_api.h:886
Enable effect sound.
Definition: audio_high_level_api.h:826
InitI2SParam init_i2s_param
[in] for InitI2SParam (header.command_code==AUDCMD_INITI2SPARAM)
Definition: audio_high_level_api.h:1257
Player.
Definition: audio_high_level_api.h:1359
uint8_t beep_en
[in] Select BEEP Enable/Disable
Definition: audio_high_level_api.h:738
AudioResultHeader header
[out] Result Header
Definition: audio_high_level_api.h:1624
PowerOff.
Definition: audio_high_level_api.h:1371
Definition: audio_high_level_api.h:1621
Definition: audio_high_level_api.h:731
uint8_t packet_length
[in] packet length
Definition: audio_high_level_api.h:508
Definition: audio_player_api.h:352
uint8_t mode
[in] set speaker driver mode
Definition: audio_high_level_api.h:798
AsMngSubStatus
Definition: audio_high_level_api.h:1382
CXD5602 Audio Capture API.
PlayPause.
Definition: audio_high_level_api.h:1398
Disable effect sound.
Definition: audio_high_level_api.h:820
AsSetPreProcParam set_preproc_param
[in] for SetPreProcessDSP (header.command_code==AUDCMD_SET_PREPROCESS_DSP)
Definition: audio_high_level_api.h:1183
int16_t input1_db
[in] Set Input1 Volume
Definition: audio_high_level_api.h:697
Definition: audio_high_level_api.h:710
InitDNCParam init_dnc_param
[in] for InitDNCParam (header.command_code==AUDCMD_INITDNCPARAM)
Definition: audio_high_level_api.h:1270
Definition: audio_recognizer_api.h:260
uint8_t sub_status_info
[out] Current Sub Status
Definition: audio_high_level_api.h:1548
Definition: audio_high_level_api.h:990
#define AS_RECOGNIZER_FILE_PATH_LEN
Length of Recognizer dsp file name and path.
Definition: audio_recognizer_api.h:93
uint8_t input1_mute
[in] Set Input1 Volume Mute/UnMute
Definition: audio_high_level_api.h:721
uint32_t error_code
Error Infomation, T.B.D.
Definition: audio_high_level_api.h:1588
beep enable
Definition: audio_high_level_api.h:1524
[in] Send audio data to Recognizer
Definition: audio_high_level_api.h:984
CXD5602 Audio Command ID.
ErrorResponseParam error_response_param
[out] for ErrorResponse (header.result_code==AUDRLT_ERRORRESPONSE)
Definition: audio_high_level_api.h:1644
beep disable
Definition: audio_high_level_api.h:1520
to Ready
Definition: audio_high_level_api.h:1452
fail to create task
Definition: audio_high_level_api.h:1489
uint8_t reserved3
reserved
Definition: audio_high_level_api.h:1579
BaseBandReady.
Definition: audio_high_level_api.h:1418
asBeepEn
Definition: audio_high_level_api.h:1516
uint8_t mng
[in] MsgQueID of audio_manager
Definition: audio_high_level_api.h:1673
Definition: audio_high_level_api.h:588
uint8_t recorder
[in] MsgQueID of recorderObject
Definition: audio_high_level_api.h:1689
AsSetThroughPathParam set_through_path
[in] for SetThrouhgPath (header.command_code==AUDCMD_SETTHROUGHPATH)
Definition: audio_high_level_api.h:1307
#define LENGTH_AUDRLT_ERRORRESPONSE_MIN
Definition: audio_high_level_api.h:106
AsInitMixerParam init_mixer_param
[in] for Init OutputMixer (header.command_code==AUDCMD_INIT_OUTPUTMIXER)
Definition: audio_high_level_api.h:1144
void(* AudioAttentionCb)(const ErrorAttentionParam *attparam)
Definition: audio_common_defs.h:810
uint8_t cs_en
[in] Select ClearStereo Enable/Disable, 1:Enable, 0:Disable.
Definition: audio_high_level_api.h:666
Definition: audio_high_level_api.h:563
AsVadStatus
Definition: audio_high_level_api.h:1434
Definition: audio_high_level_api.h:879
uint8_t module_id
[out] Error module infomation, T.B.D.
Definition: audio_high_level_api.h:1600
Definition: audio_high_level_api.h:663
AsOutDevice
Definition: audio_high_level_api.h:611
Definition: audio_high_level_api.h:615
RecorderActive.
Definition: audio_high_level_api.h:1406
Definition: audio_high_level_api.h:1560
AsVolumeMute
Definition: audio_high_level_api.h:1498
Definition: audio_high_level_api.h:906
uint8_t input2_mute
[in] Set Input2 Volume Mute/UnMute
Definition: audio_high_level_api.h:725
NotifyStatus notify_status
[out] for NotifyStatus (header.result_code==AUDRLT_NOTIFYSTATUS)
Definition: audio_high_level_api.h:1632
int16_t input2_db
[in] Set Input2 Volume
Definition: audio_high_level_api.h:705
Definition: audio_high_level_api.h:1530
uint8_t micfrontend
[in] MsgQueID of FrontendObject
Definition: audio_high_level_api.h:1685
Definition: audio_high_level_api.h:626
PlayActive.
Definition: audio_high_level_api.h:1394
Through.
Definition: audio_high_level_api.h:1375
CXD5602 Audio Mic Frontend API.
uint8_t effector
[in] MsgQueID of effectorObject
Definition: audio_high_level_api.h:1697
illegal state
Definition: audio_high_level_api.h:1493
uint16_t beep_freq
[in] Set BEEP Frequency
Definition: audio_high_level_api.h:756
Ready.
Definition: audio_high_level_api.h:1351
unmute
Definition: audio_high_level_api.h:1506
None.
Definition: audio_high_level_api.h:1386
uint8_t sub_code
[in] sub
Definition: audio_high_level_api.h:500
AudioCommandHeader header
[in] Command Header
Definition: audio_high_level_api.h:1101
uint8_t in
input path
Definition: audio_high_level_api.h:893
uint16_t reserved1
[out] reserved
Definition: audio_high_level_api.h:1592
SetRenderingClkParam set_renderingclk_param
[in] for SetRenderingClk (header.command_code==AUDCMD_SETRENDERINGCLK)
Definition: audio_high_level_api.h:1313
success
Definition: audio_high_level_api.h:1485
uint8_t reserved
[out] reserved
Definition: audio_high_level_api.h:1541
uint8_t ch_num
[in] Select InitMicFrontend input channels
Definition: audio_high_level_api.h:995
uint16_t samples
[in] Samples per a frame
Definition: audio_high_level_api.h:1005
uint32_t error_sub_code
[out] Detailed Error Infomation, T.B.D.
Definition: audio_high_level_api.h:1604
uint8_t status_info
[out] Current Status
Definition: audio_high_level_api.h:1555
Definition: audio_effector_api.h:401
CXD5602 Audio Common Definitions.
uint8_t player_main
[in] MsgQueID of playerObject
Definition: audio_high_level_api.h:1677
uint8_t player_sub
[in] MsgQueID of playerObject for Sound Effect
Definition: audio_high_level_api.h:1681
Definition: audio_player_api.h:523
uint8_t bit_length
[in] Select InitMicFrontend input bit length
Definition: audio_high_level_api.h:1000
AsPlayerClockRecovery clk_recovery_param
[in] for Adjust sound period (header.command_code==AUDCMD_CLKRECOVERY)
Definition: audio_high_level_api.h:1150
Definition: audio_effector_api.h:483
#define AS_POSTPROC_FILE_PATH_LEN
Length of Recognizer dsp file name and path.
Definition: audio_outputmix_api.h:86
Inside voice section.
Definition: audio_high_level_api.h:1442
Recorder.
Definition: audio_high_level_api.h:1363
Baseband.
Definition: audio_high_level_api.h:1355
AsThroughPath path2
[in] path2
Definition: audio_high_level_api.h:914
AsInitPreProcParam init_preproc_param
[in] for InitPreProcessDSP (header.command_code==AUDCMD_INIT_PREPROCESS_DSP)
Definition: audio_high_level_api.h:1177
keep setting
Definition: audio_high_level_api.h:1502
__attribute__((deprecated("\eprecated attention callback type is used. \ \lease use \udioAttentionCb\as callback type. \ \))) int AS_CreateAudioManager(AudioSubSystemIDs ids
Activate AudioSubSystem[Deprecated] This API is to make it compatible with old application. Will delete most application seems to migrate to new API.
int AS_ReceiveAudioResult(AudioResult *packet)
Receive Audio Result.
uint8_t master_mute
[in] Select Master Volume Mute/UnMute
Definition: audio_high_level_api.h:717
uint8_t mode
[in] Select DNC mode
Definition: audio_high_level_api.h:656
CXD5602 Audio Player API.
PowerOnParam power_on_param
[in] for PowerOn (header.command_code==AUDCMD_POWERON)
Definition: audio_high_level_api.h:1301
PlayReady.
Definition: audio_high_level_api.h:1390
uint8_t reserved1
reserved
Definition: audio_high_level_api.h:1571
Definition: audio_high_level_api.h:1584
AsThroughPathIn
Definition: audio_high_level_api.h:846
to BaseBand
Definition: audio_high_level_api.h:1456
uint8_t recognizer
[in] MsgQueID of recognizerObject
Definition: audio_high_level_api.h:1701
uint8_t data_dest
[in] Select Data path from MicFrontend
Definition: audio_high_level_api.h:1031
to Recorder
Definition: audio_high_level_api.h:1464
CXD5602 Audio Synthesizer API.
uint8_t sub_module_id
[out] for debug purpose
Definition: audio_high_level_api.h:1596
uint32_t rate
[in] Set I2S input/output frequency
Definition: audio_high_level_api.h:606
AsFrontendDataDest
Definition: audio_high_level_api.h:974
Definition: audio_high_level_api.h:1665
AsEnableSoundEffectFunc
Definition: audio_high_level_api.h:816
SetVolumeParam set_volume_param
[in] for SetVolume (header.command_code==AUDCMD_SETVOLUME)
Definition: audio_high_level_api.h:1283
Definition: audio_high_level_api.h:791
Definition: audio_high_level_api.h:492
Definition: audio_high_level_api.h:952
uint8_t bypass_mode_en
[in] Select I2S Bypass mode disable/enable
Definition: audio_high_level_api.h:601
AsClkMode
Definition: audio_high_level_api.h:808
uint32_t reserved2
[out] reserved
Definition: audio_high_level_api.h:1608
AsMngStatus
Definition: audio_high_level_api.h:1347
#define AS_MIC_CHANNEL_MAX
Definition: audio_common_defs.h:86
InitMicGainParam init_mic_gain_param
[in] for InitMicGain (header.command_code==AUDCMD_INITMICGAIN)
Definition: audio_high_level_api.h:1250
uint8_t mixer
[in] MsgQueID of mixerObject
Definition: audio_high_level_api.h:1693
Definition: audio_high_level_api.h:761
Definition: audio_high_level_api.h:619
AsThroughPath path1
[in] path1
Definition: audio_high_level_api.h:910
mute
Definition: audio_high_level_api.h:1510
uint8_t preproc_type
[in] Select pre process enable
Definition: audio_high_level_api.h:1019
AsErrorCode_e
Definition: audio_high_level_api.h:1481
Definition: audio_high_level_api.h:922
uint8_t out
output path
Definition: audio_high_level_api.h:900
AsThroughPathOut
Definition: audio_high_level_api.h:857
Recorder.
Definition: audio_high_level_api.h:1367
InitSpDrvModeParam init_sp_drv_mode
[in] for InitSpDrvMode (header.command_code==AUDCMD_INITSPDRVMODE)
Definition: audio_high_level_api.h:1319
uint8_t app
[in] MsgQueID of Application
Definition: audio_high_level_api.h:1669
uint8_t i2s_id
[in] Select I2S ID Use AsI2sId enum type
Definition: audio_high_level_api.h:594
uint8_t player_id
[in] Handle of OutputMixer
Definition: audio_high_level_api.h:942
InitOutputSelectParam init_output_select_param
[in] for InitOutputSelect (header.command_code==AUDCMD_INITOUTPUTSELECT)
Definition: audio_high_level_api.h:1263
AsDncMode
InitDNCParam Command (AUDCMD_INITDNCPARAM) parameter.
Definition: audio_high_level_api.h:642
SetMicMapParam set_mic_map_param
[in] for SetMicMap (header.command_code==AUDCMD_SETMICMAP)
Definition: audio_high_level_api.h:1244
int16_t beep_vol
[in] Set BEEP Volume
Definition: audio_high_level_api.h:748
AsStartSoundEffectMode
Definition: audio_high_level_api.h:832
RecognizerActive.
Definition: audio_high_level_api.h:1414
uint8_t sub_code
[out] sub code
Definition: audio_high_level_api.h:521
StatusChangedParam status_changed_param
[out] for StatusChanged (header.result_code==AUDRLT_STATUSCHANGED)
Definition: audio_high_level_api.h:1638
RecognizerReady.
Definition: audio_high_level_api.h:1410
Definition: audio_high_level_api.h:649
Definition: audio_common_defs.h:738
#define AS_PREPROCESS_FILE_PATH_LEN
Length of Recognizer dsp file name and path.
Definition: audio_frontend_api.h:89
WaitCommandword.
Definition: audio_high_level_api.h:1426
Definition: audio_high_level_api.h:1097
InitClearStereoParam init_clear_stereo_param
[in] for InitClearStereo (header.command_code==AUDCMD_INITCLEARSTEREO)
Definition: audio_high_level_api.h:1277
Definition: audio_high_level_api.h:776
CXD5602 Audio Recorder API.
uint32_t out_fs
[in] Output Fs
Definition: audio_high_level_api.h:1012
int AS_DeleteAudioManager(void)
Deactivate AudioSubSystem.
AsSpDrvMode
Definition: audio_high_level_api.h:868
Definition: audio_recorder_api.h:239
uint8_t reserved2
reserved
Definition: audio_high_level_api.h:1575
int AS_SendAudioCommand(AudioCommand *packet)
Send Audio Command.
Definition: audio_outputmix_api.h:412
Definition: audio_high_level_api.h:962
[in] Send audio data to Recorder
Definition: audio_high_level_api.h:979
AsSetMediaPlayerPost set_mpp_param
[in] for SetMPPParam (header.command_code==AUDCMD_SETMPPPARAM)
Definition: audio_high_level_api.h:1162
uint8_t enable_sound_effect
[in] Enable or disable sound-effect playback function.
Definition: audio_high_level_api.h:768
uint8_t packet_length
[out] packet length
Definition: audio_high_level_api.h:529
uint8_t reserved
[in] reserved
Definition: audio_high_level_api.h:496
uint8_t output_device_sel
[in] Select CXD5247 output devices
Definition: audio_high_level_api.h:633
AsI2sId
Definition: audio_high_level_api.h:576
Definition: audio_high_level_api.h:938
BaseBandActive.
Definition: audio_high_level_api.h:1422
uint8_t changed_status
[out] Changed status
Definition: audio_high_level_api.h:1567
uint8_t clk_mode
[in] set rendering clock
Definition: audio_high_level_api.h:783
to Through
Definition: audio_high_level_api.h:1472
Definition: audio_recorder_api.h:337
#define LENGTH_AUDRLT_ERRORRESPONSE_MAX
Definition: audio_high_level_api.h:102
Definition: audio_high_level_api.h:513
uint8_t postproc_type
[in] Set postproc type. Use AsPostprocType enum type
Definition: audio_high_level_api.h:928
Definition: audio_high_level_api.h:623
to Player
Definition: audio_high_level_api.h:1460
CXD5602 Audio Renderer API.
CXD5602 Audio Recognizer API.
AsInitMicFrontEnd init_micfrontend_param
[in] for InitMicFrontend (header.command_code==AUDCMD_INIT_MICFRONTEND)
Definition: audio_high_level_api.h:1171
Play effect sound with limited data.
Definition: audio_high_level_api.h:836