sof/tools/tune/dcblock
Seppo Ingalsuo d3b7e54f3f Tools: Tune: dcblock: Create set of cut-off frequencies
This patch modifies script example_dblock.m to create in
addition to existing default coefficients blob with parameter
R=0.98 a set of blobs those provide (-3 dB) cut-off frequencies
20, 30, 40, 50, 100, 200 Hz for 16 kHz and 48 kHz for various
usages. Human understandable parameters for blobs helps to select
the configuration for the needed dcblock usage.

The parameter value R for given frequencies is calculated
with iterative function dcblock_rval_calculate(). A closed
form equation might be possible to derive from the transfer
function. If such is found this function can be replaced with
quicker equation -- or with more advanced faster converging
iteration.

The topology blob export functions are also modified to add
comment line for exact build command.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2023-10-16 16:38:41 +01:00
..
README.md tools: tune: Add tools to generate bytes control 2020-03-26 16:49:37 +00:00
dcblock_build_blob.m Tools: Tune: dcblock: Fixes for Matlab compatibility 2023-09-14 21:06:13 +03:00
dcblock_plot_stepfn.m Tools: Tune: dcblock: Fixes for Matlab compatibility 2023-09-14 21:06:13 +03:00
dcblock_plot_transferfn.m Tools: Tune: dcblock: Fixes for Matlab compatibility 2023-09-14 21:06:13 +03:00
example_dcblock.m Tools: Tune: dcblock: Create set of cut-off frequencies 2023-10-16 16:38:41 +01:00

README.md

DC Blocking Filter Control Bytes Generator

This is a tool to generate the topology control bytes file (.m4) and configuration files used by sof-ctl. See example_dcblock.m for reference on how to use it.

The tools need GNU Octave version 4.0.0 or later with octave-signal package.

dcblock_build_blob.m

This script takes an array of floating point coefficients and the endianness. Returns a blob used to configure the binary controls of the DC Blocking Filter component.

The blob can be passed to alsactl_write(), blob_write(), tplg_write() to generate a CSV text, binary and topology file respectively.

dcblock_plot_transferfn.m

This script takes the R coefficient and the sampling frequency to plot the Frequency Response of the DCB filter H(z) = (1-1/z)/(1-R/z).

dcblock_plot_stepfn.m

This script takes the R coefficient and the sampling frequency to plot the Step Response of the DCB filter. It is useful to visualize how the DC component of a signal reacts to the filter.