remove buffer_acquire / release from ipc helpers
this is a continuation of changes
from commit 4a03699911
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
remove 2 inline functions
comp_get_copy_limits_with_lock
comp_get_copy_limits_with_lock_frame_aligned
this is a continuation of changes
from commit 4a03699911
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
remove unnecessary calls from buffer.c/h
this is a continuation of changes
from commit 4a03699911
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
The dataAs function can return null if the buffer size is smaller than the
size of the target structure. Added handler for this situation.
Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
use dynamic for all the adl and rpl topologies except 3p(waves,DTS),
excluded Dell sdw topologies which are not tested.
Signed-off-by: Vamshi Krishna Gopal <vamshi.krishna.gopal@intel.com>
sys_service_p in
src/audio/module_adapter/library/native_system_agent.c is unused,
remove it.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
At the pipeline reset stage, the direction of the components
is not always known, resulting in a call to a field that is null
and consequently a crash/timeout.
Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
When I2S-like interface is enabled we must have
2 words in a frame because this is how I2S works (it has 2 channels)!
So, even if the user plays a mono file we must configure 2 words per
slot and the second slot will be masked so the users will get silence
on the second channel.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
use the ts_config of struct dai_data as input/output
parameter instead a temporary variable while calling
the dai timestamp functions.
Signed-off-by: Andrula Song <andrula.song@intel.com>
during host copy, buffer acuquire and release should be used
as less as possible, since it takes a lot of cycles, for this
patch, cycle reduction is: 425 to 406, nearly 5% reduced.
note: test plafrom is tgl up board with sof debug build, base
platform clock is 38.4mhz.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
in parameter, dma sample bytes already was calculated and assigned
to dma config, during copy, this can be directly used, cycle saving
is quite remarkable, 452 to 425, previous target is 420, we already
meet with this patch.
note: test platform is tgl board with sof debug build.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
there are two return in common update, remove the first
to save cycles, test platform is tgl board with debug sof
build, it can save cycles from 455 to 452.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Logging with probes was not implemented. This implements
ipc that enables logging with probe configuration.
Signed-off-by: Jakub Dabek <jakub.dabek@intel.com>
The abs() function need to be added to plot the correct magnitude
response. Matlab warned in this case about ignoring imaginary
part.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch adds generate of blob for tplg2 and ipc4 in
formats .conf, text, and binary formats.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Adding sof-rpl-rt711-l0-rt1316-l12.tplg. The topology is the same
as sof-rpl-rt711-l0-rt1316-l12-rt714-l3, but without local mic (rt714).
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
This patch adds switch control handling into multiband_drc_set_config()
operation. The switch control is a set large config with
param_id set to SOF_IPC4_SWITCH_CONTROL_PARAM_ID.
The patch changes config_id to param_id in this function. The
config_id name was confusing.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The structs sof_ipc4_control_msg_payload and sof_ipc4_ctrl_value_chan
match the similar structures in Linux kernel SOF IPC4 driver.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Add a new kconfig option to build the shared library modules that can be
used to run the pipelines on the host with the testbench or the ALSA
plugin.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add missing platform definitions for CPU freq, DAI definitions etc.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add the posix headers for use with the SOF ALSA plugin.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.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>
Host based mailbox needs to be fixed in another place. It's here
now until rtos partitioning is done.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
When an IDC message is received from another core, the receiver core
doesn't have any useful data for it in cache. Writing back the cache
can corrupt the message data. Cache has to be invalidated instead.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
module_init in ipc4_init_module_instance() is completely overwritten,
no need to initialise it.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
previously, these headers are located in include directory.
Now, move it to src/audio/src/ directory, since these headers
are only used by src module.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Module adapter interfaces are a collection of methods, implementing
the API, they never change. Make them const.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
DP queue is a lockless circular buffer
providing safe consumer/producer cached operations cross cores
prerequisites:
1) incoming and outgoing data rate MUST be the same
2) Both data consumer and data producer declare
max chunk sizes they want to use (IBS/OBS)
required Buffer size:
- 2*MAX(IBS,OBS) if the larger of IBS/OBS
is multiplication of smaller
- 3*MAX(IBS,OBS) otherwise
The queue may work in 2 modes
1) local mode
in case both receiver and sender are located on
the same core and cache coherency
does not matter. dp_queue structure is located in cached memory
In this case DP Queue is a simple ring buffer
2) shared mode
In this case we need to writeback cache when new data
arrive and invalidate cache on secondary core.
dp_queue structure is located in shared memory
dpQueue is a lockless consumer/producer safe buffer.
It is achieved by having only 2 shared variables:
write_offset - can be modified by data producer only
read_offset - can be modified by data consumer only
as 32 bit operations are atomic, it is multi-thread and multi-core save
There some explanation needed how free_space and
available_data are calculated
number of avail data in circular buffer may be calculated as:
data_avail = write_offset - read_offset
and check for wrap around
if (data_avail < 0) data_avail = buffer_size + data_avail
The problem is when write_offset == read_offset,
!!! it may mean either that the buffer is empty
or the buffer is completely filled !!!
To solve the above issue having only 2 variables mentioned before:
- allow both offsets to point from 0 to DOUBLE buffer_size
- when calculating pointers to data, use:
data_bufer[offset % buffer_size]
- use double buffer size in wrap around check when calculating
available data
And now:
- write_offset == read_offset
always means "buffer empty"
- write_offset == read_offset + buffer_size
always means "buffer full"
- data_avail = write_offset - read_offset
if (data_avail < 0) data_avail = 2 * buffer_size + data_avail
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Data provided by source interface cannot be modified in any way
by the module using source API.
Mark pointers as const
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Tone component has been without maintenance and validation,
and there is no interface to control sound generation from
user space so it will be deprecated and removed from successive
release.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
after removal of __Sparse some of lines may be
formatted differently.
This commit contains cosmetic changes only
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Prev commit removing __sparse was a pure editor action,
this commit is removing some other __sparse annotations and
mappings that must have been done manually
This commit contains "safe" changes only
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
This patch adds the topology2 files for multiband-DRC. The EFX
processing chain is gain - IIR - FIR - DRC or Multiband-DRC. The
DRC selection is done with macro EFX_DRC_COMPONENT and values
"singleband" and "multiband".
The multiband-drc has two ALSA controls, bytes and switch. The
switch control switches the processing on and off.
The generated topology files with multiband-drc are:
sof-hda-efx-mbdrc-generic.tplg
sof-hda-efx-mbdrc-generic-2ch.tplg
sof-hda-efx-mbdrc-generic-4cg.tplg
The topology files with DRC are as before:
sof-hda-efx-mbdrc-generic.tplg
sof-hda-efx-mbdrc-generic-2ch.tplg
sof-hda-efx-mbdrc-generic-4cg.tplg
The configuration blob default is updated to what is generated
by the current example_multiband_drc.m configuration script. The
pass-through blob is set as default for tplg2. The topology 1
blobs are updated similarly.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
as buffer pointer now is not swapping between cached
and uncached aliases, there's no need to convert pointers
in notifier events
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>