Thanks Seppo,
I was able to create a pipeline with EQ via IIR filters (massive warning: i honestly don't exactly know much about signal processing so i may use these terms in a funny way).
I was able to see some differences when playing a song and applying various predefined configurations. So, I think it works:
e.g $ sof-ctl -Dhw:1 -n 44 -s sof/tools/ctl/eq_iir_bassboost.txt
Some questions:
1) It looks like I'm able to change the parameters at runtime via sof-ctl although the documentation says that this is only possible only when DSP is idle (documentation might be outdated, it mentions this at v1.4).
So, was this fixed right?
2) Are the files in tools/ctl/ e.g eq_fir_loudness.txt obtained from running the Matlab script you mentioned (e.g tools/tune/eq?)
3) How exactly do I make use of Matlab/Octave scripts in tools/tune/eq
4) Is there any GUI for modifying the parameters :) .
thanks, Daniel.
On Wed, Jul 21, 2021 at 7:56 PM Seppo Ingalsuo seppo.ingalsuo@linux.intel.com wrote:
Hi Daniel,
On 21.7.2021 17.40, Daniel Baluta wrote:
Hi Seppo,
Is there any documentation on how to use the Equalizer component for SOF?
Is there any way to dynamically change the coefficients at runtime?
The documentation is my task list. However there are clear (hope so) examples in tools/tune/eq. See first example_iir_eq.m script. It needs Octave or Matlab with signal-processing package. The IIR equalizers are designed manually with parametric 2nd order blocks. The parameters are usually center frequency, Q-value, and gain.
A more complex example is example_fir_eq.m. FIR can be designed parametrically with prototype IIR as target response or via a direct target response with (frequency, dB magnitude) points. The target can be also computed from delta of desired vs. measured frequency response.
The script example_spk_eq.m shows an EQ that combines both IIR and FIR. IIR is efficient in coarse shape definition and FIR for very detailed, but take care of not going into too small details with it. The FIR response can be controlled with octave bands smoothing.
The run-time control of EQs is documented in https://thesofproject.github.io/latest/developer_guides/tuning/sof-ctl.html
The equalizers (high-pass for some inputs) those are used currently are embedded into topology and do not need runtime setup. See the topology CMakeList.txt for examples of embedding them.