Due to the fact that on i.MX93 the host will initialize the
SOF_IPC_FW_READY sequence there's no need to call
platform_boot_complete() at the end of start_complete(). This
will be handled in the IPC3 handler.
This commit makes sure that aforementioned scenario won't
happen for i.MX93 while keeping the flow constant for the
other platforms.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Using the notifier between the copier and the host makes little
sense with native Zephyr drivers: it ends up in a direct function
call, but before that it has to look for the correct callback in a
global notifier list. The callback can perfectly be called directly
instead.
With legacy SOF drivers we still need to use the notifier because
that is how SOF DMA drivers trigger the host component. We have to
provide a compatibility callback in the copier for the IPC4 case.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
To make sure the same prototype is used for all notifier callbacks
add a typedef.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Update parameter type for _xt_atomic_compare_exchange_4()
to match xthal_compare_and_set() from xtensa/hal.h
This fixes "error: passing argument 1 of
'xthal_compare_and_set' from incompatible pointer type"
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Update parameter type for asrc_initialise() to match those
from header file.
This fixes "error: conflicting types for 'asrc_initialise'".
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Add read and write accessors for .underrun_permitted and
.overrun_permitted fields of struct audio_stream and convert the code
base to use them.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Add accessors for setting .frame_fmt, .valid_sample_fmt, .channels
and .rate and convert direct assignments to use them.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Multiple fields in struct audio_stream are only set in the
audio_stream.h header itself, which is valid, and in rtnr.c. Add
accessors to replace the latter operations.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Use zephyr cache APIs instead of xtensa specific ones.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
This topology could be used by MTL SDW RVP with 3-in-1
SDCA codec board, or other hardware configuration with
the same codec layout:
SDW0: RT711 Headphone
SDW1: RT714 DMIC
SDW2: RT1316 Speaker
SDW3: RT1316 Speaker
Signed-off-by: Chao Song <chao.song@linux.intel.com>
When resetting a pipeline, components may be still in active state if
previous pipeline walkthrough of stop trigger aborted due to some
reason. Here we give it a second chance to stop the component before
resetting it. Without doing this, some components like dai could cause
DSP panic because the DMA is still running.
Signed-off-by: Brent Lu <brent.lu@intel.com>
Earlier commits wrongly used struct audio_stream accessors to read
members of struct audio_stream_rtnr in rtnr_copy_to_sof_stream().
Revert those changes.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The copying part of the functions need to update the src/dst buffer
pointers after each iteration to correctly account for the possible wrap
of the buffer.
This was discovered while doing pause - 1sec_wait - resume - 3sec_wait
cycles and around the 10th iteration audio became 'metallic' sounding.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Fix breakage introduced by 32e4f7e27a ("buffer: use an accessor to
read struct audio_stream::end_ptr") which accidentally wrongly used
audio_stream_get_end_addr() to access the .end_addr member of
struct lib_manager_dma_buf.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
TGL has always been using the `xtensa-cnl-elf` toolchain. That
toolchain was removed by accident when cavs 1.8 support (including
CNL) was removed by massive search/replace commit dc9ba281d7
("platform: remove support for cAVS 1.8 platforms")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
There is a UID mistmatch and file permission problem. sudo-cwd.sh will
switch id every docker run command.
This can be done like this,
./scripts/docker-run.sh ./scripts/sudo-cwd.sh CMD
But not to make build script, just include sudo-cwd.sh in docker-run.sh.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Upgrade Ubuntu to latest LTS version, 22.04.
Permission issue has started when UID didn't match with local UID.
As an solution, created high value UID to unmatch local UID.
sof home doesn't have permission for others, so add o+rx permission to
avoid any permission issue when id does not match.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
This patch adds audio_stream_get_channels() to read
struct audio_stream::channels and converts all users. Apart from
hiding internals of the structure, it also enforces the use of the
__sparse_cache annotation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch adds audio_stream_get_rate() to read
struct audio_stream::rate and converts all users. Apart from
hiding internals of the structure, it also enforces the use of the
__sparse_cache annotation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch adds audio_stream_get_valid_fmt() to read
struct audio_stream::valid_sample_fmt and converts all users. Apart
from hiding internals of the structure, it also enforces the use of
the __sparse_cache annotation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch adds audio_stream_get_frm_fmt() to read
struct audio_stream::frame_fmt and converts all users. Apart from
hiding internals of the structure, it also enforces the use of the
__sparse_cache annotation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
audio_stream_fmt_conversion() is used both directly with fields from
acquired buffers in its arguments and ordinary local variables. In
the former case the arguments should have cache annotations, in the
latter case it isn't compulsory. A choice has been made to enforce
cache annotations in both cases, which however now becomes an
inconvenience. Revert that by using temporary variables instead of
buffer fields directly.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch adds audio_stream_get_free() to read
struct audio_stream::free and converts all users. Apart from hiding
internals of the structure, it also enforces the use of the
__sparse_cache annotation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch adds audio_stream_get_avail() to read
struct audio_stream::avail and converts all users. Apart from hiding
internals of the structure, it also enforces the use of the
__sparse_cache annotation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch adds audio_stream_get_size() to read
struct audio_stream::size and converts all users. Apart from hiding
internals of the structure, it also enforces the use of the
__sparse_cache annotation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch adds audio_stream_get_addr() to read
struct audio_stream::addr and converts all users. Apart from hiding
internals of the structure, it also enforces the use of the
__sparse_cache annotation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch adds audio_stream_get_end_ptr() to read
struct audio_stream::end_addr and converts all users. Apart from
hiding internals of the structure, it also enforces the use of the
__sparse_cache annotation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch adds audio_stream_get_wptr() to read
struct audio_stream::w_ptr and converts all users. Apart from hiding
internals of the structure, it also enforces the use of the
__sparse_cache annotation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This is the first patch in a series, whose goal is to make struct
audio_stream opaque for its users. Instead of accessing structure
internals we'll add a set of accessor functions.
This patch adds audio_stream_get_rptr() to read
struct audio_stream::r_ptr and converts all users. Apart from hiding
internals of the structure, it also enforces the use of the
__sparse_cache annotation.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
As recommended by Andrey in #7364, reduce the noise and log the
environment only for the `west build` command - unless the log level is
increased with `-v`, then log for every command.
Also fix a very unlikely corner case where the caller would invoke
execute_command() with `check=None` and get the opposite effect.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Clang requires fields to have a constant size and does not
support variable length array in structure causing build to
to fail at compile_check()
This change selects the compatible version of ALIGN_UP and
ALIGN_DOWN macro when compiling with Clang.
Signed-off-by: Nishal Kulkarni <nishalkulkarni@gmail.com>
when a DP module is to be created when DP
is disabled, module creation is rejected with
a message in log
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
DP scheduler is intended to work on MTL and
future platforms only - has not been tested on
any legacy.
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
This makes sure Zephyr's -fmacro-prefix-map is working and keeps the
builds reproducible when using a recent enough toolchain.
As found in the CONFIG_ASSERT PR
https://github.com/thesofproject/sof/pull/6530#issuecomment-1482330214
this is not true for old Xtensa toolchains.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit introduces support in the CMakeLists.txt of Zephyr for
building SOF for i.MX93 platform.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Get_total_process_data_process is used to get the processed data of
a module when stream is started. It is used to calculate pipeline
latency with the algorithm of subtracting processed data count between
source pipeline module and sink pipeline module. This patch will
calculate consumed & produced data count based on input & output buffer
setting and return produced data count for source module and consumed
data for sink module.
Currently only copier supports this function, now add it to
module_adapter framework to support other modules.
Signed-off-by: Rander Wang <rander.wang@intel.com>
In component.h the eq_iir and mixer have still the old component
API function prototypes. They can be removed as not needed. These
components do not support legacy mode.
Similar update is done to testbench common_test.h. The function
prototypes there are duplicate since they are now available in
component.h.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Catch the additional two warnings below:
warning: too many warnings
warning: cast removes address space
Signed-off-by: Marc Herbert <marc.herbert@intel.com>