36#ifndef __MODULES_INCLUDE_AUDIO_AUDIO_FRONTEND_API_H
37#define __MODULES_INCLUDE_AUDIO_AUDIO_FRONTEND_API_H
68#define AS_FEATURE_FRONTEND_ENABLE
75#define LENGTH_INIT_MICFRONTEND 4
79#define LENGTH_INIT_PREPROCESS_DSP 4
83#define LENGTH_SET_PREPROCESS_DSP 4
89#define AS_PREPROCESS_FILE_PATH_LEN 22
135 AsMicFrontendDeviceMic = 0,
136 AsMicFrontendDeviceI2S,
138} AsMicFrontendInputDevice;
156 AsMicFrontendPreProcInvalid = 0xff,
189typedef bool (*MicFrontendCallback)(
AsMicFrontendEvent evtype, uint32_t result, uint32_t sub_result);
195 MicFrontendCallback cb;
CXD5602 Audio Common Definitions.
CXD5602 Audio Object Layer API.
bool AS_StopMicFrontend(FAR AsStopMicFrontendParam *stopparam)
Stop mic frontend.
AsMicFrontendDataPath
Definition: audio_frontend_api.h:161
AsMicFrontendPreProcType
Definition: audio_frontend_api.h:143
bool AS_StartMicFrontend(FAR AsStartMicFrontendParam *startparam)
Start mic frontend.
bool AS_checkAvailabilityMicFrontend(void)
Check availability of MicFrontend.
bool AS_SetMicGainMicFrontend(FAR AsMicFrontendMicGainParam *micgain_param)
Set Mic gain.
AsMicFrontendEvent
Definition: audio_frontend_api.h:98
bool AS_DeleteMicFrontend(void)
Delete mic frontend.
bool AS_InitPreprocFrontend(FAR AsInitPreProcParam *param)
Init pre process.
bool AS_InitMicFrontend(FAR AsInitMicFrontendParam *initparam)
Init mic frontend.
bool AS_DeactivateMicFrontend(FAR AsDeactivateMicFrontendParam *deactparam)
Deactivate mic frontend.
void(* FrontendDoneCallback)(AsPcmDataParam param)
Definition: audio_frontend_api.h:209
bool AS_SetPreprocMicFrontend(FAR AsSetPreProcParam *param)
Set pre process.
#define AS_PREPROCESS_FILE_PATH_LEN
Length of Recognizer dsp file name and path.
Definition: audio_frontend_api.h:89
bool AS_CreateMicFrontend(FAR AsCreateMicFrontendParam_t *param, AudioAttentionCb attcb)
Create mic frontend.
bool AS_ActivateMicFrontend(FAR AsActivateMicFrontend *actparam)
Activate mic frontend.
@ AsDataPathMessage
PCM data is send by message.
Definition: audio_frontend_api.h:168
@ AsDataPathCallback
PCM data is send by callback.
Definition: audio_frontend_api.h:164
@ AsDataPathSimpleFIFO
PCM data is send by simple FIFO.
Definition: audio_frontend_api.h:172
@ AsMicFrontendPreProcUserCustom
Pre Process user customed.
Definition: audio_frontend_api.h:154
@ AsMicFrontendPreProcThrough
Pre Process through.
Definition: audio_frontend_api.h:146
@ AsMicFrontendPreProcSrc
Pre Process Sampling Rate Conveter.
Definition: audio_frontend_api.h:150
@ AsMicFrontendEventStop
Stop.
Definition: audio_frontend_api.h:117
@ AsMicFrontendEventStart
Start.
Definition: audio_frontend_api.h:113
@ AsMicFrontendEventInit
Init.
Definition: audio_frontend_api.h:109
@ AsMicFrontendEventSetMicGain
Set MicGain.
Definition: audio_frontend_api.h:129
@ AsMicFrontendEventInitPreProc
Init PreProc.
Definition: audio_frontend_api.h:121
@ AsMicFrontendEventSetPreProc
Set PreProc.
Definition: audio_frontend_api.h:125
@ AsMicFrontendEventAct
Activate.
Definition: audio_frontend_api.h:101
@ AsMicFrontendEventDeact
Deactivate.
Definition: audio_frontend_api.h:105
void(* AudioAttentionCb)(const ErrorAttentionParam *attparam)
Definition: audio_common_defs.h:810
#define AS_MIC_CHANNEL_MAX
Definition: audio_common_defs.h:86
Definition: audio_frontend_api.h:179
uint8_t input_device
[in] Select Mic Frontend input device
Definition: audio_frontend_api.h:185
Definition: audio_frontend_api.h:192
Definition: audio_frontend_api.h:457
AsMicFrontendMsgQueId_t msgq_id
[in] ID for sending messages to each function
Definition: audio_frontend_api.h:460
AsMicFrontendPoolId_old_t pool_id
[in] ID of memory pool for processing data
Definition: audio_frontend_api.h:464
Definition: audio_frontend_api.h:469
AsMicFrontendMsgQueId_t msgq_id
[in] ID for sending messages to each function
Definition: audio_frontend_api.h:472
AsMicFrontendPoolId_t pool_id
[in] ID of memory pool for processing data
Definition: audio_frontend_api.h:476
Definition: audio_frontend_api.h:218
Definition: audio_frontend_api.h:202
Definition: audio_frontend_api.h:225
uint8_t preproc_type
[in] Select pre process enable
Definition: audio_frontend_api.h:253
uint32_t out_fs
[in] Output Fs
Definition: audio_frontend_api.h:246
uint16_t samples_per_frame
[in] Samples per a frame
Definition: audio_frontend_api.h:239
AsDataDest dest
[in] Data destination, callback or message
Definition: audio_frontend_api.h:272
uint8_t channel_number
[in] Select InitMicFrontend input channels
Definition: audio_frontend_api.h:229
uint8_t data_path
[in] Select Data path from MicFrontend
Definition: audio_frontend_api.h:265
uint8_t bit_length
[in] Select InitMicFrontend input bit length
Definition: audio_frontend_api.h:234
Definition: audio_frontend_api.h:295
uint32_t packet_size
[in] Command packet size
Definition: audio_frontend_api.h:302
uint8_t * packet_addr
[in] Command packet address
Definition: audio_frontend_api.h:298
Definition: audio_frontend_api.h:309
Definition: audio_frontend_api.h:405
uint8_t micfrontend
[in] Message queue id of micfrontend
Definition: audio_frontend_api.h:408
uint8_t mng
[in] Message queue id of audio_manager
Definition: audio_frontend_api.h:412
uint8_t dsp
[in] Message queue id of DSP
Definition: audio_frontend_api.h:416
Definition: audio_frontend_api.h:439
uint8_t input
[in] Memory pool id of input data
Definition: audio_frontend_api.h:442
uint8_t dsp
[in] Memory pool id of dsp command data
Definition: audio_frontend_api.h:450
uint8_t output
[in] Memory pool id of PreProc
Definition: audio_frontend_api.h:446
Definition: audio_frontend_api.h:423
MemMgrLite::PoolId dsp
[in] Memory pool id of dsp command data
Definition: audio_frontend_api.h:434
MemMgrLite::PoolId output
[in] Memory pool id of PreProc
Definition: audio_frontend_api.h:430
MemMgrLite::PoolId input
[in] Memory pool id of input data
Definition: audio_frontend_api.h:426
Definition: audio_common_defs.h:703
Definition: audio_frontend_api.h:279
Definition: audio_frontend_api.h:287
FIFO handle which holds data required to manipulate FIFO.
Definition: CMN_SimpleFifo.h:78
Definition: MemMgrTypes.h:88
Definition: audio_frontend_api.h:326
uint8_t reserved0
[in] reserved
Definition: audio_frontend_api.h:333
uint8_t command_code
[in] Command code
Definition: audio_frontend_api.h:329
Definition: audio_frontend_api.h:342
AsStartMicFrontendParam start_param
[in] for StartFrontend (Object Interface==AS_StartMicFrontend)
Definition: audio_frontend_api.h:373
AsSetPreProcParam setpreproc_param
[in] for SetPreProc (Object Interface==AS_SetPreProcFrontend)
Definition: audio_frontend_api.h:391
AsActivateMicFrontend act_param
[in] for ActivateFrontend (Object Interface==AS_ActivateFrontend)
Definition: audio_frontend_api.h:355
AsStopMicFrontendParam stop_param
[in] for StopFrontend (Object Interface==AS_StopMicFrontend)
Definition: audio_frontend_api.h:379
AsMicFrontendMicGainParam mic_gain_param
[in] for SetMicGain (Object Interface==AS_SetMicGainFrontend)
Definition: audio_frontend_api.h:397
AsInitPreProcParam initpreproc_param
[in] for InitPreProc (Object Interface==AS_InitPreProcFrontend)
Definition: audio_frontend_api.h:385
MicFrontendCommandHeader header
[in] Command Header
Definition: audio_frontend_api.h:345
AsDeactivateMicFrontendParam deact_param
[in] for DeactivateFrontend (Object Interface==AS_DeactivateFrontend)
Definition: audio_frontend_api.h:361
AsInitMicFrontendParam init_param
[in] for InitFrontend (Object Interface==AS_InitMicFrontend)
Definition: audio_frontend_api.h:367
Definition: audio_frontend_api.h:212