Developer World
Spresense SDK Library v1.4.2-3df2e9d
audio_frontend_api.h File Reference

CXD5602 Audio Mic Frontend API. More...

#include <stdint.h>
#include <stdbool.h>
#include "audio/audio_common_defs.h"
#include "audio/audio_object_common_api.h"
#include "memutils/simple_fifo/CMN_SimpleFifo.h"

Go to the source code of this file.

Classes

struct  AsActivateFrontendParam
 
struct  AsActivateMicFrontend
 
struct  AsDeactivateMicFrontendParam
 
union  AsDataDest
 
struct  AsDataDest::__st_tunnel
 
struct  AsInitMicFrontendParam
 
struct  AsStartMicFrontendParam
 
struct  AsStopMicFrontendParam
 
struct  AsInitPreProcParam
 
struct  AsMicFrontendMicGainParam
 
struct  MicFrontendCommandHeader
 
struct  MicFrontendCommand
 
struct  AsMicFrontendMsgQueId_t
 
struct  AsMicFrontendPoolId_t
 
struct  AsMicFrontendPoolId_old_t
 
struct  AsCreateMicFrontendParam_t
 
struct  AsCreateMicFrontendParams_t
 

Macros

#define AS_FEATURE_FRONTEND_ENABLE
 
#define AS_PREPROCESS_FILE_PATH_LEN   22
 Length of Recognizer dsp file name and path.
 
Packet length of command
#define LENGTH_INIT_MICFRONTEND   4
 Init Mic Frontend command (AUDCMD_INIT_MICFRONTEND) packet length.
 
#define LENGTH_INIT_PREPROCESS_DSP   4
 InitPreProcessDSP command (#AUDCMD_INIT_PREPROCESS) packet length.
 
#define LENGTH_SET_PREPROCESS_DSP   4
 SetPreProcessDSP command (AUDCMD_SET_PREPROCESS_DSP) packet length.
 

Typedefs

typedef bool(* MicFrontendCallback) (AsMicFrontendEvent evtype, uint32_t result, uint32_t sub_result)
 
typedef void(* FrontendDoneCallback) (AsPcmDataParam param)
 
typedef struct AsInitPreProcParam AsSetPreProcParam
 

Enumerations

enum  AsMicFrontendEvent {
  AsMicFrontendEventAct = 0, AsMicFrontendEventDeact, AsMicFrontendEventInit, AsMicFrontendEventStart,
  AsMicFrontendEventStop, AsMicFrontendEventInitPreProc, AsMicFrontendEventSetPreProc, AsMicFrontendEventSetMicGain
}
 
enum  AsMicFrontendInputDevice { AsMicFrontendDeviceMic = 0 }
 
enum  AsMicFrontendPreProcType { AsMicFrontendPreProcThrough = 0, AsMicFrontendPreProcSrc, AsMicFrontendPreProcUserCustom, AsMicFrontendPreProcInvalid = 0xff }
 
enum  AsMicFrontendDataPath { AsDataPathCallback = 0, AsDataPathMessage, AsDataPathSimpleFIFO }
 

Functions

bool AS_CreateMicFrontend (FAR AsCreateMicFrontendParam_t *param, AudioAttentionCb attcb)
 Create mic frontend. More...
 
bool AS_CreateMicFrontend (FAR AsCreateMicFrontendParams_t *param, AudioAttentionCb attcb)
 
bool AS_ActivateMicFrontend (FAR AsActivateMicFrontend *actparam)
 Activate mic frontend. More...
 
bool AS_InitMicFrontend (FAR AsInitMicFrontendParam *initparam)
 Init mic frontend. More...
 
bool AS_StartMicFrontend (FAR AsStartMicFrontendParam *startparam)
 Start mic frontend. More...
 
bool AS_StopMicFrontend (FAR AsStopMicFrontendParam *stopparam)
 Stop mic frontend. More...
 
bool AS_InitPreprocFrontend (FAR AsInitPreProcParam *param)
 Init pre process. More...
 
bool AS_SetPreprocMicFrontend (FAR AsSetPreProcParam *param)
 Set pre process. More...
 
bool AS_SetMicGainMicFrontend (FAR AsMicFrontendMicGainParam *micgain_param)
 Set Mic gain. More...
 
bool AS_DeactivateMicFrontend (FAR AsDeactivateMicFrontendParam *deactparam)
 Deactivate mic frontend. More...
 
bool AS_DeleteMicFrontend (void)
 Delete mic frontend. More...
 
bool AS_checkAvailabilityMicFrontend (void)
 Check availability of MicFrontend. More...
 

Detailed Description

CXD5602 Audio Mic Frontend API.

Author
CXD5602 Audio SW Team