36#ifndef __MODULES_INCLUDE_AUDIO_AUDIO_COMMON_DEFS_H
37#define __MODULES_INCLUDE_AUDIO_AUDIO_COMMON_DEFS_H
39#include <arch/chip/audio.h>
71#define AS_VOLUME_DAC -20
75#define AS_AC_CODEC_VOL_DAC -20
86#define AS_MIC_CHANNEL_MAX 8
91#define AS_MICGAIN_HOLD 215
98#define AS_VOLUME_HOLD 255
102#define AS_VOLUME_MUTE -1025
106#define AS_BEEP_VOL_HOLD 255
110#define AS_BEEP_FREQ_HOLD 0
114#define AS_MICGAIN_MUTE -7855
123#define AS_CODECTYPE_MP3 0
127#define AS_CODECTYPE_WAV 1
131#define AS_CODECTYPE_AAC 2
135#define AS_CODECTYPE_OPUS 3
139#define AS_CODECTYPE_MEDIA 4
143#define AS_CODECTYPE_LPCM 5
152#define AS_BITLENGTH_16 16
156#define AS_BITLENGTH_24 24
160#define AS_BITLENGTH_32 32
169#define AS_CHANNEL_MONO 1
173#define AS_CHANNEL_STEREO 2
177#define AS_CHANNEL_4CH 4
181#define AS_CHANNEL_6CH 6
185#define AS_CHANNEL_8CH 8
194#define AS_SAMPLINGRATE_AUTO 0
198#define AS_SAMPLINGRATE_8000 8000
202#define AS_SAMPLINGRATE_11025 11025
206#define AS_SAMPLINGRATE_12000 12000
210#define AS_SAMPLINGRATE_16000 16000
214#define AS_SAMPLINGRATE_22050 22050
218#define AS_SAMPLINGRATE_24000 24000
222#define AS_SAMPLINGRATE_32000 32000
226#define AS_SAMPLINGRATE_44100 44100
230#define AS_SAMPLINGRATE_48000 48000
234#define AS_SAMPLINGRATE_64000 64000
238#define AS_SAMPLINGRATE_88200 88200
242#define AS_SAMPLINGRATE_96000 96000
246#define AS_SAMPLINGRATE_128000 128000
250#define AS_SAMPLINGRATE_176400 176400
254#define AS_SAMPLINGRATE_192000 192000
263#define AS_BITRATE_8000 8000
267#define AS_BITRATE_16000 16000
271#define AS_BITRATE_24000 24000
275#define AS_BITRATE_32000 32000
279#define AS_BITRATE_40000 40000
283#define AS_BITRATE_48000 48000
287#define AS_BITRATE_56000 56000
291#define AS_BITRATE_64000 64000
295#define AS_BITRATE_80000 80000
299#define AS_BITRATE_96000 96000
303#define AS_BITRATE_112000 112000
307#define AS_BITRATE_128000 128000
311#define AS_BITRATE_144000 144000
315#define AS_BITRATE_160000 160000
319#define AS_BITRATE_192000 192000
323#define AS_BITRATE_224000 224000
327#define AS_BITRATE_256000 256000
331#define AS_BITRATE_320000 320000
335#define AS_BITRATE_384000 384000
339#define AS_BITRATE_448000 448000
343#define AS_BITRATE_510000 510000
441#define AS_ATTENTION_CODE_INFORMATION 0x00
449#define AS_ATTENTION_CODE_WARNING 0x01
457#define AS_ATTENTION_CODE_ERROR 0x02
464#define AS_ATTENTION_CODE_FATAL 0x03
477#define AS_ATTENTION_SUB_CODE_DMA_UNDERFLOW 0x01
485#define AS_ATTENTION_SUB_CODE_DMA_OVERFLOW 0x02
491#define AS_ATTENTION_SUB_CODE_DMA_ERROR 0x03
497#define AS_ATTENTION_SUB_CODE_APU_QUEUE_FULL 0x04
505#define AS_ATTENTION_SUB_CODE_SIMPLE_FIFO_UNDERFLOW 0x05
513#define AS_ATTENTION_SUB_CODE_SIMPLE_FIFO_OVERFLOW 0x06
519#define AS_ATTENTION_SUB_CODE_ILLEGAL_REQUEST 0x07
525#define AS_ATTENTION_SUB_CODE_INTERNAL_STATE_ERROR 0x08
531#define AS_ATTENTION_SUB_CODE_UNEXPECTED_PARAM 0x09
537#define AS_ATTENTION_SUB_CODE_QUEUE_POP_ERROR 0x0A
543#define AS_ATTENTION_SUB_CODE_QUEUE_PUSH_ERROR 0x0B
549#define AS_ATTENTION_SUB_CODE_QUEUE_MISSING_ERROR 0x0C
556#define AS_ATTENTION_SUB_CODE_MEMHANDLE_ALLOC_ERROR 0x0D
562#define AS_ATTENTION_SUB_CODE_MEMHANDLE_FREE_ERROR 0x0E
569#define AS_ATTENTION_SUB_CODE_TASK_CREATE_ERROR 0x0F
577#define AS_ATTENTION_SUB_CODE_RESOURCE_ERROR 0x10
583#define AS_ATTENTION_SUB_CODE_DECODED_SIZE_ZERO 0x11
590#define AS_ATTENTION_SUB_CODE_DSP_LOAD_ERROR 0x12
597#define AS_ATTENTION_SUB_CODE_DSP_UNLOAD_ERROR 0x13
603#define AS_ATTENTION_SUB_CODE_DSP_EXEC_ERROR 0x14
609#define AS_ATTENTION_SUB_CODE_DSP_RESULT_ERROR 0x15
616#define AS_ATTENTION_SUB_CODE_DSP_ILLEGAL_REPLY 0x16
622#define AS_ATTENTION_SUB_CODE_DSP_UNLOAD_DONE 0x17
628#define AS_ATTENTION_SUB_CODE_DSP_VERSION_ERROR 0x18
634#define AS_ATTENTION_SUB_CODE_BASEBAND_ERROR 0x19
641#define AS_ATTENTION_SUB_CODE_STREAM_PARSER_ERROR 0x1A
647#define AS_ATTENTION_SUB_CODE_DSP_LOAD_DONE 0x1B
653#define AS_ATTENTION_SUB_CODE_RECSTART 0x1C
659#define AS_ATTENTION_SUB_CODE_RECSTOP 0x1D
666#define AS_ATTENTION_SUB_CODE_DSP_LOG_ALLOC_ERROR 0x1E
672#define AS_ATTENTION_SUB_CODE_DSP_ASSETION_FAIL 0x1F
678#define AS_ATTENTION_SUB_CODE_DSP_SEND_ERROR 0x20
685#define AS_ATTENTION_SUB_CODE_ALLOC_HEAP_MEMORY 0x21
687#define AS_ATTENTION_SUB_CODE_NUM AS_ATTENTION_SUB_CODE_ALLOC_HEAP_MEMORY
693#define AS_AUDIO_DSP_PATH_LEN 24
698typedef void (*PcmProcDoneCallback)(int32_t identifier,
bool is_end);
710 PcmProcDoneCallback callback;
752#define ATTENTION_FILE_NAME_LEN 32
800 uint32_t align_dummy;
812#ifndef ATTENTION_USE_FILENAME_LINE
813typedef void (*obs_AudioAttentionCb)(uint8_t module_id,
817typedef void (*obs_AudioAttentionCb)(uint8_t module_id,
820 FAR
const char *file_name,
Memory Handler Class for "Memory Manager Lite". This is only wrapper class for convert project-specif...
Definition: MemManager.h:107
#define ATTENTION_FILE_NAME_LEN
Definition: audio_common_defs.h:752
void(* AudioAttentionCb)(const ErrorAttentionParam *attparam)
Definition: audio_common_defs.h:810
AsModuleId
Definition: audio_common_defs.h:353
@ AS_MODULE_ID_DECODER_CMP
Decoder Component ID.
Definition: audio_common_defs.h:399
@ AS_MODULE_ID_FILTER_CMP
Filter Component ID.
Definition: audio_common_defs.h:407
@ AS_MODULE_ID_CAPTURE_CMP
Capture Component ID.
Definition: audio_common_defs.h:395
@ AS_MODULE_ID_CUSTOM_CMP
Custom Component ID.
Definition: audio_common_defs.h:427
@ AS_MODULE_ID_PLAYER_OBJ
Player Object ID.
Definition: audio_common_defs.h:379
@ AS_MODULE_ID_RENDERER_CMP
Renderer Component ID.
Definition: audio_common_defs.h:415
@ AS_MODULE_ID_MEDIA_RECORDER_OBJ
Media Recorder Object ID.
Definition: audio_common_defs.h:371
@ AS_MODULE_ID_SYNTHESIZER_OBJ
Synthesizer Object ID.
Definition: audio_common_defs.h:391
@ AS_MODULE_ID_RECOGNITION_CMP
Recognition Component ID.
Definition: audio_common_defs.h:411
@ AS_MODULE_ID_RECOGNITION_OBJ
Recognition Object ID.
Definition: audio_common_defs.h:383
@ AS_MODULE_ID_POSTPROC_CMP
Postfilter Component ID.
Definition: audio_common_defs.h:419
@ AS_MODULE_ID_AUDIO_MANAGER
Audio Manager Module ID.
Definition: audio_common_defs.h:356
@ AS_MODULE_ID_INPUT_DATA_MNG_OBJ
Input Data Manager Object ID.
Definition: audio_common_defs.h:367
@ AS_MODULE_ID_ENCODER_CMP
Encoder Component ID.
Definition: audio_common_defs.h:403
@ AS_MODULE_ID_AUDIO_DRIVER
Audio Baseband Driver Module ID.
Definition: audio_common_defs.h:359
@ AS_MODULE_ID_OUTPUT_MIX_OBJ
Output Mix Object ID.
Definition: audio_common_defs.h:375
@ AS_MODULE_ID_OSCILLATOR_CMP
Oscillator Component ID.
Definition: audio_common_defs.h:423
@ AS_MODULE_ID_SOUND_EFFECT_OBJ
Sound Effect Object ID.
Definition: audio_common_defs.h:387
@ AS_MODULE_ID_MIC_FRONTEND_OBJ
FrontEnd Object ID.
Definition: audio_common_defs.h:363
Definition: audio_common_defs.h:703
bool is_valid
[in] True: Valid PCM frame.
Definition: audio_common_defs.h:730
uint32_t sample
[in] Sample number of PCM data
Definition: audio_common_defs.h:718
uint32_t size
[in] Byte size of input data
Definition: audio_common_defs.h:722
MemMgrLite::MemHandle mh
[in] Memory handle for output PCM data
Definition: audio_common_defs.h:714
uint8_t bit_length
[in] Data bit length
Definition: audio_common_defs.h:734
int32_t identifier
[in] Data identifier, use anyway
Definition: audio_common_defs.h:706
bool is_end
[in] True: Last data of current session.
Definition: audio_common_defs.h:726
Definition: audio_common_defs.h:739
uint32_t size
[in] Size recognition result information.
Definition: audio_common_defs.h:746
MemMgrLite::MemHandle mh
[in] Memory handle for recognition result information.
Definition: audio_common_defs.h:742
Definition: audio_common_defs.h:755
uint8_t task_id
[out] Task ID (internal use only)
Definition: audio_common_defs.h:790
uint8_t error_code
[out] Error Infomation, T.B.D.
Definition: audio_common_defs.h:762
uint32_t error_att_sub_code
[out] Detailed Error Infomation, T.B.D.
Definition: audio_common_defs.h:778
uint8_t cpu_id
[out] CPU ID (internal use only)
Definition: audio_common_defs.h:766
uint8_t module_id
[out] Error module infomation, T.B.D.
Definition: audio_common_defs.h:774
uint8_t sub_module_id
[out] for debug purpose
Definition: audio_common_defs.h:770
uint16_t line_number
[out] Line No (internal use only)
Definition: audio_common_defs.h:786
uint8_t reserved3
[out] reserved
Definition: audio_common_defs.h:794
uint32_t reserved2
[out] reserved
Definition: audio_common_defs.h:782
uint32_t reserved1
[out] reserved
Definition: audio_common_defs.h:758