33#error "Audio library is NOT supported by SubCore."
36#include <audio/audio_capture_api.h>
37#include <audio/audio_frontend_api.h>
38#include <audio/audio_message_types.h>
39#include <audio/utilities/frame_samples.h>
40#include <audio/utilities/wav_containerformat.h>
41#include <memutils/simple_fifo/CMN_SimpleFifo.h>
49#define FRONTEND_LOG_DEBUG
51#define print_err printf
53#ifdef FRONTEND_LOG_DEBUG
54#define print_dbg(...) printf(__VA_ARGS__)
56#define print_dbg(x...)
63#define FRONTEND_ECODE_OK 0
64#define FRONTEND_ECODE_COMMAND_ERROR 1
65#define FRONTEND_ECODE_BASEBAND_ERROR 2
71#define FRONTEND_CAPCLK_NORMAL (0)
72#define FRONTEND_CAPCLK_HIRESO (1)
145 MicFrontendCallback fedcb
148 MicFrontendCallback fedcb,
162 uint8_t channel_number,
164 uint32_t samples_per_frame,
200 AsInitPreProcParam *param
211 AsSetPreProcParam *param
259 : m_fed_callback(NULL)
269 MicFrontendCallback m_fed_callback;
275 err_t activateBaseband(
void);
276 err_t deactivateBaseband(
void);
FrontEnd Class Definitions.
Definition: FrontEnd.h:82
err_t init(uint8_t channel_number, uint8_t bit_length, uint32_t samples_per_frame, uint8_t data_path, AsDataDest dest)
Initialize the FrontEnd.
err_t end(void)
Finalize the FrontEnd.
err_t deactivate(void)
Deactivate the FrontEnd.
err_t setCapturingClkMode(uint8_t clk_mode)
Set capturing clock mode.
err_t activate(MicFrontendCallback fedcb)
Activate the FrontEnd.
err_t activate(void)
Activate the FrontEnd.
err_t setMicGain(int16_t mic_gain)
Set Mic gain.
err_t initpreproc(AsInitPreProcParam *param)
Send init command to pre-process DSP.
err_t setpreproc(AsSetPreProcParam *param)
Send init command to pre-process DSP.
err_t begin(void)
Initialize the FrontEnd.
err_t stop(void)
Stop Recording.
static FrontEnd * getInstance()
Get instance of FrontEnd for singleton.
Definition: FrontEnd.h:89
err_t begin(AudioAttentionCb attcb)
Initialize the FrontEnd.
err_t start(void)
Start FrontEnd.
unsigned int err_t
Definition: Audio.h:108