Developer World
Spresense SDK Library v1.4.2-3df2e9d
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 
80 #include <stdint.h>
81 #include <stdbool.h>
82 
83 /****************************************************************************
84  * Pre-processor Definitions
85  ****************************************************************************/
86 
92 #define LENGTH_AUDRLT 2
93 
96 #define LENGTH_AUDRLT_ERRORRESPONSE_MAX 8
97 
100 #define LENGTH_AUDRLT_ERRORRESPONSE_MIN 5
101 
109 #define LENGTH_GETSTATUS 2
110 
113 #define LENGTH_SET_PLAYER_STATUS 6
114 
117 #define LENGTH_SET_RECORDER_STATUS 4
118 
121 #define LENGTH_SET_RECOGNIZER_STATUS 4
122 
125 #define LENGTH_SET_BASEBAND_STATUS 9
126 
129 #define LENGTH_SET_THROUGH_STATUS 3
130 
133 #define LENGTH_SET_READY_STATUS 2
134 
137 #define LENGTH_POWERON 2
138 
141 #define LENGTH_SET_POWEROFF_STATUS 2
142 
145 #define LENGTH_SETMICMAP 4
146 
149 #define LENGTH_INITMICGAIN 5
150 
153 #define LENGTH_INITI2SPARAM 3
154 
157 #define LENGTH_INITDEQPARAM 8
158 
161 #define LENGTH_INITOUTPUTSELECT 2
162 
165 #define LENGTH_INITDNCPARAM 2
166 
169 #define LENGTH_INITCLEARSTEREO 2
170 
173 #define LENGTH_SETVOLUME 3
174 
177 #define LENGTH_SETVOLUMEMUTE 2
178 
181 #define LENGTH_SETBEEPPARAM 3
182 
185 #define LENGTH_SETRENDERINGCLK 2
186 
189 #define LENGTH_INIT_SOUNDEFFECT 3
190 
193 #define LENGTH_START_SOUNDEFFECT 2
194 
197 #define LENGTH_STOP_SOUNDEFFECT 2
198 
201 #define LENGTH_SET_THROUGH_PATH 4
202 
205 #define LENGTH_SETSPDRVMODE 2
206 
214 #define AS_ECODE_OK 0x00
215 
218 #define AS_ECODE_STATE_VIOLATION 0x01
219 
222 #define AS_ECODE_PACKET_LENGTH_ERROR 0x02
223 
226 #define AS_ECODE_COMMAND_CODE_ERROR 0x03
227 
230 #define AS_ECODE_COMMAND_NOT_SUPPOT 0x04
231 
234 #define AS_ECODE_AUDIO_POWER_ON_ERROR 0x05
235 
238 #define AS_ECODE_AUDIO_POWER_OFF_ERROR 0x06
239 
242 #define AS_ECODE_DSP_LOAD_ERROR 0x07
243 
246 #define AS_ECODE_DSP_UNLOAD_ERROR 0x08
247 
250 #define AS_ECODE_DSP_VERSION_ERROR 0x09
251 
254 #define AS_ECODE_DSP_EXEC_ERROR 0x3b
255 
258 #define AS_ECODE_DSP_STOP_ERROR 0x3c
259 
262 #define AS_ECODE_DSP_SET_ERROR 0x3d
263 
266 #define AS_ECODE_SET_AUDIO_DATA_PATH_ERROR 0x0A
267 
270 #define AS_ECODE_CLEAR_AUDIO_DATA_PATH_ERROR 0x0B
271 
274 #define AS_ECODE_NOT_AUDIO_DATA_PATH 0x0C
275 
278 #define AS_ECODE_DECODER_LIB_INITIALIZE_ERROR 0x0D
279 
282 #define AS_ECODE_ENCODER_LIB_INITIALIZE_ERROR 0x0E
283 
286 #define AS_ECODE_FILTER_LIB_INITIALIZE_ERROR 0x0F
287 
290 #define AS_ECODE_DUMP_INITIALIZE_ERROR 0x10
291 
294 #define AS_ECODE_COMMAND_PARAM_CODEC_TYPE 0x11
295 
298 #define AS_ECODE_COMMAND_PARAM_AREA_INSUFFICIENT 0x12
299 
302 #define AS_ECODE_COMMAND_PARAM_CHANNEL_NUMBER 0x13
303 
306 #define AS_ECODE_COMMAND_PARAM_SAMPLING_RATE 0x14
307 
310 #define AS_ECODE_COMMAND_PARAM_BIT_RATE 0x15
311 
314 #define AS_ECODE_COMMAND_PARAM_BIT_LENGTH 0x16
315 
318 #define AS_ECODE_COMMAND_PARAM_COMPLEXITY 0x17
319 
322 #define AS_ECODE_COMMAND_PARAM_ACTIVE_PLAYER 0x18
323 
326 #define AS_ECODE_COMMAND_PARAM_INPUT_DEVICE 0x19
327 
330 #define AS_ECODE_COMMAND_PARAM_OUTPUT_DEVICE 0x1A
331 
334 #define AS_ECODE_COMMAND_PARAM_INPUT_HANDLER 0x1B
335 
338 #define AS_ECODE_COMMAND_PARAM_OUTPUT_HANDLER 0x1C
339 
342 #define AS_ECODE_COMMAND_PARAM_CALLBACK 0x1D
343 
346 #define AS_ECODE_COMMAND_PARAM_FUNCTION_ENABLE 0x1E
347 
350 #define AS_ECODE_COMMAND_PARAM_CONFIG_TABLE 0x1F
351 
354 #define AS_ECODE_COMMAND_PARAM_WITH_MFE 0x20
355 
358 #define AS_ECODE_COMMAND_PARAM_WITH_MPP 0x21
359 
362 #define AS_ECODE_COMMAND_PARAM_OUTPUT_DATE 0x22
363 
366 #define AS_ECODE_COMMAND_PARAM_SELECT_MIC 0x23
367 
370 #define AS_ECODE_COMMAND_PARAM_MIC_GAIN 0x24
371 
374 #define AS_ECODE_COMMAND_PARAM_I2S_ID 0x25
375 
378 #define AS_ECODE_COMMAND_PARAM_BYPASS_MODE 0x26
379 
382 #define AS_ECODE_COMMAND_PARAM_VOLLUME 0x27
383 
386 #define AS_ECODE_COMMAND_PARAM_INPUT_DB 0x28
387 
390 #define AS_ECODE_COMMAND_PARAM_MASTER_DB 0x29
391 
394 #define AS_ECODE_COMMAND_PARAM_BEEP_FREQ 0x2A
395 
398 #define AS_ECODE_DMAC_INITIALIZE_ERROR 0x2B
399 
402 #define AS_ECODE_DMAC_READ_ERROR 0x2C
403 
406 #define AS_ECODE_DMAC_WRITE_ERROR 0x2D
407 
410 #define AS_ECODE_CHECK_MEMORY_POOL_ERROR 0x2E
411 
414 #define AS_ECODE_SIMPLE_FIFO_UNDERFLOW 0x2F
415 
418 #define AS_ECODE_SET_MIC_GAIN_ERROR 0x30
419 
422 #define AS_ECODE_SET_I2S_PARAM_ERROR 0x31
423 
426 #define AS_ECODE_SET_OUTPUT_SELECT_ERROR 0x32
427 
430 #define AS_ECODE_INIT_CLEAR_STEREO_ERROR 0x33
431 
434 #define AS_ECODE_SET_VOLUME_ERROR 0x34
435 
438 #define AS_ECODE_SET_VOLUME_MUTE_ERROR 0x35
439 
442 #define AS_ECODE_SET_BEEP_ERROR 0x36
443 
446 #define AS_ECODE_QUEUE_OPERATION_ERROR 0x37
447 
450 #define AS_ECODE_INTERNAL_COMMAND_CODE_ERROR 0x38
451 
454 #define AS_ECODE_COMMAND_PARAM_RENDERINGCLK 0x39
455 
458 #define AS_ECODE_SET_RENDERINGCLK_ERROR 0x3A
459 
462 #define AS_ECODE_COMMAND_PARAM_SETSPDRVMODE 0x3B
463 
466 #define AS_ECODE_SET_SPDRVMODE_ERROR 0x3C
467 
470 #define AS_ECODE_SET_MICMAP_ERROR 0x3D
471 
474 #define AS_ECODE_OBJECT_NOT_AVAILABLE_ERROR 0x3E
475 
478 /****************************************************************************
479  * Public Types
480  ****************************************************************************/
481 
484 typedef struct
485 {
488  uint8_t reserved;
489 
492  uint8_t sub_code;
493 
496  uint8_t command_code;
497 
500  uint8_t packet_length;
502 
505 typedef struct
506 {
509  uint8_t instance_id;
510 
513  uint8_t sub_code;
514 
517  uint8_t result_code;
518 
521  uint8_t packet_length;
523 
526 typedef struct
527 {
549  uint8_t mic_map[AS_MIC_CHANNEL_MAX];
550 
552 
555 typedef struct
556 {
563  int16_t mic_gain[AS_MIC_CHANNEL_MAX];
565 
568 typedef enum
569 {
570  AS_I2S1,
571  AS_I2S2
572 } AsI2sId;
573 
574 typedef enum
575 {
576  AS_I2S_BYPASS_MODE_DISABLE,
577  AS_I2S_BYPASS_MODE_ENABLE
578 } AsI2SBypassMode;
579 
580 typedef struct
581 {
586  uint8_t i2s_id;
587 
593  uint8_t bypass_mode_en;
594  uint16_t reserved2;
595 
598  uint32_t rate;
599 } InitI2SParam;
600 
603 typedef enum
604 {
608 
612 
616 } AsOutDevice;
617 
618 typedef struct
619 {
626  uint8_t reserved1;
627  uint16_t reserved2;
629 
634 typedef enum
635 {
636  AS_DNC_MODE_A,
637  AS_DNC_MODE_B,
638  AS_DNC_MODE_C
639 } AsDncMode;
640 
641 typedef struct
642 {
648  uint8_t mode;
649  uint8_t reserved1;
650  uint16_t reserved2;
651 } InitDNCParam;
652 
655 typedef struct {
658  uint8_t cs_en;
659  uint8_t reserved1;
660 
667  int16_t cs_vol;
669 
672 typedef struct
673 {
680  int16_t master_db;
681  uint16_t reserved1;
682 
689  int16_t input1_db;
690 
697  int16_t input2_db;
699 
702 typedef struct
703 {
709  uint8_t master_mute;
710 
713  uint8_t input1_mute;
714 
717  uint8_t input2_mute;
718  uint8_t reserved1;
720 
723 typedef struct
724 {
730  uint8_t beep_en;
731  uint8_t reserved1;
732  uint16_t reserved2;
733 
740  int16_t beep_vol;
741 
748  uint16_t beep_freq;
749 } SetBeepParam;
750 
753 typedef struct
754 {
761  uint8_t reserved1;
762  uint8_t reserved2;
763  uint8_t reserved3;
764 } PowerOnParam;
765 
768 typedef struct
769 {
775  uint8_t clk_mode;
776  uint8_t reserved1;
777  uint8_t reserved2;
778  uint8_t reserved3;
780 
783 typedef struct
784 {
790  uint8_t mode;
791  uint8_t reserved1;
792  uint8_t reserved2;
793  uint8_t reserved3;
795 
798 typedef enum
799 {
800  AS_CLKMODE_NORMAL,
801  AS_CLKMODE_HIRES
802 } AsClkMode;
803 
806 typedef enum
807 {
811 
817  AS_SOUNDEFFECT_NUM
819 
822 typedef enum
823 {
827 
831  AS_STARTSOUNDEFFECT_MODE_NUM
833 
836 typedef enum
837 {
838  AS_THROUGH_PATH_IN_MIC = 0,
839  AS_THROUGH_PATH_IN_I2S1,
840  AS_THROUGH_PATH_IN_I2S2,
841  AS_THROUGH_PATH_IN_MIXER,
842  AS_THROUGH_PATH_IN_NUM
844 
847 typedef enum
848 {
849  AS_THROUGH_PATH_OUT_MIXER1 = 0,
850  AS_THROUGH_PATH_OUT_MIXER2,
851  AS_THROUGH_PATH_OUT_I2S1,
852  AS_THROUGH_PATH_OUT_I2S2,
853  AS_THROUGH_PATH_OUT_NUM
855 
858 typedef enum
859 {
860  AS_SP_DRV_MODE_LINEOUT = 0,
861  AS_SP_DRV_MODE_1DRIVER,
862  AS_SP_DRV_MODE_2DRIVER,
863  AS_SP_DRV_MODE_4DRIVER,
864  AS_SP_DRV_MODE_NUM
865 } AsSpDrvMode;
866 
869 typedef struct
870 {
876  bool en;
877 
883  uint8_t in;
884 
890  uint8_t out;
891 
892 } AsThroughPath;
893 
896 typedef struct
897 {
901 
905 
907 
908 #ifdef AS_FEATURE_OUTPUTMIX_ENABLE
909 
912 typedef struct
913 {
916  uint8_t player_id;
917 
918  int8_t direction;
919 
920  uint32_t times;
921 
923 
926 typedef struct
927 {
928  uint8_t player_id;
929 
930  AsInitPostProc initpp_param;
931 
933 
936 typedef struct
937 {
938  uint8_t player_id;
939 
940  AsSetPostProc setpp_param;
941 
943 
944 #endif
945 
946 #ifdef AS_FEATURE_FRONTEND_ENABLE
947 
948 typedef enum
949 {
954 
959 
961 
964 typedef struct
965 {
969  uint8_t ch_num;
970 
974  uint8_t bit_length;
975 
979  uint16_t samples;
980 
986  uint32_t out_fs;
987 
993  uint8_t preproc_type;
994 
998  char preprocess_dsp_path[AS_PREPROCESS_FILE_PATH_LEN];
999 
1005  uint8_t data_dest;
1006 
1008 
1009 #endif
1010 
1011 #ifdef AS_FEATURE_RECOGNIZER_ENABLE
1012 
1015 typedef struct
1016 {
1022  uint8_t input_device;
1023 
1024 } AsSetRecognizerStatus;
1025 
1028 typedef void (*RecognizerFindCallback)(AsRecognitionInfo info);
1029 
1030 typedef struct
1031 {
1035  uint8_t recognizer_type;
1036 
1040  char recognizer_dsp_path[AS_RECOGNIZER_FILE_PATH_LEN];
1041 
1044  RecognizerFindCallback fcb;
1045 
1046 } AsInitRecognizer;
1047 
1050 typedef struct
1051 {
1052  uint32_t reserve;
1053 
1054 } AsStartRecognizer;
1055 
1058 typedef struct
1059 {
1060  uint32_t reserve;
1061 
1062 } AsStopRecognizer;
1063 #endif /* AS_FEATURE_RECOGNIZER_ENABLE */
1064 
1067 #if defined(__CC_ARM)
1068 #pragma anon_unions
1069 #endif
1070 
1071 typedef struct
1072 {
1076  union
1077  {
1078 #ifdef AS_FEATURE_EFFECTOR_ENABLE
1079 
1084  StartBBParam start_bb_param;
1085 
1091  StopBBParam stop_bb_param;
1092 
1098  SetBaseBandStatusParam set_baseband_status_param;
1099 #endif
1100 #ifdef AS_FEATURE_PLAYER_ENABLE
1101 
1105  SetPlayerStsParam set_player_sts_param;
1106 
1110  PlayerCommand player;
1111 
1112 #endif
1113 #ifdef AS_FEATURE_OUTPUTMIX_ENABLE
1114 
1119 
1125 
1131 
1132 #endif
1133 #ifdef AS_FEATURE_FRONTEND_ENABLE
1134 
1140 
1146 
1152 
1153 #endif
1154 #ifdef AS_FEATURE_RECORDER_ENABLE
1155 
1160  AsActivateRecorderParam set_recorder_status_param;
1161 
1165  RecorderCommand recorder;
1166 
1167 #endif
1168 #ifdef AS_FEATURE_RECOGNIZER_ENABLE
1169 
1174  AsSetRecognizerStatus set_recognizer_status_param;
1175 
1180  AsInitRecognizer init_recognizer;
1181 
1186  AsStartRecognizer start_recognizer;
1187 
1192  AsStopRecognizer stop_recognizer;
1193 
1198  AsInitRecognizerProcParam init_rcg_param;
1199 
1204  AsSetRecognizerProcParam set_rcg_param;
1205 
1206 #endif
1207 
1213 
1219 
1226 
1232 
1239 
1246 
1252 
1258 
1264 
1270 
1276 
1282 
1288  };
1289 
1290 #ifdef __cplusplus
1291  uint8_t getCode(void)
1292  {
1293  return header.command_code;
1294  }
1295  bool isStateChange(void)
1296  {
1297  return ((getCode() & 0x40) != 0);
1298  }
1299 #endif
1300 
1301 #if !defined(__CC_ARM)
1302 } AudioCommand ;
1303 #else
1304 } AudioCommand __attribute__((transparent_union));
1305 #endif
1306 
1307 
1308 /* Result Structures */
1309 
1310 /* NotifyStatus */
1311 
1314 typedef enum
1315 {
1319 
1323 
1327 
1331 
1335 
1339 
1343 
1344  AS_MNG_STATUS_NUM
1345 } AsMngStatus;
1346 
1349 typedef enum
1350 {
1354 
1358 
1362 
1366 
1370 
1374 
1378 
1382 
1386 
1390 
1394  AS_MNG_SUB_STATUS_NUM
1395 } AsMngSubStatus;
1396 
1401 typedef enum
1402 {
1406 
1410  AS_VAD_STATUS_NUM
1411 } AsVadStatus;
1412 
1415 typedef enum
1416 {
1420 
1424 
1428 
1432 
1436 
1440 
1441  AS_STATUS_CHANGED_STS_NUM
1443 
1449 typedef enum
1450 {
1454 
1457 
1461 
1465 
1469 
1473 
1477 
1481 
1485 
1489 
1493 
1497 
1501 
1505 
1509 
1513  AS_MODULE_ID_NUM,
1514 } AsModuleId;
1515 
1520 typedef enum
1521 {
1525 
1529 
1533 } AsErrorCode_e;
1534 
1537 typedef enum
1538 {
1542 
1546 
1550  AS_VOLUMEMUTE_NUM
1551 } AsVolumeMute;
1552 
1555 typedef enum
1556 {
1560 
1564  AS_BEEPEN_NUM
1565 } asBeepEn;
1566 
1569 typedef struct
1570 {
1576  uint8_t vad_status;
1577 
1580  uint8_t reserved;
1581 
1588 
1594  uint8_t status_info;
1595 } NotifyStatus;
1596 
1599 typedef struct
1600 {
1607 
1610  uint8_t reserved1;
1611 
1614  uint8_t reserved2;
1615 
1618  uint8_t reserved3;
1620 
1623 typedef struct
1624 {
1627  uint32_t error_code;
1628 
1631  uint16_t reserved1;
1632 
1635  uint8_t sub_module_id;
1636 
1639  uint8_t module_id;
1640 
1643  uint32_t error_sub_code;
1644 
1647  uint32_t reserved2;
1648 
1653 
1656 #if defined(__CC_ARM)
1657 #pragma anon_unions
1658 #endif
1659 
1660 typedef struct {
1664 
1665  union
1666  {
1672 
1678 
1684  };
1685 
1686 #if !defined(__CC_ARM)
1687 } AudioResult ;
1688 #else
1689 } AudioResult __attribute__((transparent_union));
1690 #endif
1691 
1692 /* Error Code */
1693 /* [T.B.D]
1694  *
1695  * no error = 0
1696  * state error
1697  * paramater error
1698  * timeout
1699  *
1700  */
1701 
1704 typedef struct
1705 {
1708  uint8_t app;
1709 
1712  uint8_t mng;
1713 
1716  uint8_t player_main;
1717 
1720  uint8_t player_sub;
1721 
1724  uint8_t micfrontend;
1725 
1728  uint8_t recorder;
1729 
1732  uint8_t mixer;
1733 
1736  uint8_t effector;
1737 
1740  uint8_t recognizer;
1742 
1743 /****************************************************************************
1744  * Public Data
1745  ****************************************************************************/
1746 
1747 /****************************************************************************
1748  * Inline Functions
1749  ****************************************************************************/
1750 
1751 /****************************************************************************
1752  * Public Function Prototypes
1753  ****************************************************************************/
1754 
1763 int AS_SendAudioCommand(AudioCommand* packet);
1764 
1773 int AS_ReceiveAudioResult(AudioResult* packet);
1774 
1789 int AS_ReceiveAudioResult(FAR AudioResult *packet, uint8_t id, uint32_t tmo);
1790 
1800 
1811 __attribute__((deprecated("\nDeprecated attention callback type is used. \
1812  \nPlease use \"AudioAttentionCb\" as callback type. \
1813  \n")))
1814 int AS_CreateAudioManager(AudioSubSystemIDs ids, obs_AudioAttentionCb obs_att_cb);
1815 
1822 int AS_DeleteAudioManager(void);
1823 
1826 #endif /* __MODULES_INCLUDE_AUDIO_AUDIO_HIGH_LEVEL_API_H */
1827 
Definition: audio_effector_api.h:450
uint8_t result_code
[out] result code
Definition: audio_high_level_api.h:517
RecorderReady.
Definition: audio_high_level_api.h:1369
to PowerOff
Definition: audio_high_level_api.h:1435
SetVolumeMuteParam set_volume_mute_param
[in] for SetVolumeMute (header.command_code==AUDCMD_SETVOLUMEMUTE)
Definition: audio_high_level_api.h:1257
Play effect sound infinitely.
Definition: audio_high_level_api.h:830
uint8_t instance_id
[out] instance id
Definition: audio_high_level_api.h:509
SetSpDrvModeParam set_sp_drv_mode
[in] for SetSpDrvMode (header.command_code==AUDCMD_SETSPDRVMODE)
Definition: audio_high_level_api.h:1287
Definition: audio_high_level_api.h:672
Filter Component ID.
Definition: audio_high_level_api.h:1500
SetBeepParam set_beep_param
[in] for SetBeep (header.command_code==AUDCMD_SETBEEPPARAM)
Definition: audio_high_level_api.h:1263
Definition: audio_frontend_api.h:293
int16_t master_db
[in] Set Master Volume
Definition: audio_high_level_api.h:680
AsStatusChangedSts
Definition: audio_high_level_api.h:1415
Definition: audio_high_level_api.h:526
uint8_t vad_status
VAD status.
Definition: audio_high_level_api.h:1576
int AS_CreateAudioManager(AudioSubSystemIDs ids, AudioAttentionCb att_cb)
Activate AudioSubSystem.
uint8_t command_code
[in] Command code
Definition: audio_high_level_api.h:496
CXD5602 Audio OutputMix API.
Out of voice section.
Definition: audio_high_level_api.h:1405
int16_t cs_vol
[in] Set ClearStero Volume
Definition: audio_high_level_api.h:667
AsInitMediaPlayerPost init_mpp_param
[in] for InitMPP (header.command_code==AUDCMD_INITMPP)
Definition: audio_high_level_api.h:1124
bool en
Select direct path Enable/Disable.
Definition: audio_high_level_api.h:876
Enable effect sound.
Definition: audio_high_level_api.h:816
InitI2SParam init_i2s_param
[in] for InitI2SParam (header.command_code==AUDCMD_INITI2SPARAM)
Definition: audio_high_level_api.h:1225
Player.
Definition: audio_high_level_api.h:1326
uint8_t beep_en
[in] Select BEEP Enable/Disable
Definition: audio_high_level_api.h:730
AudioResultHeader header
[out] Result Header
Definition: audio_high_level_api.h:1663
PowerOff.
Definition: audio_high_level_api.h:1338
Definition: audio_high_level_api.h:1660
Input Data Manager Object ID.
Definition: audio_high_level_api.h:1464
Definition: audio_high_level_api.h:723
uint8_t packet_length
[in] packet length
Definition: audio_high_level_api.h:500
Definition: audio_player_api.h:369
AsMngSubStatus
Definition: audio_high_level_api.h:1349
CXD5602 Audio Capture API.
PlayPause.
Definition: audio_high_level_api.h:1365
Disable effect sound.
Definition: audio_high_level_api.h:810
AsSetPreProcParam set_preproc_param
[in] for SetPreProcessDSP (header.command_code==AUDCMD_SET_PREPROCESS_DSP)
Definition: audio_high_level_api.h:1151
int16_t input1_db
[in] Set Input1 Volume
Definition: audio_high_level_api.h:689
Definition: audio_high_level_api.h:702
InitDNCParam init_dnc_param
[in] for InitDNCParam (header.command_code==AUDCMD_INITDNCPARAM)
Definition: audio_high_level_api.h:1238
Definition: audio_recognizer_api.h:260
uint8_t sub_status_info
[out] Current Sub Status
Definition: audio_high_level_api.h:1587
Definition: audio_high_level_api.h:964
#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:713
uint32_t error_code
Error Infomation, T.B.D.
Definition: audio_high_level_api.h:1627
beep enable
Definition: audio_high_level_api.h:1563
Audio Manager Module ID.
Definition: audio_high_level_api.h:1453
[in] Send audio data to Recognizer
Definition: audio_high_level_api.h:958
CXD5602 Audio Command ID.
ErrorResponseParam error_response_param
[out] for ErrorResponse (header.result_code==AUDRLT_ERRORRESPONSE)
Definition: audio_high_level_api.h:1683
beep disable
Definition: audio_high_level_api.h:1559
to Ready
Definition: audio_high_level_api.h:1419
fail to create task
Definition: audio_high_level_api.h:1528
uint8_t reserved3
reserved
Definition: audio_high_level_api.h:1618
BaseBandReady.
Definition: audio_high_level_api.h:1385
asBeepEn
Definition: audio_high_level_api.h:1555
uint8_t mng
[in] MsgQueID of audio_manager
Definition: audio_high_level_api.h:1712
Definition: audio_high_level_api.h:580
uint8_t recorder
[in] MsgQueID of recorderObject
Definition: audio_high_level_api.h:1728
AsSetThroughPathParam set_through_path
[in] for SetThrouhgPath (header.command_code==AUDCMD_SETTHROUGHPATH)
Definition: audio_high_level_api.h:1275
#define LENGTH_AUDRLT_ERRORRESPONSE_MIN
Definition: audio_high_level_api.h:100
Media Recorder Object ID.
Definition: audio_high_level_api.h:1468
void(* AudioAttentionCb)(const ErrorAttentionParam *attparam)
Definition: audio_common_defs.h:721
uint8_t cs_en
[in] Select ClearStereo Enable/Disable, 1:Enable, 0:Disable.
Definition: audio_high_level_api.h:658
Definition: audio_high_level_api.h:555
AsVadStatus
Definition: audio_high_level_api.h:1401
Definition: audio_high_level_api.h:869
uint8_t module_id
[out] Error module infomation, T.B.D.
Definition: audio_high_level_api.h:1639
Definition: audio_high_level_api.h:655
AsOutDevice
Definition: audio_high_level_api.h:603
Definition: audio_high_level_api.h:607
RecorderActive.
Definition: audio_high_level_api.h:1373
Definition: audio_high_level_api.h:1599
Renderer Component ID.
Definition: audio_high_level_api.h:1508
AsVolumeMute
Definition: audio_high_level_api.h:1537
Definition: audio_high_level_api.h:896
uint8_t input2_mute
[in] Set Input2 Volume Mute/UnMute
Definition: audio_high_level_api.h:717
NotifyStatus notify_status
[out] for NotifyStatus (header.result_code==AUDRLT_NOTIFYSTATUS)
Definition: audio_high_level_api.h:1671
int16_t input2_db
[in] Set Input2 Volume
Definition: audio_high_level_api.h:697
Definition: audio_high_level_api.h:1569
uint8_t micfrontend
[in] MsgQueID of FrontendObject
Definition: audio_high_level_api.h:1724
Definition: audio_high_level_api.h:618
PlayActive.
Definition: audio_high_level_api.h:1361
Through.
Definition: audio_high_level_api.h:1342
CXD5602 Audio Mic Frontend API.
uint8_t effector
[in] MsgQueID of effectorObject
Definition: audio_high_level_api.h:1736
illegal state
Definition: audio_high_level_api.h:1532
uint16_t beep_freq
[in] Set BEEP Frequency
Definition: audio_high_level_api.h:748
Capture Component ID.
Definition: audio_high_level_api.h:1488
Ready.
Definition: audio_high_level_api.h:1318
unmute
Definition: audio_high_level_api.h:1545
None.
Definition: audio_high_level_api.h:1353
AsModuleId
Definition: audio_high_level_api.h:1449
uint8_t sub_code
[in] sub
Definition: audio_high_level_api.h:492
Output Mix Object ID.
Definition: audio_high_level_api.h:1472
AudioCommandHeader header
[in] Command Header
Definition: audio_high_level_api.h:1075
uint8_t in
input path
Definition: audio_high_level_api.h:883
uint16_t reserved1
[out] reserved
Definition: audio_high_level_api.h:1631
SetRenderingClkParam set_renderingclk_param
[in] for SetRenderingClk (header.command_code==AUDCMD_SETRENDERINGCLK)
Definition: audio_high_level_api.h:1281
success
Definition: audio_high_level_api.h:1524
uint8_t reserved
[out] reserved
Definition: audio_high_level_api.h:1580
uint8_t ch_num
[in] Select InitMicFrontend input channels
Definition: audio_high_level_api.h:969
uint16_t samples
[in] Samples per a frame
Definition: audio_high_level_api.h:979
uint32_t error_sub_code
[out] Detailed Error Infomation, T.B.D.
Definition: audio_high_level_api.h:1643
uint8_t status_info
[out] Current Status
Definition: audio_high_level_api.h:1594
Definition: audio_effector_api.h:401
CXD5602 Audio Common Definitions.
uint8_t player_main
[in] MsgQueID of playerObject
Definition: audio_high_level_api.h:1716
uint8_t player_sub
[in] MsgQueID of playerObject for Sound Effect
Definition: audio_high_level_api.h:1720
uint8_t mode
[in] set speaker driver mode
Definition: audio_high_level_api.h:790
Definition: audio_player_api.h:540
uint8_t bit_length
[in] Select InitMicFrontend input bit length
Definition: audio_high_level_api.h:974
AsPlayerClockRecovery clk_recovery_param
[in] for Adjust sound period (header.command_code==AUDCMD_CLKRECOVERY)
Definition: audio_high_level_api.h:1118
Definition: audio_effector_api.h:483
Inside voice section.
Definition: audio_high_level_api.h:1409
Recorder.
Definition: audio_high_level_api.h:1330
Recognition Component ID.
Definition: audio_high_level_api.h:1504
Baseband.
Definition: audio_high_level_api.h:1322
AsThroughPath path2
[in] path2
Definition: audio_high_level_api.h:904
AsInitPreProcParam init_preproc_param
[in] for InitPreProcessDSP (header.command_code==AUDCMD_INIT_PREPROCESS_DSP)
Definition: audio_high_level_api.h:1145
keep setting
Definition: audio_high_level_api.h:1541
__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:709
uint8_t mode
[in] Select DNC mode
Definition: audio_high_level_api.h:648
CXD5602 Audio Player API.
PowerOnParam power_on_param
[in] for PowerOn (header.command_code==AUDCMD_POWERON)
Definition: audio_high_level_api.h:1269
PlayReady.
Definition: audio_high_level_api.h:1357
uint8_t reserved1
reserved
Definition: audio_high_level_api.h:1610
Definition: audio_high_level_api.h:1623
AsThroughPathIn
Definition: audio_high_level_api.h:836
to BaseBand
Definition: audio_high_level_api.h:1423
uint8_t recognizer
[in] MsgQueID of recognizerObject
Definition: audio_high_level_api.h:1740
uint8_t data_dest
[in] Select Data path from MicFrontend
Definition: audio_high_level_api.h:1005
to Recorder
Definition: audio_high_level_api.h:1431
Audio Baseband Driver Module ID.
Definition: audio_high_level_api.h:1456
Sound Effect Object ID.
Definition: audio_high_level_api.h:1484
uint8_t sub_module_id
[out] for debug purpose
Definition: audio_high_level_api.h:1635
uint32_t rate
[in] Set I2S input/output frequency
Definition: audio_high_level_api.h:598
AsFrontendDataDest
Definition: audio_high_level_api.h:948
Definition: audio_high_level_api.h:1704
AsEnableSoundEffectFunc
Definition: audio_high_level_api.h:806
SetVolumeParam set_volume_param
[in] for SetVolume (header.command_code==AUDCMD_SETVOLUME)
Definition: audio_high_level_api.h:1251
Definition: audio_high_level_api.h:484
Definition: audio_high_level_api.h:926
uint8_t bypass_mode_en
[in] Select I2S Bypass mode disable/enable
Definition: audio_high_level_api.h:593
AsClkMode
Definition: audio_high_level_api.h:798
uint32_t reserved2
[out] reserved
Definition: audio_high_level_api.h:1647
AsMngStatus
Definition: audio_high_level_api.h:1314
#define AS_MIC_CHANNEL_MAX
Definition: audio_common_defs.h:84
InitMicGainParam init_mic_gain_param
[in] for InitMicGain (header.command_code==AUDCMD_INITMICGAIN)
Definition: audio_high_level_api.h:1218
uint8_t mixer
[in] MsgQueID of mixerObject
Definition: audio_high_level_api.h:1732
Definition: audio_high_level_api.h:753
Definition: audio_high_level_api.h:611
AsThroughPath path1
[in] path1
Definition: audio_high_level_api.h:900
mute
Definition: audio_high_level_api.h:1549
uint8_t preproc_type
[in] Select pre process enable
Definition: audio_high_level_api.h:993
AsErrorCode_e
Definition: audio_high_level_api.h:1520
Recognition Object ID.
Definition: audio_high_level_api.h:1480
uint8_t out
output path
Definition: audio_high_level_api.h:890
AsThroughPathOut
Definition: audio_high_level_api.h:847
Recorder.
Definition: audio_high_level_api.h:1334
uint8_t app
[in] MsgQueID of Application
Definition: audio_high_level_api.h:1708
uint8_t i2s_id
[in] Select I2S ID Use AsI2sId enum type
Definition: audio_high_level_api.h:586
uint8_t player_id
[in] Handle of OutputMixer
Definition: audio_high_level_api.h:916
InitOutputSelectParam init_output_select_param
[in] for InitOutputSelect (header.command_code==AUDCMD_INITOUTPUTSELECT)
Definition: audio_high_level_api.h:1231
AsDncMode
InitDNCParam Command (AUDCMD_INITDNCPARAM) parameter.
Definition: audio_high_level_api.h:634
Definition: audio_high_level_api.h:783
SetMicMapParam set_mic_map_param
[in] for SetMicMap (header.command_code==AUDCMD_SETMICMAP)
Definition: audio_high_level_api.h:1212
int16_t beep_vol
[in] Set BEEP Volume
Definition: audio_high_level_api.h:740
AsStartSoundEffectMode
Definition: audio_high_level_api.h:822
RecognizerActive.
Definition: audio_high_level_api.h:1381
Player Object ID.
Definition: audio_high_level_api.h:1476
uint8_t sub_code
[out] sub code
Definition: audio_high_level_api.h:513
StatusChangedParam status_changed_param
[out] for StatusChanged (header.result_code==AUDRLT_STATUSCHANGED)
Definition: audio_high_level_api.h:1677
RecognizerReady.
Definition: audio_high_level_api.h:1377
Definition: audio_high_level_api.h:641
Decoder Component ID.
Definition: audio_high_level_api.h:1492
Definition: audio_common_defs.h:649
Encoder Component ID.
Definition: audio_high_level_api.h:1496
#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:1393
Definition: audio_high_level_api.h:1071
InitClearStereoParam init_clear_stereo_param
[in] for InitClearStereo (header.command_code==AUDCMD_INITCLEARSTEREO)
Definition: audio_high_level_api.h:1245
Definition: audio_high_level_api.h:768
CXD5602 Audio Recorder API.
uint32_t out_fs
[in] Output Fs
Definition: audio_high_level_api.h:986
int AS_DeleteAudioManager(void)
Deactivate AudioSubSystem.
AsSpDrvMode
Definition: audio_high_level_api.h:858
Definition: audio_recorder_api.h:239
uint8_t reserved2
reserved
Definition: audio_high_level_api.h:1614
int AS_SendAudioCommand(AudioCommand *packet)
Send Audio Command.
Definition: audio_outputmix_api.h:350
Definition: audio_high_level_api.h:936
[in] Send audio data to Recorder
Definition: audio_high_level_api.h:953
AsSetMediaPlayerPost set_mpp_param
[in] for SetMPPParam (header.command_code==AUDCMD_SETMPPPARAM)
Definition: audio_high_level_api.h:1130
uint8_t enable_sound_effect
[in] Enable or disable sound-effect playback function.
Definition: audio_high_level_api.h:760
uint8_t packet_length
[out] packet length
Definition: audio_high_level_api.h:521
uint8_t reserved
[in] reserved
Definition: audio_high_level_api.h:488
uint8_t output_device_sel
[in] Select CXD5247 output devices
Definition: audio_high_level_api.h:625
AsI2sId
Definition: audio_high_level_api.h:568
Definition: audio_high_level_api.h:912
FrontEnd Object ID.
Definition: audio_high_level_api.h:1460
BaseBandActive.
Definition: audio_high_level_api.h:1389
uint8_t changed_status
[out] Changed status
Definition: audio_high_level_api.h:1606
uint8_t clk_mode
[in] set rendering clock
Definition: audio_high_level_api.h:775
to Through
Definition: audio_high_level_api.h:1439
Definition: audio_recorder_api.h:337
#define LENGTH_AUDRLT_ERRORRESPONSE_MAX
Definition: audio_high_level_api.h:96
Definition: audio_high_level_api.h:505
Definition: audio_high_level_api.h:615
to Player
Definition: audio_high_level_api.h:1427
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:1139
Play effect sound with limited data.
Definition: audio_high_level_api.h:826
Postfilter Component ID.
Definition: audio_high_level_api.h:1512