8 #include "MicArray.hpp"
9 #include "mic_array/etc/filters_default.h"
12 #if defined(MIC_COUNT) || defined(MICS_IN) || defined(FRAME_SIZE) || defined(USE_DCOE)
13 # error Application must not define the following as precompiler macros: MIC_COUNT, MICS_IN, FRAME_SIZE, USE_DCOE.
311 template <
unsigned MIC_COUNT,
unsigned FRAME_SIZE,
bool USE_DCOE,
unsigned MICS_IN=MIC_COUNT>
314 TwoStageDecimator<MIC_COUNT, STAGE2_DEC_FACTOR,
316 StandardPdmRxService<MICS_IN,MIC_COUNT,STAGE2_DEC_FACTOR>,
319 typename std::conditional<USE_DCOE,
320 DcoeSampleFilter<MIC_COUNT>,
321 NopSampleFilter<MIC_COUNT>>::type,
322 FrameOutputHandler<MIC_COUNT, FRAME_SIZE,
323 ChannelFrameTransmitter>>
332 typename std::conditional<USE_DCOE,
373 chanend_t c_frames_out);
398 chanend_t c_frames_out);
434 template <
unsigned MIC_COUNT,
unsigned FRAME_SIZE,
bool USE_DCOE,
unsigned MICS_IN>
441 template <
unsigned MIC_COUNT,
unsigned FRAME_SIZE,
bool USE_DCOE,
unsigned MICS_IN>
445 chanend_t c_frames_out) :
TParent(
456 template <
unsigned MIC_COUNT,
unsigned FRAME_SIZE,
bool USE_DCOE,
unsigned MICS_IN>
460 this->OutputHandler.FrameTx.SetChannel(c_frames_out);
464 template <
unsigned MIC_COUNT,
unsigned FRAME_SIZE,
bool USE_DCOE,
unsigned MICS_IN>
468 this->PdmRx.Init(p_pdm_mics);
472 template <
unsigned MIC_COUNT,
unsigned FRAME_SIZE,
bool USE_DCOE,
unsigned MICS_IN>
476 this->PdmRx.ThreadEntry();
480 template <
unsigned MIC_COUNT,
unsigned FRAME_SIZE,
bool USE_DCOE,
unsigned MICS_IN>
484 this->PdmRx.InstallISR();
488 template <
unsigned MIC_COUNT,
unsigned FRAME_SIZE,
bool USE_DCOE,
unsigned MICS_IN>
492 this->PdmRx.UnmaskISR();
Frame transmitter which transmits frame over a channel.
Definition: OutputHandler.hpp:175
Filter which applies DC Offset Elimination (DCOE).
Definition: SampleFilter.hpp:49
OutputHandler for grouping samples into frames and sending frames to subsequent processing stages.
Definition: OutputHandler.hpp:104
Represents the microphone array component of an application.
Definition: MicArray.hpp:48
mic_array::MicArray< MIC_COUNT, TwoStageDecimator< MIC_COUNT, STAGE2_DEC_FACTOR, STAGE2_TAP_COUNT >, StandardPdmRxService< MIC_COUNT, MIC_COUNT, STAGE2_DEC_FACTOR >, std::conditional< USE_DCOE, DcoeSampleFilter< MIC_COUNT >, NopSampleFilter< MIC_COUNT > >::type, FrameOutputHandler< MIC_COUNT, FRAME_SIZE, ChannelFrameTransmitter > >::Decimator TwoStageDecimator< MIC_COUNT, STAGE2_DEC_FACTOR, STAGE2_TAP_COUNT > Decimator
The Decimator.
Definition: MicArray.hpp:71
Filter which does nothing.
Definition: SampleFilter.hpp:34
PDM rx service which uses a streaming channel to send a block of data by pointer.
Definition: PdmRx.hpp:251
First and Second Stage Decimator.
Definition: Decimator.hpp:44
Class template for a typical bare-metal mic array unit.
Definition: Prefab.hpp:324
void Init()
Initialize the decimator.
Definition: Prefab.hpp:435
void InstallPdmRxISR()
Install the PDM rx ISR on the calling thread.
Definition: Prefab.hpp:482
void SetOutputChannel(chanend_t c_frames_out)
Set the audio frame output channel.
Definition: Prefab.hpp:458
void PdmRxThreadEntry()
Entry point for PDM rx thread.
Definition: Prefab.hpp:474
void UnmaskPdmRxISR()
Unmask interrupts on the calling thread.
Definition: Prefab.hpp:490
void SetPort(port_t p_pdm_mics)
Set the PDM data port.
Definition: Prefab.hpp:466
constexpr BasicMicArray() noexcept
No-argument constructor.
Definition: Prefab.hpp:351
#define STAGE2_DEC_FACTOR
Definition: filters_default.h:142
#define STAGE2_TAP_COUNT
Definition: filters_default.h:152
const int32_t stage2_coef[STAGE2_TAP_COUNT]
const uint32_t stage1_coef[STAGE1_WORDS]
const right_shift_t stage2_shr