Override incompatible options CONFIG_SMP_BOOT_DELAY and
CONFIG_SCHED_CPU_MASK_PIN_ONLY found in `sof/app/prj.conf` to silence
build time warnings. Strange why these are in `app/prj.conf` but not our
problem here.
```
warning: SCHED_CPU_MASK_PIN_ONLY (defined at kernel/Kconfig:139) was
assigned the value 'y' but got the value 'n'. Check these unsatisfied
dependencies: SMP (=n).
warning: SMP_BOOT_DELAY (defined at kernel/Kconfig.smp:32) was assigned
the value 'y' but got the value 'n'. Check these unsatisfied
dependencies: SMP (=n).
```
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Recent changes to UUID naming dropped the _comp in the UUID declaration.
Fix the noise suppression module to adhere to the new naming while
declaring the module interface and trace.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The scripts are moved to consolidate the audio modules.
The setup tool is common for IIR and FIR where IIR is more
commonly used so the destination directory is eq_iir. The
equalizers with both IIR and FIR part are also designed in
the same run so the design is not split.
The paths are fixed in code for new location. There are no
other changes.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Only cosmetic change, no functionality changed. Noticed while
comparing hifi3 and hifi4 code versions. Now one difference
less.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The instruction AE_L16_XC() uses circular buffer0, so the
buffer setup instruction need to be changed. The proper
instruction for buffer 1 would have been AE_L16_XC1().
Due to this error the MFCC output became incorrect after
wrong circular buffer wrap.
Fixes: 5c92bddcf4 ("Audio: MFCC: Add HiFi4 implementation of MFCC")
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch fixes an issue with gain and peakvolume processing
with s16 sample format and with sample rates where period is not
multiple of four samples SIMD processing assumption. With 44.1 kHz
rate the period is normally 44 frames but every 10th is 45. However,
the value of 45 was not handled correctly. A Glitch appeared to
output when this happened.
The fixed code adds sample-by-sample volume process code for the
remaining amount of up to 3 samples to process.
The earlier workaround (87571f337c "audio: volume: disable HIFI4
optimizations") is reverted.
Signed-off-by: Grzegorz Bernat <grzegorzx.bernat@intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The MFCC component is not loading in these platforms due to
missing edit to <platform>.toml.h.
As editorial change the missing newline in the end of
ptl.toml.h is fixed.
Fixes: f7715b814b
("Audio: MFCC: Fix build of component for current SOF")
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Zephyr PR 77289 fixed deferred logging with LLEXT objects, update to
a Zephyr version, containing it.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Logging context can be accessed from the deferred logging
thread. Therefore it must be always available to avoid
access to unmapped memory when an LLEXT module is unloaded.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
uuid.h uses uint32_t, uint16_t and uint8_t types, it must include
stdint.h or inttypes.h.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
No need to set clock frequency if the new one is equal to the current
one.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Adding or subtracting module CPC when starting and stopping pipelines
is brittle. Particularly it's prone to mistakes with modules, not
specifying their CPC explicitly. Instead recalculate CPC every time
a pipeline is started or stopped.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Extract the module_is_llext() macro into a header and add a function
to identify a loadable module type of a component.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Extract code to obtain a pointer to the module base configuration,
depending on its type, into a separate function.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Both are reported by Github as "Unknown owner on line 31: make sure
@makarukp exists and has write access to the repository"
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This switch case is non exhaustive and has not guards on config types
which means assuming all types that are default are process types is
false. The fuzzer found a way to utilize a DAI to bypass IPC layer
checks but break the module adapter.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
The ext size is counted as part of the ipc header size. The process size
and header size need to be less than the ipc max size.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Long overdue, I don't know why we keep adding complicated stuff
without having a simpler baseline.
Two configurations are provided, one with default copiers and another
with CHAIN_DMA.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The verbose test trace flood slows down the test to near
unusable test times due to a lot of text printed to Octave
console. As result also the SOF CI logs become large.
This patch adds redirect of testbench trace into a temporary
file instead of standard output in process_test.m. The trace
content is printed in comp_run.sh to console only if there has
been an error. To prevent growing /tmp the trace file is
deleted after test run and possible print to console.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The testbench and unit tests use a simplified simulated IPC that
currently doesn't support messages split to multiple parts. As
workaround to unblock other SOF development the size is increased
from 384 bytes to 8192 bytes.
This allows run of current test set with scripts/host-testbench.sh
that is also used in SOF CI. The change can be reverted after the
capability is added to testbench.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Add Doxygen comments to describe the parameters and functionality of
the crossover_s32_default function. This helps in understanding the
function's flow and the purpose of each section.
Signed-off-by: Shriram Shastry <malladi.sastry@intel.com>
Optimize the function by pre-initializing active sinks and adjusting loops
for better performance and readability.
Signed-off-by: Shriram Shastry <malladi.sastry@intel.com>
We should be using the trusted max size passed in via the framework
rather than the scratch memory we are passing into the host.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Check to make sure we actually have enough space to copy the config, if
we don't we will assert and crash when we could have handled this
gracefully.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
The comp_* macros will print the function name from where they are called,
there is no need to print them twice.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The 'nothing to copy' without context does not help in debugging, print
out the number of frames on src and sink side to give some context.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
The comp_* macros will print the function name from where they are called,
there is no need to print them twice.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
If 0 is a error then override it so the outer function doesn't think we ran
successfully and then hit a null ptr after we freed everything.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Without this change turning the performance measurements off, by setting
CONFIG_SOF_TELEMETRY_PERFORMANCE_MEASUREMENTS=n, causes a number of
"undefined reference to" linker errors.
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Extract -DCONFIG_* definitions hardcoded inside the script and move them
to a new .conf file where they belong.
This is a first, baby-step towards addressing the more general lack of
.config control described in #9386
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The rate_min and rate_max no more work with IPC4 topologies. The
SSP2 PCM host pipeline contains a sample rate converter so it can
support multiple rates. With attempt to play (or capture) with
other than 48 kHz the error is printed and resulting playback has
wrong pitch:
Warning: rate is not accurate (requested = 44100Hz, got = 48000Hz)
please, try the plug plugin
Use of rates with list of all rates in topology fixes the issue.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The comp_err() trace in mfcc_init() causes an error:
sof/src/audio/mfcc/mfcc.c: In function 'mfcc_init':
sof/src/include/sof/audio/component.h:160:20:
error: format '%u' expects argument of type 'unsigned int',
but argument 4 has type 'size_t' {aka 'long unsigned int'}
[-Werror=format=]
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Now that validate_config has been deleted we can clean up some of the
error handling logic here.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
empty TODO for 4 years, no point in keeping it around. Also if you are
doing validation after trusting the data enough to do a memcpy you have
already lost.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
- Added detailed function documentation.
- Changed from if-else checks to bitwise operations for efficiency:
- Shifted left by 24 bits to prepare for saturation.
- Shifted right by 24 bits to sign-extend the value.
- Extracted the 8-bit value using AE_MOVAD32_L.
- No performance degradation observed.
This check-in refines the sat_int8 function by improving its logic
and documentation to ensure a more efficient and accurate 32-bit to
8-bit conversion process.
Signed-off-by: Shriram Shastry <malladi.sastry@intel.com>
- Added detailed function documentation.
- Changed from AE_SAT16X4(x, x) to a more descriptive process:
- Moved the 32-bit value to ae_int32x2 type for accurate input
handling.
- Used AE_SAT16X4 to saturate and pack values.
- Extracted the first 16-bit value with AE_MOVAD16_0.
- No performance degradation observed.
This check-in enhances the sat_int16 function by improving its logic
and documentation to ensure more accurate 32-bit to 16-bit conversion.
Signed-off-by: Shriram Shastry <malladi.sastry@intel.com>
- Added detailed function documentation.
- Changed from AE_SRAI32(AE_SLAI32S(x, 8), 8) to AE_SAT24S for
more accurate 24-bit saturation.
- Used ae_f32x2 type to ensure correct input handling.
- No performance degradation observed.
This check-in enhances the sat_int24 function by improving its logic
and documentation to ensure more accurate 32-bit to 24-bit conversion.
Signed-off-by: Shriram Shastry <malladi.sastry@intel.com>
- Enhanced function documentation.
- Replaced AE_SLAI64 with AE_SLAI64S for better saturation control.
- Added intermediary shift left by 32 bits with saturation.
- Final shift right by 32 bits for accurate rounding and conversion.
- No performance degradation observed.
This check-in ensures more accurate and reliable results by using more
appropriate intrinsic functions and thorough step-by-step operations.
Signed-off-by: Shriram Shastry <malladi.sastry@intel.com>
- Changed year to 2024 and added author information.
- Updated the license identifier to BSD-3-Clause.
Signed-off-by: Shriram Shastry <malladi.sastry@intel.com>