Developer World
Spresense SDK Library v3.3.0-375c679
Audio High Level API
Collaboration diagram for Audio High Level API:

Modules

 Module ID
 
 Attention Code
 
 Attention Sub Code
 
 Error Code
 

Files

file  audio_common_defs.h
 CXD5602 Audio Common Definitions.
 
file  audio_high_level_api.h
 CXD5602 Audio High Level API.
 

Classes

struct  AsPcmDataParam
 
struct  AsRecognitionInfo
 
struct  ErrorAttentionParam
 
struct  AudioCommandHeader
 
struct  AudioResultHeader
 
struct  SetMicMapParam
 
struct  InitMicGainParam
 
struct  InitI2SParam
 
struct  InitOutputSelectParam
 
struct  InitDNCParam
 
struct  InitClearStereoParam
 
struct  SetVolumeParam
 
struct  SetVolumeMuteParam
 
struct  SetBeepParam
 
struct  PowerOnParam
 
struct  SetRenderingClkParam
 
struct  InitSpDrvModeParam
 
struct  AsThroughPath
 
struct  AsSetThroughPathParam
 
struct  AsInitMixerParam
 
struct  AsPlayerClockRecovery
 
struct  AsInitMediaPlayerPost
 
struct  AsSetMediaPlayerPost
 
struct  AsInitMicFrontEnd
 
struct  AudioCommand
 
struct  NotifyStatus
 
struct  StatusChangedParam
 
struct  ErrorResponseParam
 
struct  AudioResult
 
struct  AudioSubSystemIDs
 

Macros

#define AS_AUDIO_DSP_PATH_LEN   24
 
#define ATTENTION_FILE_NAME_LEN   32
 
#define SetSpDrvModeParam   InitSpDrvModeParam /* old command name */
 

Typedefs

typedef void(* PcmProcDoneCallback) (int32_t identifier, bool is_end)
 
typedef void(* AudioAttentionCb) (const ErrorAttentionParam *attparam)
 
typedef void(* obs_AudioAttentionCb) (uint8_t module_id, uint8_t error_code, uint8_t sub_code)
 

Enumerations

enum  AsI2sId { AS_I2S1 , AS_I2S2 }
 
enum  AsI2SBypassMode { AS_I2S_BYPASS_MODE_DISABLE , AS_I2S_BYPASS_MODE_ENABLE }
 
enum  AsOutDevice { AS_OUT_OFF , AS_OUT_SP , AS_OUT_I2S }
 
enum  AsDncMode { AS_DNC_MODE_A , AS_DNC_MODE_B , AS_DNC_MODE_C }
 InitDNCParam Command (AUDCMD_INITDNCPARAM) parameter. More...
 
enum  AsClkMode { AS_CLKMODE_NORMAL , AS_CLKMODE_HIRES }
 
enum  AsEnableSoundEffectFunc { AS_DISABLE_SOUNDEFFECT = 0 , AS_ENABLE_SOUNDEFFECT , AS_SOUNDEFFECT_NUM }
 
enum  AsStartSoundEffectMode { AS_STARTSOUNDEFFECT_NORMAL = 0 , AS_STARTSOUNDEFFECT_INFINITE , AS_STARTSOUNDEFFECT_MODE_NUM }
 
enum  AsThroughPathIn {
  AS_THROUGH_PATH_IN_MIC = 0 , AS_THROUGH_PATH_IN_I2S1 , AS_THROUGH_PATH_IN_I2S2 , AS_THROUGH_PATH_IN_MIXER ,
  AS_THROUGH_PATH_IN_NUM
}
 
enum  AsThroughPathOut {
  AS_THROUGH_PATH_OUT_MIXER1 = 0 , AS_THROUGH_PATH_OUT_MIXER2 , AS_THROUGH_PATH_OUT_I2S1 , AS_THROUGH_PATH_OUT_I2S2 ,
  AS_THROUGH_PATH_OUT_NUM
}
 
enum  AsSpDrvMode {
  AS_SP_DRV_MODE_LINEOUT = 0 , AS_SP_DRV_MODE_1DRIVER , AS_SP_DRV_MODE_2DRIVER , AS_SP_DRV_MODE_4DRIVER ,
  AS_SP_DRV_MODE_NUM
}
 
enum  AsFrontendDataDest { AsMicFrontendDataToRecorder = 0 , AsMicFrontendDataToRecognizer }
 
enum  AsMngStatus {
  AS_MNG_STATUS_READY = 0 , AS_MNG_STATUS_BASEBAND , AS_MNG_STATUS_PLAYER , AS_MNG_STATUS_RECORDER ,
  AS_MNG_STATUS_RECOGNIZER , AS_MNG_STATUS_POWEROFF , AS_MNG_STATUS_THROUGH , AS_MNG_STATUS_NUM
}
 
enum  AsMngSubStatus {
  AS_MNG_SUB_STATUS_NONE = 0 , AS_MNG_SUB_STATUS_PLAYREADY , AS_MNG_SUB_STATUS_PLAYACTIVE , AS_MNG_SUB_STATUS_PLAYPAUSE ,
  AS_MNG_SUB_STATUS_RECORDERREADY , AS_MNG_SUB_STATUS_RECORDERACTIVE , AS_MNG_SUB_STATUS_RECOGNIZERREADY , AS_MNG_SUB_STATUS_RECOGNIZERACTIVE ,
  AS_MNG_SUB_STATUS_BASEBANDREADY , AS_MNG_SUB_STATUS_BASEBANDACTIVE , AS_MNG_SUB_STATUS_WAITCMDWORD , AS_MNG_SUB_STATUS_NUM
}
 
enum  AsVadStatus { AS_VAD_STATUS_OUT_OF_VOICE_SECTION = 0 , AS_VAD_STATUS_INSIDE_VOICE_SECTION , AS_VAD_STATUS_NUM }
 
enum  AsStatusChangedSts {
  AS_STATUS_CHANGED_STS_READY = 0 , AS_STATUS_CHANGED_STS_BASEBAND , AS_STATUS_CHANGED_STS_PLAYER , AS_STATUS_CHANGED_STS_RECODER ,
  AS_STATUS_CHANGED_STS_POWEROFF , AS_STATUS_CHANGED_STS_THROUGH , AS_STATUS_CHANGED_STS_NUM
}
 
enum  AsErrorCode_e { AS_ERR_CODE_OK = 0 , AS_ERR_CODE_TASK_CREATE = -1 , AS_ERR_CODE_ILLEGAL_STATE = -2 }
 
enum  AsVolumeMute { AS_VOLUMEMUTE_HOLD , AS_VOLUMEMUTE_UNMUTE , AS_VOLUMEMUTE_MUTE , AS_VOLUMEMUTE_NUM }
 
enum  asBeepEn { AS_BEEPEN_DISABLE , AS_BEEPEN_ENABLE , AS_BEEPEN_NUM }
 

Functions

int AS_SendAudioCommand (AudioCommand *packet)
 Send Audio Command. More...
 
int AS_ReceiveAudioResult (AudioResult *packet)
 Receive Audio Result. More...
 
int AS_ReceiveAudioResult (FAR AudioResult *packet, uint8_t id, uint32_t tmo)
 Receive Audio Result for multithread. More...
 
int AS_CreateAudioManager (AudioSubSystemIDs ids, AudioAttentionCb att_cb)
 Activate AudioSubSystem. More...
 
 __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. Will delete most application seems to migrate to new API. More...
 
int AS_DeleteAudioManager (void)
 Deactivate AudioSubSystem. More...
 

Variables

obs_AudioAttentionCb obs_att_cb
 

Constant parameters

#define AS_VOLUME_DAC   -20
 
#define AS_AC_CODEC_VOL_DAC   -20
 

Fix values of audio parameter

#define AS_MIC_CHANNEL_MAX   8
 
#define AS_MICGAIN_HOLD   215
 
#define AS_VOLUME_HOLD   255
 
#define AS_VOLUME_MUTE   -1025
 
#define AS_BEEP_VOL_HOLD   255
 
#define AS_BEEP_FREQ_HOLD   0
 
#define AS_MICGAIN_MUTE   -7855
 

Codec type

#define AS_CODECTYPE_MP3   0
 
#define AS_CODECTYPE_WAV   1
 
#define AS_CODECTYPE_AAC   2
 
#define AS_CODECTYPE_OPUS   3
 
#define AS_CODECTYPE_MEDIA   4
 
#define AS_CODECTYPE_LPCM   5
 

Bit length

#define AS_BITLENGTH_16   16
 
#define AS_BITLENGTH_24   24
 
#define AS_BITLENGTH_32   32
 

Channel number

#define AS_CHANNEL_MONO   1
 
#define AS_CHANNEL_STEREO   2
 
#define AS_CHANNEL_4CH   4
 
#define AS_CHANNEL_6CH   6
 
#define AS_CHANNEL_8CH   8
 

Sampling rate

#define AS_SAMPLINGRATE_AUTO   0
 
#define AS_SAMPLINGRATE_8000   8000
 
#define AS_SAMPLINGRATE_11025   11025
 
#define AS_SAMPLINGRATE_12000   12000
 
#define AS_SAMPLINGRATE_16000   16000
 
#define AS_SAMPLINGRATE_22050   22050
 
#define AS_SAMPLINGRATE_24000   24000
 
#define AS_SAMPLINGRATE_32000   32000
 
#define AS_SAMPLINGRATE_44100   44100
 
#define AS_SAMPLINGRATE_48000   48000
 
#define AS_SAMPLINGRATE_64000   64000
 
#define AS_SAMPLINGRATE_88200   88200
 
#define AS_SAMPLINGRATE_96000   96000
 
#define AS_SAMPLINGRATE_128000   128000
 
#define AS_SAMPLINGRATE_176400   176400
 
#define AS_SAMPLINGRATE_192000   192000
 

Bit rate

#define AS_BITRATE_8000   8000
 
#define AS_BITRATE_16000   16000
 
#define AS_BITRATE_24000   24000
 
#define AS_BITRATE_32000   32000
 
#define AS_BITRATE_40000   40000
 
#define AS_BITRATE_48000   48000
 
#define AS_BITRATE_56000   56000
 
#define AS_BITRATE_64000   64000
 
#define AS_BITRATE_80000   80000
 
#define AS_BITRATE_96000   96000
 
#define AS_BITRATE_112000   112000
 
#define AS_BITRATE_128000   128000
 
#define AS_BITRATE_144000   144000
 
#define AS_BITRATE_160000   160000
 
#define AS_BITRATE_192000   192000
 
#define AS_BITRATE_224000   224000
 
#define AS_BITRATE_256000   256000
 
#define AS_BITRATE_320000   320000
 
#define AS_BITRATE_384000   384000
 
#define AS_BITRATE_448000   448000
 
#define AS_BITRATE_510000   510000
 

Reslt Code Packet length

#define LENGTH_AUDRLT   2
 
#define LENGTH_AUDRLT_ERRORRESPONSE_MAX   8
 
#define LENGTH_AUDRLT_ERRORRESPONSE_MIN   5
 

Packet length of command

#define LENGTH_GETSTATUS   2
 GetStatus command (AUDCMD_GETSTATUS) packet length.
 
#define LENGTH_SET_PLAYER_STATUS   6
 SetPlayerStaus command (AUDCMD_SETPLAYERSTATUS) packet length.
 
#define LENGTH_SET_RECORDER_STATUS   4
 SetRecorderStatus command (AUDCMD_SETRECORDERSTATUS) packet length.
 
#define LENGTH_SET_RECOGNIZER_STATUS   4
 SetRecorderStatus command (AUDCMD_SETRECOGNIZERSTATUS) packet length.
 
#define LENGTH_SET_BASEBAND_STATUS   9
 SetBaseBandStatus command (AUDCMD_SETBASEBANDSTATUS) packet length.
 
#define LENGTH_SET_THROUGH_STATUS   3
 SetThroughStatus command (AUDCMD_SETTHROUGHSTATUS) packet length.
 
#define LENGTH_SET_READY_STATUS   2
 SetReadyStatus command (AUDCMD_SETREADYSTATUS) packet length.
 
#define LENGTH_POWERON   2
 PowerOn command (AUDCMD_POWERON) packet length.
 
#define LENGTH_SET_POWEROFF_STATUS   2
 PowerOn command (AUDCMD_SETPOWEROFFSTATUS) packet length.
 
#define LENGTH_SETMICMAP   4
 SetMicMap command (AUDCMD_SETMICMAP) packet length.
 
#define LENGTH_INITMICGAIN   5
 InitMicGain command (AUDCMD_INITMICGAIN) packet length.
 
#define LENGTH_INITI2SPARAM   3
 InitI2SParam command (AUDCMD_INITI2SPARAM) packet length.
 
#define LENGTH_INITDEQPARAM   8
 InitDEQParam command (AUDCMD_INITDEQPARAM) packet length.
 
#define LENGTH_INITOUTPUTSELECT   2
 InitOutputSelect command (AUDCMD_INITOUTPUTSELECT) packet length.
 
#define LENGTH_INITDNCPARAM   2
 InitDNCParam command (AUDCMD_INITDNCPARAM) packet length.
 
#define LENGTH_INITCLEARSTEREO   2
 InitClearStereo command (AUDCMD_INITCLEARSTEREO) packet length.
 
#define LENGTH_SETVOLUME   3
 SetVolume command (AUDCMD_SETVOLUME) packet length.
 
#define LENGTH_SETVOLUMEMUTE   2
 SetVolumeMute command (AUDCMD_SETVOLUMEMUTE) packet length.
 
#define LENGTH_SETBEEPPARAM   3
 SetBeep command (AUDCMD_SETBEEPPARAM) packet length.
 
#define LENGTH_SETRENDERINGCLK   2
 SetRenderingClk command ("AUDCMD_SETRENDERINGCLK)packet length.
 
#define LENGTH_INIT_SOUNDEFFECT   3
 InitSoundEffect command ("AUDCMD_INITSOUNDEFFECT)packet length.
 
#define LENGTH_START_SOUNDEFFECT   2
 StartSoundEffect command ("AUDCMD_STARTSOUNDEFFECT)packet length.
 
#define LENGTH_STOP_SOUNDEFFECT   2
 StopSoundEffect command ("AUDCMD_STOPSOUNDEFFECT)packet length.
 
#define LENGTH_SET_THROUGH_PATH   4
 SetThroughPath command ("AUDCMD_SETTHROUGHPATH)packet length.
 
#define LENGTH_INITSPDRVMODE   2
 InitSpDrvMode command ("AUDCMD_INITSPDRVMODE)packet length.
 
#define LENGTH_SETSPDRVMODE   LENGTH_INITSPDRVMODE /* old command name */
 

Detailed Description

Macro Definition Documentation

◆ AS_MIC_CHANNEL_MAX

#define AS_MIC_CHANNEL_MAX   8

Mic channel max

◆ AS_MICGAIN_HOLD

#define AS_MICGAIN_HOLD   215

Keep setting for InitMicGainParam.mic_gain

◆ AS_VOLUME_HOLD

#define AS_VOLUME_HOLD   255

◆ AS_VOLUME_MUTE

#define AS_VOLUME_MUTE   -1025

Mute setting for above parameters

◆ AS_BEEP_VOL_HOLD

#define AS_BEEP_VOL_HOLD   255

Keep setting for SetBeepParam.beep_vol

◆ AS_BEEP_FREQ_HOLD

#define AS_BEEP_FREQ_HOLD   0

Keep setting for SetBeepParam.beep_freq

◆ AS_MICGAIN_MUTE

#define AS_MICGAIN_MUTE   -7855

Mute setting for above parameters

◆ AS_CODECTYPE_MP3

#define AS_CODECTYPE_MP3   0

MP3

◆ AS_CODECTYPE_WAV

#define AS_CODECTYPE_WAV   1

WAV

◆ AS_CODECTYPE_AAC

#define AS_CODECTYPE_AAC   2

AAC

◆ AS_CODECTYPE_OPUS

#define AS_CODECTYPE_OPUS   3

OPUS

◆ AS_CODECTYPE_MEDIA

#define AS_CODECTYPE_MEDIA   4

MEDIA Packet

◆ AS_CODECTYPE_LPCM

#define AS_CODECTYPE_LPCM   5

Linear PCM

◆ AS_BITLENGTH_16

#define AS_BITLENGTH_16   16

16bit

◆ AS_BITLENGTH_24

#define AS_BITLENGTH_24   24

24bit

◆ AS_BITLENGTH_32

#define AS_BITLENGTH_32   32

24bit Unpacked (32bit)

◆ AS_CHANNEL_MONO

#define AS_CHANNEL_MONO   1

MONO (1ch)

◆ AS_CHANNEL_STEREO

#define AS_CHANNEL_STEREO   2

STEREO (2ch)

◆ AS_CHANNEL_4CH

#define AS_CHANNEL_4CH   4

4ch

◆ AS_CHANNEL_6CH

#define AS_CHANNEL_6CH   6

6ch

◆ AS_CHANNEL_8CH

#define AS_CHANNEL_8CH   8

8ch

◆ AS_SAMPLINGRATE_8000

#define AS_SAMPLINGRATE_8000   8000

8kHz

◆ AS_SAMPLINGRATE_11025

#define AS_SAMPLINGRATE_11025   11025

11.025kHz

◆ AS_SAMPLINGRATE_12000

#define AS_SAMPLINGRATE_12000   12000

12kHz

◆ AS_SAMPLINGRATE_16000

#define AS_SAMPLINGRATE_16000   16000

16kHz

◆ AS_SAMPLINGRATE_22050

#define AS_SAMPLINGRATE_22050   22050

22.05kHz

◆ AS_SAMPLINGRATE_24000

#define AS_SAMPLINGRATE_24000   24000

24kHz

◆ AS_SAMPLINGRATE_32000

#define AS_SAMPLINGRATE_32000   32000

32kHz

◆ AS_SAMPLINGRATE_44100

#define AS_SAMPLINGRATE_44100   44100

44.1kHz

◆ AS_SAMPLINGRATE_48000

#define AS_SAMPLINGRATE_48000   48000

48kHz

◆ AS_SAMPLINGRATE_64000

#define AS_SAMPLINGRATE_64000   64000

64kHz

◆ AS_SAMPLINGRATE_88200

#define AS_SAMPLINGRATE_88200   88200

88.2kHz

◆ AS_SAMPLINGRATE_96000

#define AS_SAMPLINGRATE_96000   96000

96kHz

◆ AS_SAMPLINGRATE_128000

#define AS_SAMPLINGRATE_128000   128000

128kHz

◆ AS_SAMPLINGRATE_176400

#define AS_SAMPLINGRATE_176400   176400

176.4kHz

◆ AS_SAMPLINGRATE_192000

#define AS_SAMPLINGRATE_192000   192000

192kHz

◆ AS_BITRATE_8000

#define AS_BITRATE_8000   8000

8kbps

◆ AS_BITRATE_16000

#define AS_BITRATE_16000   16000

16kbps

◆ AS_BITRATE_24000

#define AS_BITRATE_24000   24000

24kbps

◆ AS_BITRATE_32000

#define AS_BITRATE_32000   32000

32kbps

◆ AS_BITRATE_40000

#define AS_BITRATE_40000   40000

40kbps

◆ AS_BITRATE_48000

#define AS_BITRATE_48000   48000

48kbps

◆ AS_BITRATE_56000

#define AS_BITRATE_56000   56000

56kbps

◆ AS_BITRATE_64000

#define AS_BITRATE_64000   64000

64kbps

◆ AS_BITRATE_80000

#define AS_BITRATE_80000   80000

80kbps

◆ AS_BITRATE_96000

#define AS_BITRATE_96000   96000

96kbps

◆ AS_BITRATE_112000

#define AS_BITRATE_112000   112000

112kbps

◆ AS_BITRATE_128000

#define AS_BITRATE_128000   128000

128kbps

◆ AS_BITRATE_144000

#define AS_BITRATE_144000   144000

144kbps

◆ AS_BITRATE_160000

#define AS_BITRATE_160000   160000

160kbps

◆ AS_BITRATE_192000

#define AS_BITRATE_192000   192000

192kbps

◆ AS_BITRATE_224000

#define AS_BITRATE_224000   224000

224kbps

◆ AS_BITRATE_256000

#define AS_BITRATE_256000   256000

256kbps

◆ AS_BITRATE_320000

#define AS_BITRATE_320000   320000

320kbps

◆ AS_BITRATE_384000

#define AS_BITRATE_384000   384000

384kbps

◆ AS_BITRATE_448000

#define AS_BITRATE_448000   448000

448kbps

◆ AS_BITRATE_510000

#define AS_BITRATE_510000   510000

510kbps

◆ AS_AUDIO_DSP_PATH_LEN

#define AS_AUDIO_DSP_PATH_LEN   24

< DSP path length

◆ ATTENTION_FILE_NAME_LEN

#define ATTENTION_FILE_NAME_LEN   32

ErrorAttention Result (AUDRLT_ERRORATTENTION) parameter

◆ LENGTH_AUDRLT

#define LENGTH_AUDRLT   2

NomalResponse Packet length

◆ LENGTH_AUDRLT_ERRORRESPONSE_MAX

#define LENGTH_AUDRLT_ERRORRESPONSE_MAX   8

Maximum ErrorResponse Packet length

◆ LENGTH_AUDRLT_ERRORRESPONSE_MIN

#define LENGTH_AUDRLT_ERRORRESPONSE_MIN   5

Minimum ErrorResponse Packet length

Typedef Documentation

◆ AudioAttentionCb

typedef void(* AudioAttentionCb) (const ErrorAttentionParam *attparam)

Audio Attention Callback function

Parameters
[in]attparamAttention detail parameter

Enumeration Type Documentation

◆ AsI2sId

enum AsI2sId

InitI2SParam Command (AUDCMD_INITI2SPARAM) parameter

◆ AsOutDevice

InitOutputSelect Command (AUDCMD_INITOUTPUTSELECT) parameter

Enumerator
AS_OUT_OFF 

Output device none

AS_OUT_SP 

Output device speaker

AS_OUT_I2S 

Output device i2s

◆ AsDncMode

enum AsDncMode

InitDNCParam Command (AUDCMD_INITDNCPARAM) parameter.

Deprecated:
It will be removed in the future

◆ AsClkMode

enum AsClkMode

SetRenderingClk Command (AUDCMD_SETRENDERINGCLK) parameter

◆ AsEnableSoundEffectFunc

Enable or disable effect sound playback function.

Enumerator
AS_DISABLE_SOUNDEFFECT 

Disable effect sound.

AS_ENABLE_SOUNDEFFECT 

Enable effect sound.

Deprecated:
It will be removed in the future

◆ AsStartSoundEffectMode

playback mode of effect sound

Enumerator
AS_STARTSOUNDEFFECT_NORMAL 

Play effect sound with limited data.

AS_STARTSOUNDEFFECT_INFINITE 

Play effect sound infinitely.

◆ AsThroughPathIn

Select direct input path

◆ AsThroughPathOut

Select direct output path

◆ AsSpDrvMode

Speaker driver mode

◆ AsFrontendDataDest

Enumerator
AsMicFrontendDataToRecorder 

[in] Send audio data to Recorder

AsMicFrontendDataToRecognizer 

[in] Send audio data to Recognizer

◆ AsMngStatus

Current Status

Enumerator
AS_MNG_STATUS_READY 

Ready.

AS_MNG_STATUS_BASEBAND 

Baseband.

AS_MNG_STATUS_PLAYER 

Player.

AS_MNG_STATUS_RECORDER 

Recorder.

AS_MNG_STATUS_RECOGNIZER 

Recorder.

AS_MNG_STATUS_POWEROFF 

PowerOff.

AS_MNG_STATUS_THROUGH 

Through.

◆ AsMngSubStatus

Current Sub Status

Enumerator
AS_MNG_SUB_STATUS_NONE 

None.

AS_MNG_SUB_STATUS_PLAYREADY 

PlayReady.

AS_MNG_SUB_STATUS_PLAYACTIVE 

PlayActive.

AS_MNG_SUB_STATUS_PLAYPAUSE 

PlayPause.

AS_MNG_SUB_STATUS_RECORDERREADY 

RecorderReady.

AS_MNG_SUB_STATUS_RECORDERACTIVE 

RecorderActive.

AS_MNG_SUB_STATUS_RECOGNIZERREADY 

RecognizerReady.

AS_MNG_SUB_STATUS_RECOGNIZERACTIVE 

RecognizerActive.

AS_MNG_SUB_STATUS_BASEBANDREADY 

BaseBandReady.

AS_MNG_SUB_STATUS_BASEBANDACTIVE 

BaseBandActive.

AS_MNG_SUB_STATUS_WAITCMDWORD 

WaitCommandword.

◆ AsVadStatus

Current VAD Status (valid only NotifyStatus.sub_status_info==#AS_SUB_STATUS_WAITCOMMANDWORD)

Enumerator
AS_VAD_STATUS_OUT_OF_VOICE_SECTION 

Out of voice section.

AS_VAD_STATUS_INSIDE_VOICE_SECTION 

Inside voice section.

◆ AsStatusChangedSts

Changed Status

Enumerator
AS_STATUS_CHANGED_STS_READY 

to Ready

AS_STATUS_CHANGED_STS_BASEBAND 

to BaseBand

AS_STATUS_CHANGED_STS_PLAYER 

to Player

AS_STATUS_CHANGED_STS_RECODER 

to Recorder

AS_STATUS_CHANGED_STS_POWEROFF 

to PowerOff

AS_STATUS_CHANGED_STS_THROUGH 

to Through

◆ AsErrorCode_e

Audio Manager error code

Enumerator
AS_ERR_CODE_OK 

success

AS_ERR_CODE_TASK_CREATE 

fail to create task

AS_ERR_CODE_ILLEGAL_STATE 

illegal state

◆ AsVolumeMute

Select volume mute/unmute

Enumerator
AS_VOLUMEMUTE_HOLD 

keep setting

AS_VOLUMEMUTE_UNMUTE 

unmute

AS_VOLUMEMUTE_MUTE 

mute

◆ asBeepEn

enum asBeepEn

Select beep mode

Enumerator
AS_BEEPEN_DISABLE 

beep disable

AS_BEEPEN_ENABLE 

beep enable

Function Documentation

◆ AS_SendAudioCommand()

int AS_SendAudioCommand ( AudioCommand packet)

Send Audio Command.

Parameters
[in]packetAudioCommand* Command packet
Return values
errorcode

◆ AS_ReceiveAudioResult() [1/2]

int AS_ReceiveAudioResult ( AudioResult packet)

Receive Audio Result.

Parameters
[out]packetAudioResult*: Result packet
Return values
errorcode

◆ AS_ReceiveAudioResult() [2/2]

int AS_ReceiveAudioResult ( FAR AudioResult packet,
uint8_t  id,
uint32_t  tmo 
)

Receive Audio Result for multithread.

Parameters
[out]packetAudioResult*: Result packet
[in]rplyRequest message id
[in]idAsPlayerId
[in]tmoTimeout (ms)
Return values
errorcode

◆ AS_CreateAudioManager()

int AS_CreateAudioManager ( AudioSubSystemIDs  ids,
AudioAttentionCb  att_cb 
)

Activate AudioSubSystem.

Parameters
[in]idsAudioSubSystemIDs* Message Queue ID of Audio Module
Return values
errorcode

◆ __attribute__()

__attribute__ ( (deprecated("\nDeprecated attention callback type is used. \ \nPlease use \"AudioAttentionCb\" as callback type. \ \n"))  )

Activate AudioSubSystem[Deprecated] This API is to make it compatible with old application. Will delete most application seems to migrate to new API.

Parameters
[in]idsAudioSubSystemIDs* Message Queue ID of Audio Module
Return values
errorcode

◆ AS_DeleteAudioManager()

int AS_DeleteAudioManager ( void  )

Deactivate AudioSubSystem.

Return values
errorcode