This commit adds the tools to generate the control bytes for the
drc component. To generate the control bytes, run the example_drc.m
script.
To tweak the parameters modify the values in example_drc.m and run it.
This is still WIP. A fixed set of coefficients is temporarily used in
drc_generate_config.m
Signed-off-by: Pin-chih Lin <johnylin@google.com>
This patch adds the tool for creating beamformer configurations. The
microphone array geometry and beam angle (azimuth, elevation) need
to be specified. See the example scripts and sample array helper
functions.
The FIR blob quantize function needed a minor change to prevent strip
of trailing zero coefficients. The beamformer filter bank needs to use
equal length filters.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit adds the tools to generate the control bytes for the
crossover component. To generate the control bytes, run the
example_crossover.m script.
The parameters of the crossover components are:
- number of outputs
- sink assignments (routing crossover output to different pipelines)
- frequency cutoffs
To tweak the parameters modify the values in example_crossover.m and run
it.
Refer to sof/src/include/user/crossover.h for more information on how
the crossover config is structured and how sink assignments are done.
Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
Frequency response measure script mls_freq_resp.m could fail due to
network or ssh execution delays. This patch increases the recording
time by 3 seconds to ensure that remote device playback via ssh for
the relevant parts is within the local capture window.
Also the start marker search is done for first 5 seconds of captured
test signal. The script exits cleanly if the start and end markers
were not found and the captured waveform is shown to help understand
the possible network delays caused issue.
The BSD-3-Clause text is updated to short version.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds script src_small_int32.m to generate the intermediate
size SRC coefficients set. The export functions are updated for
short BSD copyright and to output licence text and needed header
files inclusions.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds for EQ tests and presets switch development a
bundle with five presets: flat, loudness, bass-boost, band-pass,
and high-pass. The m4 file is used by including to topologies. The
text format file is for sof-ctl.
The added code to script example_iir_eq.m is included. The blob is
also useful for testing multi-part IPC for EQ component. The existing
examples were not large enough to exercise the feature.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The case where blob decoding is requested for single frequency,
e.g. 1 kHz the magnitude and group delay vectors did not have
size of one frequency. This patch fixes the issue.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds user friendly function eq_blob_plot(file) to
plot the IIR or FIR equalizer response that will be applied for
each channel.
The IIR and FIR decoders are modified to better support the higher
level script.
The copyright texts in impacted scripts are are updated to short
BSD-3-Clause style.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch reduces amount of printed text to screen when Matlab/Octave
EQ tool needs configuration blob header information. The output is
redicted to /dev/null.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch updates the generated file names and locations. The
private data names for topology are changed to DEF_EQIIR_PRIV
and DEF_EQFIR_PRIV to work with updated private date naming scheme.
The copyright text is updated to short BSD-3-Clause text version.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch cleans the FIR examples generation with more consistent
directories output and file names. The EQ private data name is
renamed for a more consistent scheme into DEF_EQFIR_PRIV for all
generated coefficient data files.
The copyright text is updated to new shorter BSD-3-Clause version.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch makes the script more consistent with file names
and paths lets the script to output more useful example IIR
responses into m4 directory for usage with topologies and
testing.
The not consistent naming of IIR private data is aligned. The
label DEF_EQIIR_PRIV is used always that should be macro replaced
by pipeline specific name prior to including them into topology to
enable several EQ instances to be set up with different filter
coefficients.
The copyright text for updated files is updated to short BSD-3-Clause
version.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch fixes the issue in script example_iir_eq.m with gain
parameter for function hp_iir_eq(). The last parameter was hard
coded to 0 that caused all 20 dB labeled topologies to to have in
reality 0 dB gain.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commits adds the scripts to generate the bytes control blob
for the DCB. It also provides some generic scripts to convert
valid binary blob to a csv or binary file (usable by sof-ctl)
or an m4 byte control topology file.
This commit adds two new folders under tools/tune
- dcblock: scripts to generate the blob in Octave
- common: scripts to convert any generic blob to a config file.
Signed-off-by: Sebastiano Carlucci <scarlucci@google.com>
This patch corrects the shown parameters orders for help text
and updates the copyright text style.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch fixes a mistake that forces generation of rate into
fs_inout matrix diagonal. The purpose of this test is to enable
SRC to pass equal input and output rate, so in case not equal
input and output rates the generator would not disable such
conversion if requested.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch replaces in topology sof-hda-generic.m4 the use of macro
pipe-volume-capture.m4 usage with a new macro pipe-highpass-capture.m4.
The used 40 Hz cut-off is sufficient to suppress the DC pulse in the
beginning of capture from headset with minimal impact to other
applications such as recording music.
The capture volume ramp length is changed from 250 ms to 400 ms. The
longer ramp is feasible because the microphone path seems to open
at 500 ms from capture. It helps to attenuate the remaining noises
in the beginning of capture.
The patch also adds additional high-pass responses macros for
topology with different 20-50 Hz cut-off frequencies into
SOF/tools/topology/m4.
The changes for Matlab/Octave script example_iir_eq.m that
generated the filter coefficients are included here as well.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The Xtensa GCC build on APL platform can process about 40 taps
FIR filter so it is useful to have one such configuration. The
eq_fir_mid.txt is be applied with sof-ctl tool.
The patch contains the Octave script modification. The print of final
filter length is added to blob packer script to see the resulting
length when the filter is generated. The small filter spec change
helps the filter tool to achieve result that is close to requested
shape.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Recreate gui for audio-tuning.appspot.com using SOF config. For IIR
filters only currently. Once DRC is ported then GUI can be ported as
well.
Signed-off-by: Curtis Malainey <cujomalainey@google.com>
This patch avoids the need to main SOF ABI version information in
Matlab/Octave file eq_get_abi.m for equalizer tools. The ABI
header is fetched via new "-p" command line option for sof-ctl.
The BSD 3 clause copyright text is also updated to new short style.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The existing IIR response names are not all upper case. This patch
removes the conversion to upper case to be able to automatically
generate the topology m4 syntax example equalizers.
Without this patch run of example_iir_eq.m script causes successive
topologies build to fail.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch fixes the wrong file path to output example EQs and places
an identifier string to high-pass responses used in topology embedded
filter setup. The identifier is needed to correctly refer in topology
to right response when there are several similar type EQs in the
topology e.g. two separate IIR filters.
A new 16 kHz rate high-pass filter export is added into the script to
be used in voice pipelines.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch replaces all the filter coefficients to avoid the
unpleasant effect of samples saturation that the previous 0 dB max.
gain scaled coefficients could cause. The saturation of transients
may still happen but it should be more rare.
The filter coefficients scaling is changed from fixed pass band peak
align (to 0 dB) into DC gain controllable via new parameter gain in
src_param.m.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch updates the provided example responses as data for
sof-eqctl and in the include files for topologies. The updates into
Matlab scripts are included also. The FIR and IIR example script is
updated to contain all examples.
The patch includes also a bug fix into IPC handler where the check
against SOF_IPC_MSG_MAX_SIZE is off by one and caused it to reject
all set data commands (to the EQs).
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds 50 kHz into SRC generator script for std and tiny
profiles. The src generator script is cleaned up and the default
conversion matrix is moved into caller script for easier maintenance.
The plots appearance is improved and the generated coefficients code
look is improved to pass the git pre- and post-commit script
requirements.
The SRC test bench scripts are updated for changed locations. A SRC
playback topology is used for test bench and real device usage.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds into filter tools retrieving of ABI version from a
single function (a quick solution) and updates all configuration
data tools to apply the user ABI header.
The confusing platform_max_channels struct field is renamed to
channels_in_config (the EQ channel map) that creates many updates. The
EQ response plot title is fixed.
Finally new functions to decode IIR and FIR settings blobs is added.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>