This directory contains the DC Blocking filter.
The DC Blocker removes the DC offset (0 Hz component) from an audio signal, avoiding speaker damage and maximizing dynamic range.
graph LR
In[Audio Input] --> IIR[High-pass IIR Filter]
IIR --> Out[DC-Free Audio Output]
- Kconfig: Enables the DC Blocking Filter component (
COMP_DCBLOCK) which filters out DC offsets often from a microphone's output. Includes selectable HIFI optimization levels (Max, HIFI4, HIFI3, Generic). - CMakeLists.txt: Manages local build sources including generic and HIFI optimized versions (
dcblock_generic.c,dcblock_hifi3.c, etc.) and determines the valid IPC abstraction (dcblock_ipc3.cvsdcblock_ipc4.c). Supports loadable extension generation viallext. - dcblock.toml: Topology parameters for the DCBlock module. Defines UUID, pins, and memory limits for IPC integration.
- Topology (.conf): Derived from
tools/topology/topology2/include/components/dcblock.conf, it defines thedcblockwidget object for topology generation. It defaults to typeeffectwith UUIDaf:ef:09:b8:81:56:b1:42:9e:d6:04:bb:01:2d:d3:84and enforces input/output pins configuration. - MATLAB Tuning (
tune/): The included.mscripts (e.g.,sof_example_dcblock.m) automatically determine the optimal R coefficients to achieve various high-pass cutoff frequencies (-3dB point) across supported sample rates (like 16kHz and 48kHz). These coefficients are then packed into configuration blobs.