When build tgl firmware with IPC4
configuration, disable HIFI3 conv-
erter and enable format converters.
Signed-off-by: Xiaoyun Wu(Iris) <xiaoyun.wu@intel.com>
This patch leaves out low value debug traces with CONFIG_LIBRARY for
comp_update_buffer_produce() and comp_update_buffer_consume(). They
are too far too verbose and slow down testbench runs, and cause
massive size data files if traces are captured to files.
The change is done by defining bug_dbg() macro as empty. The variable
addr needed to be eliminated because it is used only for trace.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
S24_3LE is not a native supported format for hda dma. Driver
treats it as 16bit stream or 8bit stream, .e.g. 24bit 3LE
2ch stream will be set as 16bit 3ch stream. In FW side,
24bit stream will be converted to S24LE.
Currently HIFI3 optimization is not supported now and also
S24_LE unit test is not implemented. These will be supported
later.
Tested on windows platform.
Signed-off-by: Rander Wang <rander.wang@intel.com>
For HDA gateway, 24bits sample will be in high 24bits with
32 bits container case. Alh requires 32 bits container and
all sample bits starting from bit 31 to bit 0.
Signed-off-by: Rander Wang <rander.wang@intel.com>
First we reused ipc3 pcm conversion function by by setting
frame_fmt to S24_4LE, but later found that we need different
conversion for copier with gateways support.
Now frame_fmt will be set by default config.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Compared to non-copier module, copier module uses
different conversion algorithoms for different
gateways, .e.g HDA dma requires sample bit starting
from MSB bits and also alh engine. These hw features
make pcm conversion algorithom different for different
modules.
This patch add gateway type to select conversion function.
Signed-off-by: Rander Wang <rander.wang@intel.com>
mt8186 platform integrates a single-core HIFI5 DSP.
The DSP operates at different highest clock frequencies with corresponding
voltage, 800MHz(0.8v)/400MHz(0.7v)/300MHz(0.65v)/26MHz(0.6v).
The DSP core and DMA in DSP subsys both can access DRAM directly.
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
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>
This patch contains improvements to TDFB setup scripts and examples
those are related to sound direction estimation. The changes are add
of 15 degree angle spacing to enum control, add of rotated noise sound
create for sound direction testing in simulated acoustics.
The example line, circular, and xyz array scripts are updated for single
dual mono beam that is controllable in 15 degree or 30 degree steps. All
the two beam design examples are moved into example_two_beams.m.
The patch also contains noise field covariance matrix diagonal load
increase to -40 dB. I noticed uneven frequency response in some
designs due to numerical instability. The increased diagonal load makes
the automatic design procedure more robust at minimal hit in noise
suppression performance.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Two tr_err() calls in src/ipc/ipc4/handler.c have mismatching formats
and arguments. When built with Zephyr, tr_err() translates to
printk() which then checks arguments. This allows an easy detection
of such errors.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The ret variable in ipc4_trigger_chain_dma() can be used
uninitialised. Fix it.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The err variable in ipc_cmd() doesn't have to be initialized, it is
always assigned a value.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
User IPC can provide an invalid component ID, this shouldn't lead to
a NULL dereference.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
In file included from /home/lrg/work/sof/sof/src/include/sof/audio/buffer.h:18,
from /home/lrg/work/sof/sof/src/audio/mixer.c:8:
/home/lrg/work/sof/sof/src/audio/mixer.c:45:31: error: 'mixin_uuid_ldc' defined but not used [-Werror=unused-const-variable=]
45 | DECLARE_SOF_RT_UUID("mix_in", mixin_uuid, 0x39656eb2, 0x3b71, 0x4049,
| ^~~~~~~~~~
/home/lrg/work/sof/sof/src/include/sof/lib/uuid.h:94:44: note: in definition of macro 'DECLARE_SOF_UUID'
94 | static const struct sof_uuid_entry uuid_name ## _ldc = { \
| ^~~~~~~~~
/home/lrg/work/sof/sof/src/audio/mixer.c:45:1: note: in expansion of macro 'DECLARE_SOF_RT_UUID'
45 | DECLARE_SOF_RT_UUID("mix_in", mixin_uuid, 0x39656eb2, 0x3b71, 0x4049,
| ^~~~~~~~~~~~~~~~~~~
/home/lrg/work/sof/sof/src/audio/mixer.c: In function 'mixin_bind':
/home/lrg/work/sof/sof/src/audio/mixer.c:743:17: error: 'sink_buf' may be used uninitialized in this function [-Werror=maybe-uninitialized]
743 | pipeline_connect(dev, sink_buf, PPL_CONN_DIR_BUFFER_TO_COMP);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/sof.dir/build.make:786: CMakeFiles/sof.dir/src/audio/mixer.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1970: CMakeFiles/sof.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
"make all" terminated with exit cod
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
[guennadi.liakhovetski@linux.intel.com: mixin_tr only for IPC4]
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
/home/lrg/work/sof/sof/src/audio/copier.c: In function 'copier_reset':
/home/lrg/work/sof/sof/src/audio/copier.c:519:29: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
519 | memset(cd, 0, sizeof(cd));
| ^
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/sof.dir/build.make:996: CMakeFiles/sof.dir/src/audio/copier.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1970: CMakeFiles/sof.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
"make all" terminated with exit code 2. Build might be incomplete.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
If there are no command line definitions, the build fails because the
4th argument to the add_alsatplg2_command macro is NULL.
Fix this by using named arguments for the macro and checking for the
optional argument for command line definitions.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Some useful algorithms internal traces are output with debug traces.
This patch enables the verbose trace (CONFIG_TRACEV) for library build.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The path append of current directory (.) is not correct for
the signal processing package function iirnotch. The issue does
not happen with Octave since it has pei_tseng_notch().
The standard notch function is used in all THD+N tests so this
issue has caused fail of nearly all tests with Matlab.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds to command line switch -n for output channels count.
Existing -c is for in channels, new -n is for out channels count. Out
channels count is same as input if -n is not present. Switch -q is
added to quiet the trace output if it is not needed.
The Matlab language test scripts for components are updated to use
the -t config.sh interface of comp_run.sh. It allows more flexible
control of input and output streams.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The -a option was recently broken by the addition of platform(s) that
don't have a toolchain available in the Docker image. Every platform can
be built by someone but no one can built -a(ll) platforms right now.
Add a new platform array to make the distinction between default
platforms built by the -a option versus work in progress.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
No one else has it.
Gets rid of the only shellcheck warning.
Fixes commit 7453e3d571 ("scripts: add renoir support")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The issue was found when testing 44.1khz stream on windows.
We should use input format of copier to set source buffer fmt,
not output fmt which may be dai output fmt and different from
source fmt.
According to spec, copier only support one input source and
four output sinks, so we don't need to check source list.
Tested on windows.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Automatic Regressive Input Amplifier Module
ARIA applies variable gain into incoming signal.
Applied gain is in range <1, 2 power attenuation>
Currently ARIA introduces gain transition and
algorithmic latency equal to 1 ms.
At initial release only hifi3 version is supported
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
During reset, it is only important to free the memory associated with
the runtime params, so that they can be reallocated during prepare. So
move the allocation of the cadence_codec_data to use rballoc, so that
module_free_all_memory() doesn't end up freeing it. It will be freed
during cadence_free() when the device is freed.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Remove the setup config info from all initial config data in the
codec_adapter kcontrol's. This is no longer needed.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Remove the setup cfg from struct module_datai and have one just common
config. The config sent during module init should be saved a set up config
within the module's private data if the module needs it. Modify the
cadence_codec_data and the waves_codec_data to add the setup config to
save the initial config that can be applied during prepare when it is
invoked during the reset.
Remove enum module_cfg_type and struct ca_config as they are no longer
needed.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
If module_prepare() fails, the pipeline will be reset resulting in
module_reset() getting invoked. Just return if the state is <
MODULE_IDLE which indicates that the module was never prepared.
Also, in this case, local_buff is never allocated. So, check if it is
NULL before zeroing it out to avoid DSP panic.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Remove the module ID fields from struct processing_module and struct
ca_config. The comp ID is unique across all components in topology and
can be reused to identify the modules as well.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>