Make the filename argument be a const char * to avoid the following
warning with c++ compliation:
warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The test function is based on test function for the cordic
sine function. The error tolerance is adjusted to just pass.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Remove unused META definition, below work is done:
1. removed META definition.
2. removed cmocka preproc module.
3. removed cmocka strcheck and debugability module.
With this change, cmocka does not have any dependency on
META programming.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Direct numbers are hard to know what exactly means, it
actually represent log error level print, use macro to replace
it.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
This is a clean up, purpose is declutter headers, toml files,
Readme.md etc per module basis, since today everything is scattered
in current code base.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
This is a clean up, purpose is de-cluster headers, toml files,
Readme.md etc per module basis, since today everything is
scattered in current code base.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Moved header files to the module directory to separate an shared interface
used by sof and native loadable modules.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Move out ipc3 and ipc4 specific code to corresponding source file.
Also, move some common functions to header file.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
By default ipc_get_comp_by_ppl_id() routine omits component
from core different that the one where pipeline is working.
However with introduction of DP modules such situation can happen.
In some flows we need to find modules that belongs to given pipeline
but are scheduled on different core. This modifications will allow to
select when include such modules in the search.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
create ipc3 and ipc4 specific source file, these files will
only be used to store specific code accordingly.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Host build should not depend on testbench symbols. Also add timestamp to
the trace log.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit removes coherent.h from struct comp_buffer
As sharing status of a buffer is known at creation time, it is
enough to create a buffer in shared (not cached mem alias)
when it will be used by several cores
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
For sample format with 24 bits valid sample bit and 32 bits container,
valid sample is at msb 24bits if IPC4_TYPE_MSB_INTEGER is set.
Signed-off-by: Rander Wang <rander.wang@intel.com>
This check in change eliminates the extra include isa.h header file
from the exp_fcn_hifi.c file, as it does in the exp_fcn.h file.
Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
Fix the cmocka build issue after adding functions
for explicitly get ipc device for component, buffer
and pipeline.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
For sample format with 24 bits valid sample bit and 32 bits container,
valid sample is at msb 24bits if IPC4_TYPE_MSB_INTEGER is set.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Defined a new frame type SOF_IPC_FRAME_U8 for 8-bit unsigned samples. Added
support for a new format to stream format conversion function and
get_sample_bytes function.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
The switch supporting various sample formats was missing a default handler,
which caused compilation errors when enabling/adding a new format that is
not supported.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
The switch supporting various sample formats was missing a default handler,
which caused compilation errors when enabling/adding a new format that is
not supported.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Add passthrough functions implementation. If the gain of all
channels equal 0dB, then we use passthrough functions to process
the volume component.
Signed-off-by: Andrula Song <andrula.song@intel.com>
Module prepare is an operation that needs to set up sink
and source according to needs.
Therefore it must have access to sink/source handlers
This commit adds handlers to API. In case the module uses
legacy audio stream sink/source pointers will be NULLs
and number of sinks/sources will be zero
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Target is to make all modules use sink/source API as
data source and destination.
However, current implementation of module adapter
allows 2 other completely different interfaces to be used:
"simple_copy"
modules receive output_stream_buffer and
input_stream_buffer table. void * data pointers
from both structures point to audio_stream
other fields in the structures are in fact not needed
but are used
"! simple_copy"
modules receive output_stream_buffer and
input_stream_buffer table. void * data pointers
from both structures point to raw linear data
to make transition smooth and easy, both
legacy ways have been kept, just to make the code
more clear - put at separate module API calls,
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Make audio_stream capable of using pipeline2.0
sink and source API
This change makes integration of sink/src api
possible in incremental way
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
There are many operations on sink/source that may be put into a
common library. This is the place for it.
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
this is a definition of API to sink of audio data
THE SINK is any component that can store data somehow
and provide a buffer to be filled with data at request.
The sink API does not define how the data will be processed/used
The user - a module - sees this API as a destination
it must send data to
The IMPLEMENTATION - audio_stream, DP Queue -
sees this as a producer that PROVIDES data for processing
Examples of components that should expose SINK api
- /dev/null
all the data stored in sink buffer are just simply discarded
- I2S sender
Data stored in sink buffer will be sent to the external world
- a memory ring buffer
data stored in the buffer will be sent to another module
(usually using source API, but it does not matter in fact).
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
this is a definition of API to source of audio data
THE SOURCE is any component in the system that have data
stored somehow and can give the data outside at request.
The source API does not define who and how has produced
the data
The user - a module - sees this as a producer that
PROVIDES data for processing
The IMPLEMENTATION - audio_stream, DP Queue - sees
this API as a destination it must send data to
Examples of components that should expose source API:
- DMIC. Data are coming from the outside world,
stores in tmp buffer and can be presented
to the rest of the system using source_api
- a memory ring buffer
Data are coming from other module
(usually using sink_api, but it does not matter in fact)
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@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>
Set byte_align as 1 and frame_align as 1 means no limit on both byte and
frame for this stream. Call audio_stream_init_alignment_constants in
audio_stream_init, set default align info while buffer created. And every
specific component can set its own byte and frame align info in its
prepare function later.
Signed-off-by: Andrula Song <andrula.song@intel.com>
This patch converts the demux_copy, mux_copy, and
mux_get_processing_function tests to module adapter API.
The main change is in component new preparations with
UUID reference.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The purpose of this commit is to separate XTOS-specific code
from the Zephyr-specific code found in sof/schedule/task.h.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
The purpose of this commit is to separate the XTOS-specifc
code from the Zephyr-specifc code found in sof/sof.h.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Fix the peak volume calculation error in volume component, calculate
the maximum absolute value of input as peak volume as close source
firmware did.
Signed-off-by: Andrula Song <andrula.song@intel.com>
The 32-bit exponential library function has an accuracy
of 1e-4 and a unit in last place error of 4.5878 for
inputs from -5 to +5 (Q4.28) and outputs from 0.0067379470
to 148.4131591026 (Q9.23).
Signed-off-by: ShriramShastry <malladi.sastry@intel.com>
Use the module interface instead of the comp drv interface for the
EQ IIR component.
In processing functions the dev structure is changed to the new mod
structure.
In filter initialize functions the mod structure provides the
configuration.
The eq_iir_init() function is converted to follow the module init
conventions.
The params() and cmd() functions are removed since they are done
in module adapter. The set/get config functions are added to handle
the binary blob set/get.
The copy() function is changed to module adapter eq_iir_process()
form. Data is processed from input_buffers[0] to output_buffers[0].
The eq_iir_prepare() is changed to set the frame and byte alignment
for module adapter. The sink streams size check is removed since
it is done in module adapter.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Add HiFi3 version implementation of FFT. Test with xtensa
simulator, we can save about 52.7% cycles for 16bit processing
and 58.1% for 32bit processing.
Signed-off-by: Andrula Song <andrula.song@intel.com>
The last parameter of memcpy_s() isn't the size of the source buffer,
it's the actual number of bytes that should be copied.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Add C and hifi3 version Direct-1 implementation for IIR,
and rename the structure of sof_eq_iir_header_df2t to
sof_eq_iir_header for both two format sharing. Compared
with the original Direct-2 transport format,Direct-1 has
better performance on low frequency since lower quantization
noise while asking the same memory. The C version cost the
same cycles and hifi version can save about 9.8% cycles than
Direct-2 transport format.
Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>