The function applying the attenuation should be based
on write pointer and the current number of copied data in
the current systick.
Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
The function applying the attenuation should be based
on write pointer and the current number of copied data in
the current systick.
Signed-off-by: Damian Nikodem <damian.nikodem@intel.com>
Some topologies have the same file name specified as nhlt debug output
so they will override others. Change the names to be unique.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
The source frames count need to be checked from every
active input_buffers[n].size). Similarly in consuming the
source buffers it needs to be updated to every
mod->input_buffers[n].consumed.
Fixes: #7308
Fixes: c399624 ("Audio: Mux: Convert mux and demux to module adapter")
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The 32-bit HiFi4 exponential library function has an accuracy of 1e-4,
a unit in last place error of 5.60032793, and output ranges from
0.0067379470 to 148.4131591026 for inputs from -5 to +5 (Q4.28) (Q9.23).
Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
The config CONFIG_LOG_FUNC_NAME_PREFIX_xxx is only
enabled for ACE platforms and INF log level, and the
timestamp used is different on TGL and MTL, which
is not quite consistent.
This patch make sure the log format is consistent
among platforms and log levels.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Remove the internal linear buffer to get/store data from source
and sink. And use the index table to reduce the mod operation.
Signed-off-by: Andrula Song <andrula.song@intel.com>
use the audio_stream_avail_frames_aligned to get processing
frames and then can reduce the division of comp_get_copy_limits.
Signed-off-by: Andrula Song <andrula.song@intel.com>
There is pinmux on MTL platform to optionally enable DMIC,
add this config to the build and run the pipeline on core 1.
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
The address translation is needed only for shared in functions
coherent_release() and coherent_release_thread().
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
As host_common_params() only sets a subset of the fields,
initialize the Zephyr DMA interface struct "dma_block_config"
with zeroes before use.
Issue found in code review.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
No reason to mix cached and noncached operations when
initializing the buffer in buffer_alloc(). We take a cached
reference, so let's use that to initialize the object.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Removing writebacks of internal buffers: buf_in and buf_out.
Aria instance has exclusive access to this memory, so they are always
used at the same core.
Signed-off-by: Przemyslaw Blaszkowski <przemyslaw.blaszkowski@intel.com>
In specific cases, Aria could get more than 1ms of data in input buffer
and more than 1ms free space in output buffer. In such case, Aria tried
to process more than 1ms, while internal buffers and algorithm are
prepared only for 1ms of data. In result buffer overflow was observed
and other module data was overwritten.
Limiting Aria processing size to IBS.
Signed-off-by: Przemyslaw Blaszkowski <przemyslaw.blaszkowski@intel.com>
A ton of (valid!) warnings but this will make sure the code at least
compiles.
For more context see #7192
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
When calculating number of frames to be attenuated in HOST copier
source stream frame bytes should be used instead of sink frame bytes.
E.g. in case of 24/24 bit to 24/32 bit PCM conversion using sink
container size will reduce frames number by 1/4 which will lead to
multiple glitches.
Also attenuation has to be applied in HOST copier in playback scenario
only, thus remove from do_conversion_copy()
Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
Use the input_audio_format and output_audio_format objects instead
and fix the number of input/output formats to 1.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
There's really no reason to fall back on a default "platform" and pick
up a bunch of other, totally random settings.
Now the following command fails immediately with a useful `platform not
defined` error message instead of stopping with a cryptic
`platform/trace/trace.h: No such file or directory` after successfully
compiling half the .c files in a Frankenstein CONFIG_uration.
```
west build -p --board mimx8mm_evk_a53 modules/audio/sof/app
```
More context in #7192.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Don't rely on some semi-random default value.
The final `zephyr/.config` and binaries are strictly identical.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Use get_filename_component() to get the basename and remove the
$platform_folder special case for CONFIG_RENOIR and
CONFIG_REMBRANDT. Zero change, binaries are identical.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The rimage submodule was accidentally changed to a difference
version. Change back to the version in west.yml.
Fixes: 7511a1da15 ("kpb: Don't assert on memcpy overruns")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This is to allow CI to test a simple multicore playback case on
MTL/TGL/ADL: SSP0 playback on core 0 and SSP2 playback on core 1.
Capture uses core 0 only atm. More multicore usage will be
introduced later.
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
This handler was missing its type check and would follow comp_dev
union fields on components that might be buffers or pipelines, leading
to crashes downstream.
Found via fuzzing.
Signed-off-by: Andy Ross <andyross@google.com>
These list heads in the comp_dev struct are not uniformly initialized
(grepping the source, the list_init() calls for these fields seem to
be spread around the source tree in individual components). Fuzzing
is seeing nulls here, presumably because it's possible to reach
ipc_comp_free() in "unintended lifecycle" circumstances where they
weren't initialized. Check the fields before crashing.
Signed-off-by: Andy Ross <andyross@google.com>
This function is called based on external commands, and with an
arbitrary component ID that may not actually be a pipeline. Check the
type before following garbage pointers and passing them down into call
trees.
Found via fuzzing.
Signed-off-by: Andy Ross <andyross@google.com>
The config block for the component gets provided externally and is
copied directly in using a byte count likewise provided by the host.
The use of memcpy_s() prevents overruns, but the error that was
detected was being reported via assert(). To fuzzing, that assertion
is a fatal error, when clearly this needs to be a runtime failure as
it's due to external input and not a local code bug.
Signed-off-by: Andy Ross <andyross@google.com>
Those function are both needed in legacy and zephyr part, simply
with zephyr prefix is not suitable, rename it with common prefix.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Host and gateway case already have common function to handle
trigger and reset, add this wrap to align dai with host.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
peak meter value
Add kconfig to select the period of reporting peak meter value.
The default value is reporting peak meter every 10 ms.
Signed-off-by: Andrula Song <andrula.song@intel.com>