This fix adds initialization and declaration of variable f_single
to avoid a previously overlooked error when accessing it in the
end of script. It produces the plot but with a warning print.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.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>
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 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 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 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 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>