Use list_is_empty to check the message is queued or not. The notify
message is initialized to empty after deleting from the ipc msg list.
We use the same idea in ipc_msg_send.
Signed-off-by: Rander Wang <rander.wang@intel.com>
In multicore case, IPC message is dispatched from primary core to
secondary core which send reply message to host. Primary core will
do nothing if IPC_TASK_SECONDARY_CORE is set. But in rare case, the
secondary code finish the reply message and clear this flag before
the ipc thread in primary core check this flag, then primary core
also send reply message again. This results to the reply message being
inserted two times in ipc message list and infinite loop when visiting
the list.
This patch will check msg_reply state and do nothing if it is prepared
. We don't need to init reply message since it is initialized after
deleting from the ipc list.
Signed-off-by: Rander Wang <rander.wang@intel.com>
The HiFi3 code is faster and compatible so it should be used
instead of generic version for HiFi4.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The normally undefined SOF_FIR_FORCEARCH or SOF_IIR_DF2T_FORCEARCH
can be defined at command line to force the build of other code
optimized version for any compiler. The usage is only for
debugging, e.g. build generic FIR version with xcc.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Add myself to the list of default owners that get added to
all pull requests if no other entries match.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The z_delayed_work field in struct task is a delayed work, so to go from
k_work to it safely there's an extra step. Add a
k_work_delayable_from_work to fix that.
This is harmless right now because k_work is the first field in
k_work_delayable but the extra step is the safe way of doing it.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.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>
This reverts commit 80c6738b89.
The Zephyr default changed in commit 385ad46a39ca so this is not needed
anymore.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This patch replaces legacy component API with new module adapter
API. There are no changes to functionality.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Fixes commit 4286bb3ee1 (".github/zephyr: west update with new, faster
git --filter-tree:0") that accidentally dropped git tags from `git
describe` in Zephyr since April and made the build different from
everyone else.
See detailed explanation added to the source.
To find the output of `git -C zephyr/ describe`, search for
`generated/version.h` in the build logs.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Add an new topology adl-max98360a-da7219.tplg for DA7219 headphone
codec with MAX98360A speaker amplifier on ADL boards. The MCLK
frequency is set to 24.576MHz to use PLL bypass mode and avoid the
WCLK locking problem on earlier platforms.
Signed-off-by: Brent Lu <brent.lu@intel.com>
This config is used for old intel cavs 1.x platform, now, those
platform are removed from sof, this config also need remove,
related code got removed as well.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
SDMA support loading firmware RAM scripts in order to enhance
functionality. We will need this for supporting multi-fifo
with upcoming MICFIL PDM driver.
Allow SDMA to load such scripts selected via CONFIG_HAVE_SDMA_FIRMWARE
config.
A RAM script interface guarantees that there will be the following
information provided:
- sdma_code, an array of bytes containting the actual script binary
- RAM_CODE_START_ADDR, location in RAM where to load the script
- RAM_CODE_SIZE, size of the sdma_code array.
Because RAM scripts are NXP proprietary binaries we won't make them
public but offer the interface to integrate them with SOF in private
builds.
We use for now sdma_script_code_imx7d_4_5.h header file which must be
present in location indicated by CONFIG_SDMA_SCRIPT_CODE.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Fixes commit 6f9f2ee28e (".github/zephyr: build with the debug overlay
and CONFIG_ASSERT")
Remove misspelled `zephyr_revsion` matrix variable. It was a hasty
copy/paste in that commit.
It's a harmless no-op because build-windows does not play any git tricks
and always builds from the manifest. However it makes the list of
configurations confusing in the Github interface.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The existing component ID is composed with
'module_id << 16 | instance_id', it doesn't
comply to the initial instance IPC structure:
struct {
uint32_t module_id : 16;
uint32_t instance_id : 8;
...
};
When the ID is logged through mtrace, it is
hard to use the ID to find the related linux
kernel message.
This patch fixes component ID composition macros,
thus helps to eliminate component ID inconsistency
between firmware and linux kernel.
Link: https://github.com/thesofproject/sof/issues/8051
Signed-off-by: Chao Song <chao.song@linux.intel.com>
source_set_ibs() and source_set_obs() take a cached pointer.
Fix code in ipc_comp_connect() to adhere to the prototype.
Fixes sparse warnings:
ipc4/helper.c:389:49: warning: incorrect type in argument 1 (different address spaces)
ipc4/helper.c:390:45: warning: incorrect type in argument 1 (different address spaces)
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The multiband_drc_coef_default.m4 is updated to what the current
setup tool example_multiband_drc() exports.
Another blob for pass-through is added with emphasis and all bands
processing disabled. Such blob is useful when headphone and
speaker paths are shared. Headphone mode should use pass-through.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
In this patch, audio_format is deprecated, and use
input_audio_format/output_audio_format instead.
Correct the IIR control bytes naming, and make it the
same with other HDA topology.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Currently the pipeline state change flow handles the phases at the same
time for each pipeline (for two pipelines):
pipeline1 prepare
Pipeline1 trigger
pipeline0 prepare
Pipeline0 trigger
This can open a race condition when pipeline1 is already triggered and is
in active state while pipeline0 is not yet prepared, configured.
The process function of a component from pipeline1 might query information
from pipeline0 at this point, which can lead to errors.
With the separate loops the flow will be changed to:
pipeline1 prepare
pipeline0 prepare
Pipeline1 trigger
Pipeline0 trigger
It will make sure that all pipelines and components have been prepared
before the triggering is going to happen.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
# Conflicts:
# src/include/sof/ipc/topology.h
# src/ipc/ipc4/handler.c
Execute the requested phases of the pipeline state change specified by
the phase parameter.
If no phase has been specified then run both phases as oneshot.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Make the ipc4_pipeline_prepare and ipc4_pipeline_trigger available outside
of handler.c to be used to implement staged pipeline state phases.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Add definitions for pipeline state change phases to be executed when a
PPL_STATE message is handled by a remote core.
The phase can be a combination of:
PREPARE and TRIGGER.
PREPARE will run a configuration (state change preparations) phase on the
pipeline
TRIGGER will run a a trigger on the pipeline
Set ONESHOT in ipc4_set_pipeline_state() to have both phases to be run in
order to avoid regression.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
In preparation to share the extension with an action, first introduce a
mask so that the idc code is prepared for a shared use of the extension.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Separate the set_pipeline_state() function into two distinct phase:
ipc4_pipeline_prepare() and ipc4_pipeline_trigger()
The two phase will be used later directly to avoid race conditions when
a pipeline is already set to run while the connected pipeline is not yet
prepared.
With the split also clean up the debug prints to be unified and clear.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Currently DMA buffer size is aligned to 32. It should be:
rec_buff_size = ROUND_UP(rec_buff_size, min_buffer_size);
rec_buff_size = ROUND_UP(rec_buff_size, round_up_size);
Period_bytes should also not be aligned to 32 for 24/24 format
Change resolves timeout problem during offload
of playback with 44.1 format
Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
/home/bamboo/sof_dir/sof/src/audio/mfcc/mfcc_hifi4.c: In function
‘mfcc_source_copy_s16’:
/home/bamboo/sof_dir/sof/src/audio/mfcc/mfcc_hifi4.c:86: warning:
assignment from incompatible pointer type
/home/bamboo/sof_dir/sof/src/audio/mfcc/mfcc_hifi4.c: In function
‘mfcc_fill_prev_samples’:
/home/bamboo/sof_dir/sof/src/audio/mfcc/mfcc_hifi4.c:119: warning:
assignment from incompatible pointer type
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
In IPC4 system the output sinks of crossover are not defined by
pipeline identifiers but by pin indices. The error message is
updated to be IPC version agnostic to avoid confusion.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The code contains some m-language syntax that is not supported
by Matlab. The code lines are changed to compatible with both
Octave and Matlab. The blobs computation is not changed.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This patch re-structures function example_multiband_drc() to
let it generate multiple differentiated configurations. The
computation of blob is moved to new function export_multiband_drc().
The script now generates default (same as before) and pass-through
blobs.
Inside the function the paths for tplg1 and tplg2 are updated as
well as locations of data blobs for sof-ctl. The run of export
function creates blobs for both tplg1 and tplg2 with SOF IPC
versions three and four.
check_create_dir() common function is added to avoid error with
missing directory for export and for warning message about
already existing directory that just using mkdir() would do.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Includes following rimage commits:
4fb9fe0057 config: lnl+mtl: fix length of ADSP.man CSE manifest
c809af8168 Config: Add crossover component for TGL and TGL-H cAVS platforms
8c8440070a style: trailing whitespace is the root of all evil
d20f1d8a85 actions: remove travis
af9a2fe58f Config: Fix comment typo for EQ FIR module
b8ee1aa8f6 Config: Add DRC component to TGL, TGL-H, MTL, LNL
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Result of the function call ipc_get_comp_by_id() had been dereferenced
without checking whether the pointer may be null.
Returned pointer may be null when component does not exist on the
list.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
The script runs the unit tests natively as gcc compiled. The
tgph_defconfig is no more available, so use another configuration
that is available in src/arch/xtensa/configs.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Use small tricks to make dai have better performance, with
this patch, dai single playback performance back to origin
state(before convert to module interface).
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>