Developer World
Spresense SDK Library v3.2.0-ebc0364
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
63#ifdef CONFIG_AUDIOUTILS_PLAYER
67#endif
68#ifdef CONFIG_AUDIOUTILS_RECORDER
72#endif
73#ifdef CONFIG_AUDIOUTILS_SOUND_RECOGNIZER
78#endif
79#ifdef CONFIG_AUDIOUTILS_SYNTHESIZER
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
492typedef struct
493{
496 uint8_t reserved;
497
500 uint8_t sub_code;
501
505
510
513typedef struct
514{
517 uint8_t instance_id;
518
521 uint8_t sub_code;
522
525 uint8_t result_code;
526
531
534typedef struct
535{
557 uint8_t mic_map[AS_MIC_CHANNEL_MAX];
558
560
563typedef struct
564{
571 int16_t mic_gain[AS_MIC_CHANNEL_MAX];
573
576typedef enum
577{
578 AS_I2S1,
579 AS_I2S2
580} AsI2sId;
581
582typedef enum
583{
584 AS_I2S_BYPASS_MODE_DISABLE,
585 AS_I2S_BYPASS_MODE_ENABLE
586} AsI2SBypassMode;
587
588typedef struct
589{
594 uint8_t i2s_id;
595
602 uint16_t reserved2;
603
606 uint32_t rate;
608
611typedef enum
612{
616
620
625
626typedef struct
627{
634 uint8_t reserved1;
635 uint16_t reserved2;
637
642typedef enum
643{
644 AS_DNC_MODE_A,
645 AS_DNC_MODE_B,
646 AS_DNC_MODE_C
647} AsDncMode;
648
649typedef struct
650{
656 uint8_t mode;
657 uint8_t reserved1;
658 uint16_t reserved2;
660
663typedef struct {
666 uint8_t cs_en;
667 uint8_t reserved1;
668
675 int16_t cs_vol;
677
680typedef struct
681{
688 int16_t master_db;
689 uint16_t reserved1;
690
697 int16_t input1_db;
698
705 int16_t input2_db;
707
710typedef struct
711{
717 uint8_t master_mute;
718
721 uint8_t input1_mute;
722
725 uint8_t input2_mute;
726 uint8_t reserved1;
728
731typedef 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;
758
761typedef struct
762{
769 uint8_t reserved1;
770 uint8_t reserved2;
771 uint8_t reserved3;
773
776typedef struct
777{
783 uint8_t clk_mode;
784 uint8_t reserved1;
785 uint8_t reserved2;
786 uint8_t reserved3;
788
791typedef 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
808typedef enum
809{
810 AS_CLKMODE_NORMAL,
811 AS_CLKMODE_HIRES
812} AsClkMode;
813
816typedef enum
817{
821
827 AS_SOUNDEFFECT_NUM
829
832typedef enum
833{
837
841 AS_STARTSOUNDEFFECT_MODE_NUM
843
846typedef 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
857typedef 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
868typedef 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
876
879typedef struct
880{
886 bool en;
887
893 uint8_t in;
894
900 uint8_t out;
901
903
906typedef struct
907{
911
915
917
918#ifdef AS_FEATURE_OUTPUTMIX_ENABLE
919
920/* Init OutputMixer Command (#AUDCMD_INIT_OUTPUTMIXER) */
921
922typedef struct
923{
924 uint8_t player_id;
925
929
933
935
938typedef struct
939{
942 uint8_t player_id;
943
944 int8_t direction;
945
946 uint32_t times;
947
949
952typedef struct
953{
954 uint8_t player_id;
955
956 AsInitPostProc initpp_param;
957
959
962typedef struct
963{
964 uint8_t player_id;
965
966 AsSetPostProc setpp_param;
967
969
970#endif
971
972#ifdef AS_FEATURE_FRONTEND_ENABLE
973
974typedef enum
975{
980
985
987
990typedef 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
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
1041typedef struct
1042{
1048 uint8_t input_device;
1049
1050} AsSetRecognizerStatus;
1051
1054typedef void (*RecognizerFindCallback)(AsRecognitionInfo info);
1055
1056typedef 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
1076typedef struct
1077{
1078 uint32_t reserve;
1079
1080} AsStartRecognizer;
1081
1084typedef 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
1097typedef struct
1098{
1102 union
1103 {
1104#ifdef AS_FEATURE_EFFECTOR_ENABLE
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
1131 SetPlayerStsParam set_player_sts_param;
1132
1136 PlayerCommand player;
1137
1138#endif
1139#ifdef AS_FEATURE_OUTPUTMIX_ENABLE
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
1347typedef enum
1348{
1352
1356
1360
1364
1368
1372
1376
1377 AS_MNG_STATUS_NUM
1378} AsMngStatus;
1379
1382typedef enum
1383{
1387
1391
1395
1399
1403
1407
1411
1415
1419
1423
1427 AS_MNG_SUB_STATUS_NUM
1429
1434typedef enum
1435{
1439
1443 AS_VAD_STATUS_NUM
1444} AsVadStatus;
1445
1448typedef enum
1449{
1453
1457
1461
1465
1469
1473
1474 AS_STATUS_CHANGED_STS_NUM
1476
1477
1478
1481typedef enum
1482{
1486
1490
1495
1498typedef enum
1499{
1503
1507
1511 AS_VOLUMEMUTE_NUM
1512} AsVolumeMute;
1513
1516typedef enum
1517{
1521
1525 AS_BEEPEN_NUM
1526} asBeepEn;
1527
1530typedef struct
1531{
1537 uint8_t vad_status;
1538
1541 uint8_t reserved;
1542
1549
1556} NotifyStatus;
1557
1560typedef struct
1561{
1568
1571 uint8_t reserved1;
1572
1575 uint8_t reserved2;
1576
1579 uint8_t reserved3;
1581
1584typedef struct
1585{
1588 uint32_t error_code;
1589
1592 uint16_t reserved1;
1593
1597
1600 uint8_t module_id;
1601
1605
1608 uint32_t reserved2;
1609
1614
1617#if defined(__CC_ARM)
1618#pragma anon_unions
1619#endif
1620
1621typedef 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
1665typedef struct
1666{
1669 uint8_t app;
1670
1673 uint8_t mng;
1674
1678
1681 uint8_t player_sub;
1682
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
1725
1735
1750int 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")))
1775int AS_CreateAudioManager(AudioSubSystemIDs ids, obs_AudioAttentionCb obs_att_cb);
1776
1784
1787#endif /* __MODULES_INCLUDE_AUDIO_AUDIO_HIGH_LEVEL_API_H */
1788
CXD5602 Audio Capture API.
CXD5602 Audio Command ID.
CXD5602 Audio Common Definitions.
CXD5602 Audio Mic Frontend API.
CXD5602 Audio OutputMix API.
CXD5602 Audio Player API.
CXD5602 Audio Recognizer API.
CXD5602 Audio Recorder API.
CXD5602 Audio Renderer API.
CXD5602 Audio Synthesizer API.
#define AS_PREPROCESS_FILE_PATH_LEN
Length of Recognizer dsp file name and path.
Definition: audio_frontend_api.h:89
AsThroughPathOut
Definition: audio_high_level_api.h:858
int AS_SendAudioCommand(AudioCommand *packet)
Send Audio Command.
AsMngSubStatus
Definition: audio_high_level_api.h:1383
AsStatusChangedSts
Definition: audio_high_level_api.h:1449
AsDncMode
InitDNCParam Command (AUDCMD_INITDNCPARAM) parameter.
Definition: audio_high_level_api.h:643
AsI2sId
Definition: audio_high_level_api.h:577
__attribute__((deprecated("\nDeprecated attention callback type is used. \ \nPlease use \"AudioAttentionCb\" as callback type. \ \n"))) int AS_CreateAudioManager(AudioSubSystemIDs ids
Activate AudioSubSystem[Deprecated] This API is to make it compatible with old application....
void(* AudioAttentionCb)(const ErrorAttentionParam *attparam)
Definition: audio_common_defs.h:810
AsSpDrvMode
Definition: audio_high_level_api.h:869
AsMngStatus
Definition: audio_high_level_api.h:1348
AsErrorCode_e
Definition: audio_high_level_api.h:1482
asBeepEn
Definition: audio_high_level_api.h:1517
AsOutDevice
Definition: audio_high_level_api.h:612
AsEnableSoundEffectFunc
Definition: audio_high_level_api.h:817
AsVolumeMute
Definition: audio_high_level_api.h:1499
#define AS_MIC_CHANNEL_MAX
Definition: audio_common_defs.h:86
int AS_CreateAudioManager(AudioSubSystemIDs ids, AudioAttentionCb att_cb)
Activate AudioSubSystem.
AsClkMode
Definition: audio_high_level_api.h:809
#define LENGTH_AUDRLT_ERRORRESPONSE_MIN
Definition: audio_high_level_api.h:106
#define LENGTH_AUDRLT_ERRORRESPONSE_MAX
Definition: audio_high_level_api.h:102
int AS_ReceiveAudioResult(AudioResult *packet)
Receive Audio Result.
AsVadStatus
Definition: audio_high_level_api.h:1435
AsFrontendDataDest
Definition: audio_high_level_api.h:975
AsStartSoundEffectMode
Definition: audio_high_level_api.h:833
int AS_DeleteAudioManager(void)
Deactivate AudioSubSystem.
AsThroughPathIn
Definition: audio_high_level_api.h:847
@ AS_MNG_SUB_STATUS_RECORDERREADY
RecorderReady.
Definition: audio_high_level_api.h:1402
@ AS_MNG_SUB_STATUS_PLAYREADY
PlayReady.
Definition: audio_high_level_api.h:1390
@ AS_MNG_SUB_STATUS_NONE
None.
Definition: audio_high_level_api.h:1386
@ AS_MNG_SUB_STATUS_PLAYPAUSE
PlayPause.
Definition: audio_high_level_api.h:1398
@ AS_MNG_SUB_STATUS_RECOGNIZERREADY
RecognizerReady.
Definition: audio_high_level_api.h:1410
@ AS_MNG_SUB_STATUS_BASEBANDREADY
BaseBandReady.
Definition: audio_high_level_api.h:1418
@ AS_MNG_SUB_STATUS_RECORDERACTIVE
RecorderActive.
Definition: audio_high_level_api.h:1406
@ AS_MNG_SUB_STATUS_RECOGNIZERACTIVE
RecognizerActive.
Definition: audio_high_level_api.h:1414
@ AS_MNG_SUB_STATUS_WAITCMDWORD
WaitCommandword.
Definition: audio_high_level_api.h:1426
@ AS_MNG_SUB_STATUS_BASEBANDACTIVE
BaseBandActive.
Definition: audio_high_level_api.h:1422
@ AS_MNG_SUB_STATUS_PLAYACTIVE
PlayActive.
Definition: audio_high_level_api.h:1394
@ AS_STATUS_CHANGED_STS_THROUGH
to Through
Definition: audio_high_level_api.h:1472
@ AS_STATUS_CHANGED_STS_READY
to Ready
Definition: audio_high_level_api.h:1452
@ AS_STATUS_CHANGED_STS_PLAYER
to Player
Definition: audio_high_level_api.h:1460
@ AS_STATUS_CHANGED_STS_BASEBAND
to BaseBand
Definition: audio_high_level_api.h:1456
@ AS_STATUS_CHANGED_STS_RECODER
to Recorder
Definition: audio_high_level_api.h:1464
@ AS_STATUS_CHANGED_STS_POWEROFF
to PowerOff
Definition: audio_high_level_api.h:1468
@ AS_MNG_STATUS_BASEBAND
Baseband.
Definition: audio_high_level_api.h:1355
@ AS_MNG_STATUS_RECOGNIZER
Recorder.
Definition: audio_high_level_api.h:1367
@ AS_MNG_STATUS_READY
Ready.
Definition: audio_high_level_api.h:1351
@ AS_MNG_STATUS_PLAYER
Player.
Definition: audio_high_level_api.h:1359
@ AS_MNG_STATUS_POWEROFF
PowerOff.
Definition: audio_high_level_api.h:1371
@ AS_MNG_STATUS_RECORDER
Recorder.
Definition: audio_high_level_api.h:1363
@ AS_MNG_STATUS_THROUGH
Through.
Definition: audio_high_level_api.h:1375
@ AS_ERR_CODE_TASK_CREATE
fail to create task
Definition: audio_high_level_api.h:1489
@ AS_ERR_CODE_OK
success
Definition: audio_high_level_api.h:1485
@ AS_ERR_CODE_ILLEGAL_STATE
illegal state
Definition: audio_high_level_api.h:1493
@ AS_BEEPEN_ENABLE
beep enable
Definition: audio_high_level_api.h:1524
@ AS_BEEPEN_DISABLE
beep disable
Definition: audio_high_level_api.h:1520
@ AS_OUT_I2S
Definition: audio_high_level_api.h:623
@ AS_OUT_OFF
Definition: audio_high_level_api.h:615
@ AS_OUT_SP
Definition: audio_high_level_api.h:619
@ AS_DISABLE_SOUNDEFFECT
Disable effect sound.
Definition: audio_high_level_api.h:820
@ AS_ENABLE_SOUNDEFFECT
Enable effect sound.
Definition: audio_high_level_api.h:826
@ AS_VOLUMEMUTE_MUTE
mute
Definition: audio_high_level_api.h:1510
@ AS_VOLUMEMUTE_HOLD
keep setting
Definition: audio_high_level_api.h:1502
@ AS_VOLUMEMUTE_UNMUTE
unmute
Definition: audio_high_level_api.h:1506
@ AS_VAD_STATUS_INSIDE_VOICE_SECTION
Inside voice section.
Definition: audio_high_level_api.h:1442
@ AS_VAD_STATUS_OUT_OF_VOICE_SECTION
Out of voice section.
Definition: audio_high_level_api.h:1438
@ AsMicFrontendDataToRecognizer
[in] Send audio data to Recognizer
Definition: audio_high_level_api.h:984
@ AsMicFrontendDataToRecorder
[in] Send audio data to Recorder
Definition: audio_high_level_api.h:979
@ AS_STARTSOUNDEFFECT_NORMAL
Play effect sound with limited data.
Definition: audio_high_level_api.h:836
@ AS_STARTSOUNDEFFECT_INFINITE
Play effect sound infinitely.
Definition: audio_high_level_api.h:840
#define AS_POSTPROC_FILE_PATH_LEN
Length of Recognizer dsp file name and path.
Definition: audio_outputmix_api.h:86
#define AS_RECOGNIZER_FILE_PATH_LEN
Length of Recognizer dsp file name and path.
Definition: audio_recognizer_api.h:93
Definition: audio_recorder_api.h:245
Definition: audio_high_level_api.h:953
Definition: audio_high_level_api.h:991
uint8_t preproc_type
[in] Select pre process enable
Definition: audio_high_level_api.h:1019
uint8_t data_dest
[in] Select Data path from MicFrontend
Definition: audio_high_level_api.h:1031
uint32_t out_fs
[in] Output Fs
Definition: audio_high_level_api.h:1012
uint16_t samples
[in] Samples per a frame
Definition: audio_high_level_api.h:1005
uint8_t ch_num
[in] Select InitMicFrontend input channels
Definition: audio_high_level_api.h:995
uint8_t bit_length
[in] Select InitMicFrontend input bit length
Definition: audio_high_level_api.h:1000
Definition: audio_high_level_api.h:923
uint8_t postproc_type
[in] Set postproc type. Use AsPostprocType enum type
Definition: audio_high_level_api.h:928
Definition: audio_outputmix_api.h:413
Definition: audio_frontend_api.h:295
Definition: audio_recognizer_api.h:261
Definition: audio_high_level_api.h:939
uint8_t player_id
[in] Handle of OutputMixer
Definition: audio_high_level_api.h:942
Definition: audio_common_defs.h:739
Definition: audio_high_level_api.h:963
Definition: audio_high_level_api.h:907
AsThroughPath path1
[in] path1
Definition: audio_high_level_api.h:910
AsThroughPath path2
[in] path2
Definition: audio_high_level_api.h:914
Definition: audio_high_level_api.h:880
uint8_t out
output path
Definition: audio_high_level_api.h:900
uint8_t in
input path
Definition: audio_high_level_api.h:893
bool en
Select direct path Enable/Disable.
Definition: audio_high_level_api.h:886
Definition: audio_high_level_api.h:493
uint8_t packet_length
[in] packet length
Definition: audio_high_level_api.h:508
uint8_t reserved
[in] reserved
Definition: audio_high_level_api.h:496
uint8_t command_code
[in] Command code
Definition: audio_high_level_api.h:504
uint8_t sub_code
[in] sub
Definition: audio_high_level_api.h:500
Definition: audio_high_level_api.h:1098
InitDNCParam init_dnc_param
[in] for InitDNCParam (header.command_code==AUDCMD_INITDNCPARAM)
Definition: audio_high_level_api.h:1270
AsInitMediaPlayerPost init_mpp_param
[in] for InitMPP (header.command_code==AUDCMD_INITMPP)
Definition: audio_high_level_api.h:1156
SetVolumeMuteParam set_volume_mute_param
[in] for SetVolumeMute (header.command_code==AUDCMD_SETVOLUMEMUTE)
Definition: audio_high_level_api.h:1289
AsInitMixerParam init_mixer_param
[in] for Init OutputMixer (header.command_code==AUDCMD_INIT_OUTPUTMIXER)
Definition: audio_high_level_api.h:1144
AudioCommandHeader header
[in] Command Header
Definition: audio_high_level_api.h:1101
AsInitPreProcParam init_preproc_param
[in] for InitPreProcessDSP (header.command_code==AUDCMD_INIT_PREPROCESS_DSP)
Definition: audio_high_level_api.h:1177
InitMicGainParam init_mic_gain_param
[in] for InitMicGain (header.command_code==AUDCMD_INITMICGAIN)
Definition: audio_high_level_api.h:1250
SetBeepParam set_beep_param
[in] for SetBeep (header.command_code==AUDCMD_SETBEEPPARAM)
Definition: audio_high_level_api.h:1295
InitOutputSelectParam init_output_select_param
[in] for InitOutputSelect (header.command_code==AUDCMD_INITOUTPUTSELECT)
Definition: audio_high_level_api.h:1263
AsPlayerClockRecovery clk_recovery_param
[in] for Adjust sound period (header.command_code==AUDCMD_CLKRECOVERY)
Definition: audio_high_level_api.h:1150
AsSetMediaPlayerPost set_mpp_param
[in] for SetMPPParam (header.command_code==AUDCMD_SETMPPPARAM)
Definition: audio_high_level_api.h:1162
PowerOnParam power_on_param
[in] for PowerOn (header.command_code==AUDCMD_POWERON)
Definition: audio_high_level_api.h:1301
AsSetPreProcParam set_preproc_param
[in] for SetPreProcessDSP (header.command_code==AUDCMD_SET_PREPROCESS_DSP)
Definition: audio_high_level_api.h:1183
SetVolumeParam set_volume_param
[in] for SetVolume (header.command_code==AUDCMD_SETVOLUME)
Definition: audio_high_level_api.h:1283
AsSetThroughPathParam set_through_path
[in] for SetThrouhgPath (header.command_code==AUDCMD_SETTHROUGHPATH)
Definition: audio_high_level_api.h:1307
SetMicMapParam set_mic_map_param
[in] for SetMicMap (header.command_code==AUDCMD_SETMICMAP)
Definition: audio_high_level_api.h:1244
SetRenderingClkParam set_renderingclk_param
[in] for SetRenderingClk (header.command_code==AUDCMD_SETRENDERINGCLK)
Definition: audio_high_level_api.h:1313
InitClearStereoParam init_clear_stereo_param
[in] for InitClearStereo (header.command_code==AUDCMD_INITCLEARSTEREO)
Definition: audio_high_level_api.h:1277
InitI2SParam init_i2s_param
[in] for InitI2SParam (header.command_code==AUDCMD_INITI2SPARAM)
Definition: audio_high_level_api.h:1257
InitSpDrvModeParam init_sp_drv_mode
[in] for InitSpDrvMode (header.command_code==AUDCMD_INITSPDRVMODE)
Definition: audio_high_level_api.h:1319
AsInitMicFrontEnd init_micfrontend_param
[in] for InitMicFrontend (header.command_code==AUDCMD_INIT_MICFRONTEND)
Definition: audio_high_level_api.h:1171
Definition: audio_high_level_api.h:514
uint8_t packet_length
[out] packet length
Definition: audio_high_level_api.h:529
uint8_t result_code
[out] result code
Definition: audio_high_level_api.h:525
uint8_t instance_id
[out] instance id
Definition: audio_high_level_api.h:517
uint8_t sub_code
[out] sub code
Definition: audio_high_level_api.h:521
Definition: audio_high_level_api.h:1621
AudioResultHeader header
[out] Result Header
Definition: audio_high_level_api.h:1624
ErrorResponseParam error_response_param
[out] for ErrorResponse (header.result_code==AUDRLT_ERRORRESPONSE)
Definition: audio_high_level_api.h:1644
StatusChangedParam status_changed_param
[out] for StatusChanged (header.result_code==AUDRLT_STATUSCHANGED)
Definition: audio_high_level_api.h:1638
NotifyStatus notify_status
[out] for NotifyStatus (header.result_code==AUDRLT_NOTIFYSTATUS)
Definition: audio_high_level_api.h:1632
Definition: audio_high_level_api.h:1666
uint8_t player_sub
[in] MsgQueID of playerObject for Sound Effect
Definition: audio_high_level_api.h:1681
uint8_t micfrontend
[in] MsgQueID of FrontendObject
Definition: audio_high_level_api.h:1685
uint8_t mng
[in] MsgQueID of audio_manager
Definition: audio_high_level_api.h:1673
uint8_t mixer
[in] MsgQueID of mixerObject
Definition: audio_high_level_api.h:1693
uint8_t effector
[in] MsgQueID of effectorObject
Definition: audio_high_level_api.h:1697
uint8_t player_main
[in] MsgQueID of playerObject
Definition: audio_high_level_api.h:1677
uint8_t app
[in] MsgQueID of Application
Definition: audio_high_level_api.h:1669
uint8_t recognizer
[in] MsgQueID of recognizerObject
Definition: audio_high_level_api.h:1701
uint8_t recorder
[in] MsgQueID of recorderObject
Definition: audio_high_level_api.h:1689
Definition: audio_high_level_api.h:1585
uint32_t error_sub_code
[out] Detailed Error Infomation, T.B.D.
Definition: audio_high_level_api.h:1604
uint8_t module_id
[out] Error module infomation, T.B.D.
Definition: audio_high_level_api.h:1600
uint16_t reserved1
[out] reserved
Definition: audio_high_level_api.h:1592
uint8_t sub_module_id
[out] for debug purpose
Definition: audio_high_level_api.h:1596
uint32_t error_code
Error Infomation, T.B.D.
Definition: audio_high_level_api.h:1588
uint32_t reserved2
[out] reserved
Definition: audio_high_level_api.h:1608
Definition: audio_high_level_api.h:663
uint8_t cs_en
[in] Select ClearStereo Enable/Disable, 1:Enable, 0:Disable.
Definition: audio_high_level_api.h:666
int16_t cs_vol
[in] Set ClearStero Volume
Definition: audio_high_level_api.h:675
Definition: audio_high_level_api.h:650
uint8_t mode
[in] Select DNC mode
Definition: audio_high_level_api.h:656
Definition: audio_high_level_api.h:589
uint8_t i2s_id
[in] Select I2S ID Use AsI2sId enum type
Definition: audio_high_level_api.h:594
uint8_t bypass_mode_en
[in] Select I2S Bypass mode disable/enable
Definition: audio_high_level_api.h:601
uint32_t rate
[in] Set I2S input/output frequency
Definition: audio_high_level_api.h:606
Definition: audio_high_level_api.h:564
Definition: audio_high_level_api.h:627
uint8_t output_device_sel
[in] Select CXD5247 output devices
Definition: audio_high_level_api.h:633
Definition: audio_high_level_api.h:792
uint8_t mode
[in] set speaker driver mode
Definition: audio_high_level_api.h:798
Definition: audio_high_level_api.h:1531
uint8_t vad_status
VAD status.
Definition: audio_high_level_api.h:1537
uint8_t sub_status_info
[out] Current Sub Status
Definition: audio_high_level_api.h:1548
uint8_t status_info
[out] Current Status
Definition: audio_high_level_api.h:1555
uint8_t reserved
[out] reserved
Definition: audio_high_level_api.h:1541
Definition: audio_player_api.h:524
Definition: audio_high_level_api.h:762
uint8_t enable_sound_effect
[in] Enable or disable sound-effect playback function.
Definition: audio_high_level_api.h:768
Definition: audio_effector_api.h:484
Definition: audio_high_level_api.h:732
uint8_t beep_en
[in] Select BEEP Enable/Disable
Definition: audio_high_level_api.h:738
uint16_t beep_freq
[in] Set BEEP Frequency
Definition: audio_high_level_api.h:756
int16_t beep_vol
[in] Set BEEP Volume
Definition: audio_high_level_api.h:748
Definition: audio_high_level_api.h:535
Definition: audio_player_api.h:353
Definition: audio_high_level_api.h:777
uint8_t clk_mode
[in] set rendering clock
Definition: audio_high_level_api.h:783
Definition: audio_high_level_api.h:711
uint8_t master_mute
[in] Select Master Volume Mute/UnMute
Definition: audio_high_level_api.h:717
uint8_t input2_mute
[in] Set Input2 Volume Mute/UnMute
Definition: audio_high_level_api.h:725
uint8_t input1_mute
[in] Set Input1 Volume Mute/UnMute
Definition: audio_high_level_api.h:721
Definition: audio_high_level_api.h:681
int16_t input1_db
[in] Set Input1 Volume
Definition: audio_high_level_api.h:697
int16_t master_db
[in] Set Master Volume
Definition: audio_high_level_api.h:688
int16_t input2_db
[in] Set Input2 Volume
Definition: audio_high_level_api.h:705
Definition: audio_effector_api.h:402
Definition: audio_high_level_api.h:1561
uint8_t reserved1
reserved
Definition: audio_high_level_api.h:1571
uint8_t changed_status
[out] Changed status
Definition: audio_high_level_api.h:1567
uint8_t reserved2
reserved
Definition: audio_high_level_api.h:1575
uint8_t reserved3
reserved
Definition: audio_high_level_api.h:1579
Definition: audio_effector_api.h:451
Definition: audio_recorder_api.h:343