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) |
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 */ |
#define AS_MIC_CHANNEL_MAX 8 |
Mic channel max
#define AS_MICGAIN_HOLD 215 |
Keep setting for InitMicGainParam.mic_gain
#define AS_VOLUME_HOLD 255 |
Keep setting for SetVolumeParam.input1_db, SetVolumeParam.input2_db, SetVolumeParam.master_db
#define AS_VOLUME_MUTE -1025 |
Mute setting for above parameters
#define AS_BEEP_VOL_HOLD 255 |
Keep setting for SetBeepParam.beep_vol
#define AS_BEEP_FREQ_HOLD 0 |
Keep setting for SetBeepParam.beep_freq
#define AS_MICGAIN_MUTE -7855 |
Mute setting for above parameters
#define AS_CODECTYPE_MP3 0 |
MP3
#define AS_CODECTYPE_WAV 1 |
WAV
#define AS_CODECTYPE_AAC 2 |
AAC
#define AS_CODECTYPE_OPUS 3 |
OPUS
#define AS_CODECTYPE_MEDIA 4 |
MEDIA Packet
#define AS_CODECTYPE_LPCM 5 |
Linear PCM
#define AS_BITLENGTH_16 16 |
16bit
#define AS_BITLENGTH_24 24 |
24bit
#define AS_BITLENGTH_32 32 |
24bit Unpacked (32bit)
#define AS_CHANNEL_MONO 1 |
MONO (1ch)
#define AS_CHANNEL_STEREO 2 |
STEREO (2ch)
#define AS_CHANNEL_4CH 4 |
4ch
#define AS_CHANNEL_6CH 6 |
6ch
#define AS_CHANNEL_8CH 8 |
8ch
#define AS_SAMPLINGRATE_8000 8000 |
8kHz
#define AS_SAMPLINGRATE_11025 11025 |
11.025kHz
#define AS_SAMPLINGRATE_12000 12000 |
12kHz
#define AS_SAMPLINGRATE_16000 16000 |
16kHz
#define AS_SAMPLINGRATE_22050 22050 |
22.05kHz
#define AS_SAMPLINGRATE_24000 24000 |
24kHz
#define AS_SAMPLINGRATE_32000 32000 |
32kHz
#define AS_SAMPLINGRATE_44100 44100 |
44.1kHz
#define AS_SAMPLINGRATE_48000 48000 |
48kHz
#define AS_SAMPLINGRATE_64000 64000 |
64kHz
#define AS_SAMPLINGRATE_88200 88200 |
88.2kHz
#define AS_SAMPLINGRATE_96000 96000 |
96kHz
#define AS_SAMPLINGRATE_128000 128000 |
128kHz
#define AS_SAMPLINGRATE_176400 176400 |
176.4kHz
#define AS_SAMPLINGRATE_192000 192000 |
192kHz
#define AS_BITRATE_8000 8000 |
8kbps
#define AS_BITRATE_16000 16000 |
16kbps
#define AS_BITRATE_24000 24000 |
24kbps
#define AS_BITRATE_32000 32000 |
32kbps
#define AS_BITRATE_40000 40000 |
40kbps
#define AS_BITRATE_48000 48000 |
48kbps
#define AS_BITRATE_56000 56000 |
56kbps
#define AS_BITRATE_64000 64000 |
64kbps
#define AS_BITRATE_80000 80000 |
80kbps
#define AS_BITRATE_96000 96000 |
96kbps
#define AS_BITRATE_112000 112000 |
112kbps
#define AS_BITRATE_128000 128000 |
128kbps
#define AS_BITRATE_144000 144000 |
144kbps
#define AS_BITRATE_160000 160000 |
160kbps
#define AS_BITRATE_192000 192000 |
192kbps
#define AS_BITRATE_224000 224000 |
224kbps
#define AS_BITRATE_256000 256000 |
256kbps
#define AS_BITRATE_320000 320000 |
320kbps
#define AS_BITRATE_384000 384000 |
384kbps
#define AS_BITRATE_448000 448000 |
448kbps
#define AS_BITRATE_510000 510000 |
510kbps
#define AS_AUDIO_DSP_PATH_LEN 24 |
< DSP path length
#define ATTENTION_FILE_NAME_LEN 32 |
ErrorAttention Result (AUDRLT_ERRORATTENTION) parameter
#define LENGTH_AUDRLT 2 |
NomalResponse Packet length
#define LENGTH_AUDRLT_ERRORRESPONSE_MAX 8 |
Maximum ErrorResponse Packet length
#define LENGTH_AUDRLT_ERRORRESPONSE_MIN 5 |
Minimum ErrorResponse Packet length
typedef void(* AudioAttentionCb) (const ErrorAttentionParam *attparam) |
Audio Attention Callback function
[in] | attparam | Attention detail parameter |
enum AsI2sId |
InitI2SParam Command (AUDCMD_INITI2SPARAM) parameter
enum 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 |
enum AsDncMode |
InitDNCParam Command (AUDCMD_INITDNCPARAM) parameter.
enum AsClkMode |
SetRenderingClk Command (AUDCMD_SETRENDERINGCLK) parameter
Enable or disable effect sound playback function.
Enumerator | |
---|---|
AS_DISABLE_SOUNDEFFECT | Disable effect sound. |
AS_ENABLE_SOUNDEFFECT | Enable effect sound.
|
enum AsThroughPathIn |
Select direct input path
enum AsThroughPathOut |
Select direct output path
enum AsSpDrvMode |
Speaker driver mode
enum AsFrontendDataDest |
enum AsMngStatus |
enum AsMngSubStatus |
Current Sub Status
enum 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. |
enum AsStatusChangedSts |
enum AsErrorCode_e |
enum AsVolumeMute |
enum asBeepEn |
int AS_SendAudioCommand | ( | AudioCommand * | packet | ) |
Send Audio Command.
[in] | packet | AudioCommand* Command packet |
error | code |
int AS_ReceiveAudioResult | ( | AudioResult * | packet | ) |
Receive Audio Result.
[out] | packet | AudioResult*: Result packet |
error | code |
int AS_ReceiveAudioResult | ( | FAR AudioResult * | packet, |
uint8_t | id, | ||
uint32_t | tmo | ||
) |
Receive Audio Result for multithread.
[out] | packet | AudioResult*: Result packet |
[in] | rply | Request message id |
[in] | id | AsPlayerId |
[in] | tmo | Timeout (ms) |
error | code |
int AS_CreateAudioManager | ( | AudioSubSystemIDs | ids, |
AudioAttentionCb | att_cb | ||
) |
Activate AudioSubSystem.
[in] | ids | AudioSubSystemIDs* Message Queue ID of Audio Module |
error | code |
__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.
[in] | ids | AudioSubSystemIDs* Message Queue ID of Audio Module |
error | code |
int AS_DeleteAudioManager | ( | void | ) |
Deactivate AudioSubSystem.
error | code |