Developer World
Spresense SDK Library v3.3.0-375c679
audio_common_defs.h File Reference

CXD5602 Audio Common Definitions. More...

#include <arch/chip/audio.h>
#include "memutils/memory_manager/MemHandle.h"

Go to the source code of this file.

Classes

struct  AsPcmDataParam
 
struct  AsRecognitionInfo
 
struct  ErrorAttentionParam
 

Macros

#define AS_ATTENTION_CODE_INFORMATION   0x00
 Just Information. More...
 
#define AS_ATTENTION_CODE_WARNING   0x01
 Warning Attention. More...
 
#define AS_ATTENTION_CODE_ERROR   0x02
 Error Attention. More...
 
#define AS_ATTENTION_CODE_FATAL   0x03
 Fatal Attention. More...
 
#define AS_ATTENTION_SUB_CODE_DMA_UNDERFLOW   0x01
 DMA Underflow. More...
 
#define AS_ATTENTION_SUB_CODE_DMA_OVERFLOW   0x02
 DMA Overflow. More...
 
#define AS_ATTENTION_SUB_CODE_DMA_ERROR   0x03
 DMA Error. More...
 
#define AS_ATTENTION_SUB_CODE_APU_QUEUE_FULL   0x04
 APU Queue Full Error. More...
 
#define AS_ATTENTION_SUB_CODE_SIMPLE_FIFO_UNDERFLOW   0x05
 SimpleFIFO Underflow. More...
 
#define AS_ATTENTION_SUB_CODE_SIMPLE_FIFO_OVERFLOW   0x06
 SimpleFIFO Overflow. More...
 
#define AS_ATTENTION_SUB_CODE_ILLEGAL_REQUEST   0x07
 Illegal Request. More...
 
#define AS_ATTENTION_SUB_CODE_INTERNAL_STATE_ERROR   0x08
 Internal State Error. More...
 
#define AS_ATTENTION_SUB_CODE_UNEXPECTED_PARAM   0x09
 Unexpected Parameter. More...
 
#define AS_ATTENTION_SUB_CODE_QUEUE_POP_ERROR   0x0A
 Internal Queue Pop Error. More...
 
#define AS_ATTENTION_SUB_CODE_QUEUE_PUSH_ERROR   0x0B
 Internal Queue Push Error. More...
 
#define AS_ATTENTION_SUB_CODE_QUEUE_MISSING_ERROR   0x0C
 Internal Queue Missing Error. More...
 
#define AS_ATTENTION_SUB_CODE_MEMHANDLE_ALLOC_ERROR   0x0D
 Memory Handle Alloc Error. More...
 
#define AS_ATTENTION_SUB_CODE_MEMHANDLE_FREE_ERROR   0x0E
 Memory Handle Free Error. More...
 
#define AS_ATTENTION_SUB_CODE_TASK_CREATE_ERROR   0x0F
 Task Create Error. More...
 
#define AS_ATTENTION_SUB_CODE_RESOURCE_ERROR   0x10
 Instance Resource Error. More...
 
#define AS_ATTENTION_SUB_CODE_DECODED_SIZE_ZERO   0x11
 Decoded size equal zero. More...
 
#define AS_ATTENTION_SUB_CODE_DSP_LOAD_ERROR   0x12
 DSP Load Error. More...
 
#define AS_ATTENTION_SUB_CODE_DSP_UNLOAD_ERROR   0x13
 DSP Unload Error. More...
 
#define AS_ATTENTION_SUB_CODE_DSP_EXEC_ERROR   0x14
 DSP Exec Error. More...
 
#define AS_ATTENTION_SUB_CODE_DSP_RESULT_ERROR   0x15
 DSP Result Error. More...
 
#define AS_ATTENTION_SUB_CODE_DSP_ILLEGAL_REPLY   0x16
 DSP Illegal Reply. More...
 
#define AS_ATTENTION_SUB_CODE_DSP_UNLOAD_DONE   0x17
 DSP Unload Done. More...
 
#define AS_ATTENTION_SUB_CODE_DSP_VERSION_ERROR   0x18
 DSP Version Error. More...
 
#define AS_ATTENTION_SUB_CODE_BASEBAND_ERROR   0x19
 BaseBand Error. More...
 
#define AS_ATTENTION_SUB_CODE_STREAM_PARSER_ERROR   0x1A
 Stream Parser Error. More...
 
#define AS_ATTENTION_SUB_CODE_DSP_LOAD_DONE   0x1B
 DSP Load Done. More...
 
#define AS_ATTENTION_SUB_CODE_RECSTART   0x1C
 Rec Start Action Done. More...
 
#define AS_ATTENTION_SUB_CODE_RECSTOP   0x1D
 Rec Stop Action Done. More...
 
#define AS_ATTENTION_SUB_CODE_DSP_LOG_ALLOC_ERROR   0x1E
 DSP Debug Dump Log Alloc Error. More...
 
#define AS_ATTENTION_SUB_CODE_DSP_ASSETION_FAIL   0x1F
 DSP Assertion Fail. More...
 
#define AS_ATTENTION_SUB_CODE_DSP_SEND_ERROR   0x20
 DSP Send Fail. More...
 
#define AS_ATTENTION_SUB_CODE_ALLOC_HEAP_MEMORY   0x21
 Allocate memory of heap area. More...
 
#define AS_ATTENTION_SUB_CODE_NUM   AS_ATTENTION_SUB_CODE_ALLOC_HEAP_MEMORY
 
#define AS_AUDIO_DSP_PATH_LEN   24
 
#define ATTENTION_FILE_NAME_LEN   32
 
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
 

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  AsModuleId {
  AS_MODULE_ID_AUDIO_MANAGER = 0 , AS_MODULE_ID_AUDIO_DRIVER , AS_MODULE_ID_MIC_FRONTEND_OBJ , AS_MODULE_ID_INPUT_DATA_MNG_OBJ ,
  AS_MODULE_ID_MEDIA_RECORDER_OBJ , AS_MODULE_ID_OUTPUT_MIX_OBJ , AS_MODULE_ID_PLAYER_OBJ , AS_MODULE_ID_RECOGNITION_OBJ ,
  AS_MODULE_ID_SOUND_EFFECT_OBJ , AS_MODULE_ID_SYNTHESIZER_OBJ , AS_MODULE_ID_CAPTURE_CMP , AS_MODULE_ID_DECODER_CMP ,
  AS_MODULE_ID_ENCODER_CMP , AS_MODULE_ID_FILTER_CMP , AS_MODULE_ID_RECOGNITION_CMP , AS_MODULE_ID_RENDERER_CMP ,
  AS_MODULE_ID_POSTPROC_CMP , AS_MODULE_ID_OSCILLATOR_CMP , AS_MODULE_ID_CUSTOM_CMP , AS_MODULE_ID_NUM
}
 

Detailed Description

CXD5602 Audio Common Definitions.

Author
CXD5602 Audio SW Team