Developer World
Spresense SDK Library v2.0.1-3834d32
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_SETSPDRVMODE 2
212 
220 #define AS_ECODE_OK 0x00
221 
224 #define AS_ECODE_STATE_VIOLATION 0x01
225 
228 #define AS_ECODE_PACKET_LENGTH_ERROR 0x02
229 
232 #define AS_ECODE_COMMAND_CODE_ERROR 0x03
233 
236 #define AS_ECODE_COMMAND_NOT_SUPPOT 0x04
237 
240 #define AS_ECODE_AUDIO_POWER_ON_ERROR 0x05
241 
244 #define AS_ECODE_AUDIO_POWER_OFF_ERROR 0x06
245 
248 #define AS_ECODE_DSP_LOAD_ERROR 0x07
249 
252 #define AS_ECODE_DSP_UNLOAD_ERROR 0x08
253 
256 #define AS_ECODE_DSP_VERSION_ERROR 0x09
257 
260 #define AS_ECODE_DSP_EXEC_ERROR 0x3b
261 
264 #define AS_ECODE_DSP_STOP_ERROR 0x3c
265 
268 #define AS_ECODE_DSP_SET_ERROR 0x3d
269 
272 #define AS_ECODE_SET_AUDIO_DATA_PATH_ERROR 0x0A
273 
276 #define AS_ECODE_CLEAR_AUDIO_DATA_PATH_ERROR 0x0B
277 
280 #define AS_ECODE_NOT_AUDIO_DATA_PATH 0x0C
281 
284 #define AS_ECODE_DECODER_LIB_INITIALIZE_ERROR 0x0D
285 
288 #define AS_ECODE_ENCODER_LIB_INITIALIZE_ERROR 0x0E
289 
292 #define AS_ECODE_FILTER_LIB_INITIALIZE_ERROR 0x0F
293 
296 #define AS_ECODE_DUMP_INITIALIZE_ERROR 0x10
297 
300 #define AS_ECODE_COMMAND_PARAM_CODEC_TYPE 0x11
301 
304 #define AS_ECODE_COMMAND_PARAM_AREA_INSUFFICIENT 0x12
305 
308 #define AS_ECODE_COMMAND_PARAM_CHANNEL_NUMBER 0x13
309 
312 #define AS_ECODE_COMMAND_PARAM_SAMPLING_RATE 0x14
313 
316 #define AS_ECODE_COMMAND_PARAM_BIT_RATE 0x15
317 
320 #define AS_ECODE_COMMAND_PARAM_BIT_LENGTH 0x16
321 
324 #define AS_ECODE_COMMAND_PARAM_COMPLEXITY 0x17
325 
328 #define AS_ECODE_COMMAND_PARAM_ACTIVE_PLAYER 0x18
329 
332 #define AS_ECODE_COMMAND_PARAM_INPUT_DEVICE 0x19
333 
336 #define AS_ECODE_COMMAND_PARAM_OUTPUT_DEVICE 0x1A
337 
340 #define AS_ECODE_COMMAND_PARAM_INPUT_HANDLER 0x1B
341 
344 #define AS_ECODE_COMMAND_PARAM_OUTPUT_HANDLER 0x1C
345 
348 #define AS_ECODE_COMMAND_PARAM_CALLBACK 0x1D
349 
352 #define AS_ECODE_COMMAND_PARAM_FUNCTION_ENABLE 0x1E
353 
356 #define AS_ECODE_COMMAND_PARAM_CONFIG_TABLE 0x1F
357 
360 #define AS_ECODE_COMMAND_PARAM_WITH_MFE 0x20
361 
364 #define AS_ECODE_COMMAND_PARAM_WITH_MPP 0x21
365 
368 #define AS_ECODE_COMMAND_PARAM_OUTPUT_DATE 0x22
369 
372 #define AS_ECODE_COMMAND_PARAM_SELECT_MIC 0x23
373 
376 #define AS_ECODE_COMMAND_PARAM_MIC_GAIN 0x24
377 
380 #define AS_ECODE_COMMAND_PARAM_I2S_ID 0x25
381 
384 #define AS_ECODE_COMMAND_PARAM_BYPASS_MODE 0x26
385 
388 #define AS_ECODE_COMMAND_PARAM_VOLLUME 0x27
389 
392 #define AS_ECODE_COMMAND_PARAM_INPUT_DB 0x28
393 
396 #define AS_ECODE_COMMAND_PARAM_MASTER_DB 0x29
397 
400 #define AS_ECODE_COMMAND_PARAM_BEEP_FREQ 0x2A
401 
404 #define AS_ECODE_DMAC_INITIALIZE_ERROR 0x2B
405 
408 #define AS_ECODE_DMAC_READ_ERROR 0x2C
409 
412 #define AS_ECODE_DMAC_WRITE_ERROR 0x2D
413 
416 #define AS_ECODE_CHECK_MEMORY_POOL_ERROR 0x2E
417 
420 #define AS_ECODE_SIMPLE_FIFO_UNDERFLOW 0x2F
421 
424 #define AS_ECODE_SET_MIC_GAIN_ERROR 0x30
425 
428 #define AS_ECODE_SET_I2S_PARAM_ERROR 0x31
429 
432 #define AS_ECODE_SET_OUTPUT_SELECT_ERROR 0x32
433 
436 #define AS_ECODE_INIT_CLEAR_STEREO_ERROR 0x33
437 
440 #define AS_ECODE_SET_VOLUME_ERROR 0x34
441 
444 #define AS_ECODE_SET_VOLUME_MUTE_ERROR 0x35
445 
448 #define AS_ECODE_SET_BEEP_ERROR 0x36
449 
452 #define AS_ECODE_QUEUE_OPERATION_ERROR 0x37
453 
456 #define AS_ECODE_INTERNAL_COMMAND_CODE_ERROR 0x38
457 
460 #define AS_ECODE_COMMAND_PARAM_RENDERINGCLK 0x39
461 
464 #define AS_ECODE_SET_RENDERINGCLK_ERROR 0x3A
465 
468 #define AS_ECODE_COMMAND_PARAM_SETSPDRVMODE 0x3B
469 
472 #define AS_ECODE_SET_SPDRVMODE_ERROR 0x3C
473 
476 #define AS_ECODE_SET_MICMAP_ERROR 0x3D
477 
480 #define AS_ECODE_OBJECT_NOT_AVAILABLE_ERROR 0x3E
481 
484 #define AS_ECODE_OSCILLATOR_LIB_INITIALIZE_ERROR 0x3F
485 
488 /****************************************************************************
489  * Public Types
490  ****************************************************************************/
491 
494 typedef struct
495 {
498  uint8_t reserved;
499 
502  uint8_t sub_code;
503 
506  uint8_t command_code;
507 
510  uint8_t packet_length;
512 
515 typedef struct
516 {
519  uint8_t instance_id;
520 
523  uint8_t sub_code;
524 
527  uint8_t result_code;
528 
531  uint8_t packet_length;
533 
536 typedef struct
537 {
559  uint8_t mic_map[AS_MIC_CHANNEL_MAX];
560 
562 
565 typedef struct
566 {
573  int16_t mic_gain[AS_MIC_CHANNEL_MAX];
575 
578 typedef enum
579 {
580  AS_I2S1,
581  AS_I2S2
582 } AsI2sId;
583 
584 typedef enum
585 {
586  AS_I2S_BYPASS_MODE_DISABLE,
587  AS_I2S_BYPASS_MODE_ENABLE
588 } AsI2SBypassMode;
589 
590 typedef struct
591 {
596  uint8_t i2s_id;
597 
603  uint8_t bypass_mode_en;
604  uint16_t reserved2;
605 
608  uint32_t rate;
609 } InitI2SParam;
610 
613 typedef enum
614 {
618 
622 
626 } AsOutDevice;
627 
628 typedef struct
629 {
636  uint8_t reserved1;
637  uint16_t reserved2;
639 
644 typedef enum
645 {
646  AS_DNC_MODE_A,
647  AS_DNC_MODE_B,
648  AS_DNC_MODE_C
649 } AsDncMode;
650 
651 typedef struct
652 {
658  uint8_t mode;
659  uint8_t reserved1;
660  uint16_t reserved2;
661 } InitDNCParam;
662 
665 typedef struct {
668  uint8_t cs_en;
669  uint8_t reserved1;
670 
677  int16_t cs_vol;
679 
682 typedef struct
683 {
690  int16_t master_db;
691  uint16_t reserved1;
692 
699  int16_t input1_db;
700 
707  int16_t input2_db;
709 
712 typedef struct
713 {
719  uint8_t master_mute;
720 
723  uint8_t input1_mute;
724 
727  uint8_t input2_mute;
728  uint8_t reserved1;
730 
733 typedef struct
734 {
740  uint8_t beep_en;
741  uint8_t reserved1;
742  uint16_t reserved2;
743 
750  int16_t beep_vol;
751 
758  uint16_t beep_freq;
759 } SetBeepParam;
760 
763 typedef struct
764 {
771  uint8_t reserved1;
772  uint8_t reserved2;
773  uint8_t reserved3;
774 } PowerOnParam;
775 
778 typedef struct
779 {
785  uint8_t clk_mode;
786  uint8_t reserved1;
787  uint8_t reserved2;
788  uint8_t reserved3;
790 
793 typedef struct
794 {
800  uint8_t mode;
801  uint8_t reserved1;
802  uint8_t reserved2;
803  uint8_t reserved3;
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  };
1321 
1322 #ifdef __cplusplus
1323  uint8_t getCode(void)
1324  {
1325  return header.command_code;
1326  }
1327  bool isStateChange(void)
1328  {
1329  return ((getCode() & 0x40) != 0);
1330  }
1331 #endif
1332 
1333 #if !defined(__CC_ARM)
1334 } AudioCommand ;
1335 #else
1336 } AudioCommand __attribute__((transparent_union));
1337 #endif
1338 
1339 
1340 /* Result Structures */
1341 
1342 /* NotifyStatus */
1343 
1346 typedef enum
1347 {
1351 
1355 
1359 
1363 
1367 
1371 
1375 
1376  AS_MNG_STATUS_NUM
1377 } AsMngStatus;
1378 
1381 typedef enum
1382 {
1386 
1390 
1394 
1398 
1402 
1406 
1410 
1414 
1418 
1422 
1426  AS_MNG_SUB_STATUS_NUM
1427 } AsMngSubStatus;
1428 
1433 typedef enum
1434 {
1438 
1442  AS_VAD_STATUS_NUM
1443 } AsVadStatus;
1444 
1447 typedef enum
1448 {
1452 
1456 
1460 
1464 
1468 
1472 
1473  AS_STATUS_CHANGED_STS_NUM
1475 
1476 
1477 
1480 typedef enum
1481 {
1485 
1489 
1493 } AsErrorCode_e;
1494 
1497 typedef enum
1498 {
1502 
1506 
1510  AS_VOLUMEMUTE_NUM
1511 } AsVolumeMute;
1512 
1515 typedef enum
1516 {
1520 
1524  AS_BEEPEN_NUM
1525 } asBeepEn;
1526 
1529 typedef struct
1530 {
1536  uint8_t vad_status;
1537 
1540  uint8_t reserved;
1541 
1548 
1554  uint8_t status_info;
1555 } NotifyStatus;
1556 
1559 typedef struct
1560 {
1567 
1570  uint8_t reserved1;
1571 
1574  uint8_t reserved2;
1575 
1578  uint8_t reserved3;
1580 
1583 typedef struct
1584 {
1587  uint32_t error_code;
1588 
1591  uint16_t reserved1;
1592 
1595  uint8_t sub_module_id;
1596 
1599  uint8_t module_id;
1600 
1603  uint32_t error_sub_code;
1604 
1607  uint32_t reserved2;
1608 
1613 
1616 #if defined(__CC_ARM)
1617 #pragma anon_unions
1618 #endif
1619 
1620 typedef struct {
1624 
1625  union
1626  {
1632 
1638 
1644  };
1645 
1646 #if !defined(__CC_ARM)
1647 } AudioResult ;
1648 #else
1649 } AudioResult __attribute__((transparent_union));
1650 #endif
1651 
1652 /* Error Code */
1653 /* [T.B.D]
1654  *
1655  * no error = 0
1656  * state error
1657  * paramater error
1658  * timeout
1659  *
1660  */
1661 
1664 typedef struct
1665 {
1668  uint8_t app;
1669 
1672  uint8_t mng;
1673 
1676  uint8_t player_main;
1677 
1680  uint8_t player_sub;
1681 
1684  uint8_t micfrontend;
1685 
1688  uint8_t recorder;
1689 
1692  uint8_t mixer;
1693 
1696  uint8_t effector;
1697 
1700  uint8_t recognizer;
1702 
1703 /****************************************************************************
1704  * Public Data
1705  ****************************************************************************/
1706 
1707 /****************************************************************************
1708  * Inline Functions
1709  ****************************************************************************/
1710 
1711 /****************************************************************************
1712  * Public Function Prototypes
1713  ****************************************************************************/
1714 
1723 int AS_SendAudioCommand(AudioCommand* packet);
1724 
1733 int AS_ReceiveAudioResult(AudioResult* packet);
1734 
1749 int AS_ReceiveAudioResult(FAR AudioResult *packet, uint8_t id, uint32_t tmo);
1750 
1760 
1771 __attribute__((deprecated("\nDeprecated attention callback type is used. \
1772  \nPlease use \"AudioAttentionCb\" as callback type. \
1773  \n")))
1774 int AS_CreateAudioManager(AudioSubSystemIDs ids, obs_AudioAttentionCb obs_att_cb);
1775 
1782 int AS_DeleteAudioManager(void);
1783 
1786 #endif /* __MODULES_INCLUDE_AUDIO_AUDIO_HIGH_LEVEL_API_H */
1787 
Definition: audio_effector_api.h:450
uint8_t result_code
[out] result code
Definition: audio_high_level_api.h:527
RecorderReady.
Definition: audio_high_level_api.h:1401
to PowerOff
Definition: audio_high_level_api.h:1467
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:519
SetSpDrvModeParam set_sp_drv_mode
[in] for SetSpDrvMode (header.command_code==AUDCMD_SETSPDRVMODE)
Definition: audio_high_level_api.h:1319
Definition: audio_high_level_api.h:682
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:690
AsStatusChangedSts
Definition: audio_high_level_api.h:1447
Definition: audio_high_level_api.h:536
uint8_t vad_status
VAD status.
Definition: audio_high_level_api.h:1536
int AS_CreateAudioManager(AudioSubSystemIDs ids, AudioAttentionCb att_cb)
Activate AudioSubSystem.
uint8_t command_code
[in] Command code
Definition: audio_high_level_api.h:506
CXD5602 Audio OutputMix API.
Out of voice section.
Definition: audio_high_level_api.h:1437
int16_t cs_vol
[in] Set ClearStero Volume
Definition: audio_high_level_api.h:677
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:1358
uint8_t beep_en
[in] Select BEEP Enable/Disable
Definition: audio_high_level_api.h:740
AudioResultHeader header
[out] Result Header
Definition: audio_high_level_api.h:1623
PowerOff.
Definition: audio_high_level_api.h:1370
Definition: audio_high_level_api.h:1620
Definition: audio_high_level_api.h:733
uint8_t packet_length
[in] packet length
Definition: audio_high_level_api.h:510
Definition: audio_player_api.h:352
AsMngSubStatus
Definition: audio_high_level_api.h:1381
CXD5602 Audio Capture API.
PlayPause.
Definition: audio_high_level_api.h:1397
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:699
Definition: audio_high_level_api.h:712
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:1547
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:723
uint32_t error_code
Error Infomation, T.B.D.
Definition: audio_high_level_api.h:1587
beep enable
Definition: audio_high_level_api.h:1523
[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:1643
beep disable
Definition: audio_high_level_api.h:1519
to Ready
Definition: audio_high_level_api.h:1451
fail to create task
Definition: audio_high_level_api.h:1488
uint8_t reserved3
reserved
Definition: audio_high_level_api.h:1578
BaseBandReady.
Definition: audio_high_level_api.h:1417
asBeepEn
Definition: audio_high_level_api.h:1515
uint8_t mng
[in] MsgQueID of audio_manager
Definition: audio_high_level_api.h:1672
Definition: audio_high_level_api.h:590
uint8_t recorder
[in] MsgQueID of recorderObject
Definition: audio_high_level_api.h:1688
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:806
uint8_t cs_en
[in] Select ClearStereo Enable/Disable, 1:Enable, 0:Disable.
Definition: audio_high_level_api.h:668
Definition: audio_high_level_api.h:565
AsVadStatus
Definition: audio_high_level_api.h:1433
Definition: audio_high_level_api.h:879
uint8_t module_id
[out] Error module infomation, T.B.D.
Definition: audio_high_level_api.h:1599
Definition: audio_high_level_api.h:665
AsOutDevice
Definition: audio_high_level_api.h:613
Definition: audio_high_level_api.h:617
RecorderActive.
Definition: audio_high_level_api.h:1405
Definition: audio_high_level_api.h:1559
AsVolumeMute
Definition: audio_high_level_api.h:1497
Definition: audio_high_level_api.h:906
uint8_t input2_mute
[in] Set Input2 Volume Mute/UnMute
Definition: audio_high_level_api.h:727
NotifyStatus notify_status
[out] for NotifyStatus (header.result_code==AUDRLT_NOTIFYSTATUS)
Definition: audio_high_level_api.h:1631
int16_t input2_db
[in] Set Input2 Volume
Definition: audio_high_level_api.h:707
Definition: audio_high_level_api.h:1529
uint8_t micfrontend
[in] MsgQueID of FrontendObject
Definition: audio_high_level_api.h:1684
Definition: audio_high_level_api.h:628
PlayActive.
Definition: audio_high_level_api.h:1393
Through.
Definition: audio_high_level_api.h:1374
CXD5602 Audio Mic Frontend API.
uint8_t effector
[in] MsgQueID of effectorObject
Definition: audio_high_level_api.h:1696
illegal state
Definition: audio_high_level_api.h:1492
uint16_t beep_freq
[in] Set BEEP Frequency
Definition: audio_high_level_api.h:758
Ready.
Definition: audio_high_level_api.h:1350
unmute
Definition: audio_high_level_api.h:1505
None.
Definition: audio_high_level_api.h:1385
uint8_t sub_code
[in] sub
Definition: audio_high_level_api.h:502
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:1591
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:1484
uint8_t reserved
[out] reserved
Definition: audio_high_level_api.h:1540
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:1603
uint8_t status_info
[out] Current Status
Definition: audio_high_level_api.h:1554
Definition: audio_effector_api.h:401
CXD5602 Audio Common Definitions.
uint8_t player_main
[in] MsgQueID of playerObject
Definition: audio_high_level_api.h:1676
uint8_t player_sub
[in] MsgQueID of playerObject for Sound Effect
Definition: audio_high_level_api.h:1680
uint8_t mode
[in] set speaker driver mode
Definition: audio_high_level_api.h:800
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:1441
Recorder.
Definition: audio_high_level_api.h:1362
Baseband.
Definition: audio_high_level_api.h:1354
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:1501
__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:719
uint8_t mode
[in] Select DNC mode
Definition: audio_high_level_api.h:658
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:1389
uint8_t reserved1
reserved
Definition: audio_high_level_api.h:1570
Definition: audio_high_level_api.h:1583
AsThroughPathIn
Definition: audio_high_level_api.h:846
to BaseBand
Definition: audio_high_level_api.h:1455
uint8_t recognizer
[in] MsgQueID of recognizerObject
Definition: audio_high_level_api.h:1700
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:1463
CXD5602 Audio Synthesizer API.
uint8_t sub_module_id
[out] for debug purpose
Definition: audio_high_level_api.h:1595
uint32_t rate
[in] Set I2S input/output frequency
Definition: audio_high_level_api.h:608
AsFrontendDataDest
Definition: audio_high_level_api.h:974
Definition: audio_high_level_api.h:1664
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:494
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:603
AsClkMode
Definition: audio_high_level_api.h:808
uint32_t reserved2
[out] reserved
Definition: audio_high_level_api.h:1607
AsMngStatus
Definition: audio_high_level_api.h:1346
#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:1692
Definition: audio_high_level_api.h:763
Definition: audio_high_level_api.h:621
AsThroughPath path1
[in] path1
Definition: audio_high_level_api.h:910
mute
Definition: audio_high_level_api.h:1509
uint8_t preproc_type
[in] Select pre process enable
Definition: audio_high_level_api.h:1019
AsErrorCode_e
Definition: audio_high_level_api.h:1480
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:1366
uint8_t app
[in] MsgQueID of Application
Definition: audio_high_level_api.h:1668
uint8_t i2s_id
[in] Select I2S ID Use AsI2sId enum type
Definition: audio_high_level_api.h:596
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:644
Definition: audio_high_level_api.h:793
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:750
AsStartSoundEffectMode
Definition: audio_high_level_api.h:832
RecognizerActive.
Definition: audio_high_level_api.h:1413
uint8_t sub_code
[out] sub code
Definition: audio_high_level_api.h:523
StatusChangedParam status_changed_param
[out] for StatusChanged (header.result_code==AUDRLT_STATUSCHANGED)
Definition: audio_high_level_api.h:1637
RecognizerReady.
Definition: audio_high_level_api.h:1409
Definition: audio_high_level_api.h:651
Definition: audio_common_defs.h:734
#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:1425
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:778
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:1574
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:770
uint8_t packet_length
[out] packet length
Definition: audio_high_level_api.h:531
uint8_t reserved
[in] reserved
Definition: audio_high_level_api.h:498
uint8_t output_device_sel
[in] Select CXD5247 output devices
Definition: audio_high_level_api.h:635
AsI2sId
Definition: audio_high_level_api.h:578
Definition: audio_high_level_api.h:938
BaseBandActive.
Definition: audio_high_level_api.h:1421
uint8_t changed_status
[out] Changed status
Definition: audio_high_level_api.h:1566
uint8_t clk_mode
[in] set rendering clock
Definition: audio_high_level_api.h:785
to Through
Definition: audio_high_level_api.h:1471
Definition: audio_recorder_api.h:337
#define LENGTH_AUDRLT_ERRORRESPONSE_MAX
Definition: audio_high_level_api.h:102
Definition: audio_high_level_api.h:515
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:625
to Player
Definition: audio_high_level_api.h:1459
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