Commit Graph

34 Commits

Author SHA1 Message Date
Seppo Ingalsuo 0d296ce7d1 Tools: Tune: Make example FIR response long for large IPC test
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>
2021-12-20 22:33:06 +00:00
Brent Lu 8ed1e90b5c topology: pipe-demux-eq-iir-playback: change slot mapping
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>
2021-11-25 16:41:37 +00:00
Seppo Ingalsuo 3eeda96c0c Test: Add cmocka test case for IIR equalizer
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>
2021-11-08 12:14:43 +00:00
Seppo Ingalsuo 23c7e4739c Topology: Add development example of demux and EQ band-split pipeline
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>
2021-08-26 09:57:35 +01:00
Seppo Ingalsuo 4c376680f5 Tools: Fix topology1 path in Matlab language scripts
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>
2021-07-21 12:13:36 +01:00
Seppo Ingalsuo 46d52efdd8 Tools: Tune: Add multiple angles and beam off settings add to TDFB blob
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>
2021-07-14 15:59:24 +01:00
sriram a47a8a6a21 audio: tools: fix matlab/octave directory compatibility
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>
2021-01-22 15:28:32 +00:00
Seppo Ingalsuo 51b64f460a Tools: Tune: Add variable initialize to EQ blobs plotter
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>
2020-12-15 13:39:06 +00:00
Seppo Ingalsuo d9de74b231 Tools: Tune: Add TDFB configuration tool
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>
2020-09-13 15:52:24 +01:00
Seppo Ingalsuo 145d9aa09f Tools: Tune: Improve robustness of remote audio measure
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>
2020-05-29 15:59:33 +01:00
Seppo Ingalsuo 33e642795f Topology: Add EQ IIR presets bundle coefficients blob data and tool
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>
2020-05-18 14:42:46 +01:00
Seppo Ingalsuo 3e7edf4e02 Tools: Tune: Fix mistake in EQ blob plot function
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>
2020-05-07 17:30:40 +01:00
Seppo Ingalsuo 594e031b6e Tools: Tune: Improve EQ blob decode scripts
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>
2020-04-16 11:48:22 +01:00
Seppo Ingalsuo 365ffbd02f Tools: Tune: Suppress sof-ctl text output when getting ABI header
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>
2020-04-16 11:48:22 +01:00
Seppo Ingalsuo 32f3b31345 Tools: Tune: Cleanup for example speaker EQ script
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>
2020-04-01 13:55:51 +01:00
Seppo Ingalsuo 2831f463db Tools: Tune: Clean and improve example FIR EQ generator script
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>
2020-04-01 13:55:51 +01:00
Seppo Ingalsuo b7d7d9dc62 Tools: Tune: Cleanup of example IIR responses generator script
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>
2020-04-01 13:55:51 +01:00
Seppo Ingalsuo c186cbed97 Tools: Tune: Fix wrong gain in IIR high-pass responses generator
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>
2020-04-01 13:55:51 +01:00
Seppo Ingalsuo e0a9afe6a7 Topology: Apply high-pass for HDA capture streams
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>
2020-01-16 19:48:33 +00:00
Seppo Ingalsuo f7b9e6270f Tools: EQ: Make a light FIR configuration to test with GCC build
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>
2019-12-20 13:47:18 +00:00
Curtis Malainey c1be04e64c EQ: GUI: Remove globals
Globals should not exist if they don't have to, they are limiting to
extensibility

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2019-12-19 20:44:35 +00:00
Curtis Malainey 64f60cdad3 EQ: GUI: Add remote deployment
Add function to deploy eq automatically to dut at runtime

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2019-12-19 20:44:35 +00:00
Curtis Malainey 33048b7f72 EQ: GUI: Load dsp.ini from ChromeOS
Add function that parses dsp.ini files into the GUI format and then into
SOF format.

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2019-12-19 20:44:35 +00:00
Curtis Malainey 50e27a10b0 EQ: GUI: Add external control window
Add window for controlling loading and deployment

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2019-12-19 20:44:35 +00:00
Curtis Malainey fe2d9c197f EQ: Handle edge case in peaking filter
Handle div by 0 case for gui

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2019-12-19 20:44:35 +00:00
Curtis Malainey 30bbfb49bb EQ: Add chromium signal processing elements
Add modules for signal processing of biquad filters needed for chromium

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2019-12-19 20:44:35 +00:00
Curtis Malainey 65c6da750a EQ: Add gui for IIR filters
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>
2019-12-19 20:44:35 +00:00
Seppo Ingalsuo 92ec08dad5 Tools: Tune: Fix file paths for example FIR script
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2019-09-13 10:25:58 +01:00
Seppo Ingalsuo fa2f3a51ad Tools: Tune: Get SOF ABI header for EQs with sof-ctl
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>
2019-09-13 10:25:58 +01:00
Seppo Ingalsuo 92b23fa856 Tools: EQ: Don't force upper case EQ response name
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>
2019-09-08 13:19:48 +01:00
Seppo Ingalsuo c55aed4793 Tune: Update file path for demo EQ responses
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>
2019-08-19 09:47:04 +02:00
Seppo Ingalsuo dd8cfda311 EQ: Update ABI version number in configuration to match current version
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>
2018-12-19 10:28:25 +00:00
Seppo Ingalsuo cc6c76f1de Tools: Tune: Update EQ tools for new user ABI plus other cleanup
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>
2018-11-30 17:19:59 +02:00
Curtis Malainey 5b5888ce07 Move SOFT into sub folder for SOF merge
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2018-11-24 23:27:24 -08:00