This patch adds legend to plot since it was difficult to see to
which play/capture channel which curve corresponded to. In script
selftest case a label called Reference is added to the legend.
Also an indentation issue is fixed in the script.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The 3s wait was not enough long time to wait for recording to complete
before copy for analysis so the wait is increased to 5s. The total
recording lengths were variable and not same 7s for a completed
recording.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch increases end marker seek length from 3s to 5s to
allow more drift for arecord and aplay timing for test signal.
The captured waveform is now always plotted and when start
and end markers are found the test signal is plotted with green
color.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The script mls_freq_resp.m has worked previously with Octave
while failed with Matlab because it does not have source
command. This patch ads function get_config() that reads
the configuration file, evaluates it, and returns the
needed variable.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The loudness EQ is changed to 250 taps to create large IPC
message type. It also improves subjective quality of this
effect with better bass response. The earlier version was
made very short to fit the that time IPC size limit.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Change the default slot mapping from L_lo-L_hi-R_lo-R_hi to
L_lo-R_lo-L_hi-R_hi so slot 0/1 is for woofer and slot 2/3 is for
tweeter.
Signed-off-by: Brent Lu <brent.lu@intel.com>
This patch adds for the IIR equalized component a test with
comparison 100 ms of Octave generated output to output of the
component. The test signal is a full scale chirp signal. The
IIR response is both amplifying and attenuating to trigger as
much as possible issues with internal overflows.
All test data was generated by Octave script
cmocka_data_eq_iir.m. Re-run of script updates the used header
files the in cmocka tests directory.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds topologies sof-apl-nocodec-demux-eq-2ch4ch.tplg and
sof-apl-nocodec-demux-eq-4ch4ch.tplg. Playback of 2ch creates 4ch
output in format L_lo, L_hi, R_lo, and R_hi. An example band-split
at 2 kHz is configured for EQ processing. The low band contains
an additional 80 Hz high-pass.
The pipeline was tested in UP2 device. The nocodec topology enables
an useful SPP loopback mode. The capture PCM is connected to DAI
loopback so this pipeline can be tested with simultaneous 2ch aplay
and 4ch arecord.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The change for topology1 was missing from various tuning
and testing scripts those access binary blob data from
topology m4 directories.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch essentially adds support for steer_az/steer_el to be
vector instead of scalar. The beam off preset is added by default
automatically for N-channel in N-channel out configurations. Microphone
(x,y,z) coordinates are passed in to blob for direction of arrival
reporting.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
To support exist function - fullfile() path addition is to prevent Matlab (differently than Octave)
to give false positive with some other directory location with it's search path
Added correction to isempty.
Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
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>