The type member in struct sof_abi_hdr is used for component's
specific blob type for IPC3, some module count on it to know
the blob is for module config or module processing algorithm
model. We should pass it to set_configuration ops.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
while enable volume ramp, we may need to run the while loop in
volume_process function several times, but we only update the
read/write pointers of in/output streams in module_adapter copy
function after the whole volume_process function finished. Then
we would always get and store data from wrong address and lead to
discontinuity waveform.
Signed-off-by: Andrula Song <andrula.song@intel.com>
Task state shouldn't be modified by client code, it is fully managed
by the scheduler. Setting task status to INIT after scheduling a task
is wrong and for chain DMA it leads to a scheduler exception. Simply
remove the offending line.
BugLink: https://github.com/thesofproject/sof/issues/7084
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Zephyr LL-scheduler is supposed to be able to handle tasks, removed
or added while the scheduler is executing. However, there is a bug in
that implementation. If the task, that is currently executing, is
removed, its list head, that links it into the list of tasks, is
initialised. So when trying to get a pointer to the next task we
obtain a pointer to the same task.
BugLink: https://github.com/thesofproject/sof/issues/7084
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Remove all support for cAVS 1.5 platformsm including Apollo Lake,
Sky Lake, Kaby Lake, Broxton and Gemini Lake, they aren't supported
any more.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The purpose of this commit is to get rid of the dependency
on xtos/include/sof/lib/io.h when building SOF for Zephyr.
Apart from that, this commit solves or gets us closer to
solving the following issues:
1) Compiling SOF for arm64 architecture results
in warnings such as the following:
"warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]"
2) Enabling CONFIG_SOF_ZEPHYR_STRICT_HEADERS will
result in a compilation error. One of the causes
for this is the fact that sof/lib/io.h doesn't
exist.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
The naming scheme used for the 64-bit read/write function is
not consistent with the naming scheme used for the other
read/write functions. This commit fixes this.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
One of the functions of the IDC thread is to execute IPCs on
secondary cores, those have to be executed with the same priority as
when they're run on the primary core, i.e. with the priority of the
IPC thread. Set IDC thread priority equal to the IPC thread.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Zero functional change. Next commit will build rimage _before_ building
the firmware which will be required when `west build` starts signing by
default (https://github.com/zephyrproject-rtos/zephyr/pull/54700)
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Includes:
- rename of xcc-clang compiler to xt-clang
- updates in C++ headers in zephyr/sys/util.h that require C++14
standard now.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Recent changes to Zephyr header files written in C++
use templates and features provided by the C++14 standard.
Meteorlake board that is built with Zephyr has some C++ code
that uses those headers.
We upgrade straight to C++17 since it is newest standard currently
supported by xt-clang toolchain.
This change does not affect any other boards since the do not
have any C++ code as the time of writing.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Intel Meteorlake release toolchain is Xtensa RI-2022.10 version.
New toolchain does not support xt-xcc driver anymore so we are
forced to switch to new xt-clang driver.
To distinguish between default driver for the platform built,
(Xtensa GCC or Clang) added new field to script platform list
containing a toolchain name "xcc" or "xcc-clang" expected by
Zephyr project.
Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
Add Asynchronous Messaging Service. This can be used to communicate between
modules.
Asynchronous Messages are one-way messages from one producer to one or
multiple registered consumers. Messages between modules on different
cores are sent through IDC. All inter-core communication must be proxied
by the main core.
Signed-off-by: Krzysztof Frydryk <krzysztofx.frydryk@intel.com>
The previous value 10 is only 0.1 us that disables the gain
ramp totally and causes harsh sounding volume transitions.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
All arch/ files should be only used by XTOS. Since the
include statement from cpu.h is not used at all we can safely
remove it. With this, we can make the split between Zephyr
and XTOS more clean.
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/drivers/idc.h.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.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>
schedule_task_free() might be a blocking call. E.g. the Zephyr
LL-scheduler implementation can call k_sem_take(). Do not call
this function with a spinlock held.
Link: https://github.com/thesofproject/sof/issues/7156
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
If the initial_ramp is zero, the ramp_finished would always be true,
that means we will never copy gain to circular buffer except we reset
state.
Signed-off-by: Andrula Song <andrula.song@intel.com>
Fix minor misunderstanding in review of git commit 430893f18a
("CODEOWNERS: refer to github documentation on file syntax")
Signed-off-by: Marc Herbert <marc.herbert@gmail.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>
Not all amplifiers support feedback. We should not add feedback support
on topology to shch amplifiers.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
index
We use the "pcm id * 10 + N" formula where N is from 0 to 9 to assign
pipeline and route id in f0a010052b ("topology2: cavs-sdw: group route
and pipeline index"). Now apply to ALH dai index.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
The known issues with the pipeline-free chain DMA implementation has
now been solved, so we can re-enable chain DMA usage.
This reverts commit c3807ae4a7.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
When schedule_task_free() is called to a scheduled zephyr_ll task it
sometimes causes a crash. Canceling the task before freeing appears to
fix the problem.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
Enable CONFIG_ASSERT=y in SOF debug overlay.
Also add a commented out list of additional useful Zephyr debugging
tools to the overlay. These incur a higher runtime cost, so are left
disabled by default. These are all debug tools that have been tested to
work with SOF and found useful.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.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>
Start using new version of dai_config_get where config struct is given
as pointer argument.
Update west.yaml to point to correct zephyr version for this change.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
.process() callback receives input and output buffer arrays as
function arguments, no need to fetch them from the module object
again.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
If audio_stream_set_zero() fails in mixout_process(), the output data
size should be set to 0.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
When calculating the number of frames to produce, ignore inactive and
empty inputs. On the one hand an inactive empty input shouldn't block
producing data from active or non-empty inputs. OTOH if an inactive
input has pending data, it should be used instead of letting the data
stall.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
num_input_buffers in module_single_sink_setup() and
num_output_buffers in module_single_source_setup() don't have to be
incremented inside the loop together with the loop counter i. Just
assign them after the loops.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Since sof/debug/panic.h has been removed, the only file which should
be including arch/debug/panic.h is XTOS's rtos/panic.h. This commit
removes the forced "#define __SOF_DEBUG_PANIC_H__" from rtos/panic.h
and makes all arch/debug/panic.h files include-able from rtos/panic.h.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Since all sof/debug/panic.h does is it includes rtos/panic.h
why not just simply replace sof/debug/panic.h with rtos/panic.h?
This commit does exactly that.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
The purpose of this commit is to separate Zephyr-specific definitions
from XTOS-specific definitions. Based on the build, <rtos/panic.h>
will contain the required definitions.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Provide unified structure for events that may be raised by identifiable
entity from inside the FW(like a module instance identifiable by module
instance ID or a pipeline identifiable by pipeline ID). All enums are
aligned with ipc4 protocol. Receiver of such notification is host.
Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
Remove left-over unreachable code in pipeline_comp_trigger(): tje
err == PPL_STATUS_PATH_STOP case is already processed and leads to a
return from the function, therefore the same condition cannot be met
a second time immediately after the return.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Add a link to online github documentation with regard to
file syntax and how it can be tested.
Suggested-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>