The intent was to stop people from cloning the sof manifest git repo
under a different name than "sof". It did not work, I had to help
multiple people who did it anyway.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Newer Xtensa toolchain replaces xt-xcc with xt-clang.
For some reason xt-clang fails to build SOF when uint8_t type
is used as index of for() loop. This change unblocks building of
SOF with xt-clang.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
When a pipeline runs into an xrun, the state of the pipeline will be
left as COMP_STATE_ACTIVE. Following this, when the application detects
the xrun, it will try and stop the pipeline. This will result in a
failure because the pipeline task has already completed and the state is
ACTIVE. This will lead to the PIPELINE_DELETE IPC fail as well and the
MOD_DX IPC fail because there are pipelines that are in the active
state. To prevent this, reset the pipeline when an xrun occurs to leave
in a READY state for pipeline stop, delete and DSP D3 entry to succeed.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
When entering D3, call the platform_pm_runtime_power_off to prevent the
IPC timeouts seen with the CTX_SAVE IPC seen on the host when using the
zephyr native IPC driver.
Add an empty definition for MTL to prevent compilation errors.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
IADK modules usually uses configuration parameters
passed by ipc4_base_module_cfg followed by proprietary
parameters known only by particular module code.
Therefore during such module initialization we need to pass
whole IPC4 buffer.
Previous change limited these data to ipc4_base_module_cfg
what could be not enough for some 3rd party modules.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
IADK modules must have get_attribute function initialized.
Initialize also set_large_config and get_large_config to generic
module adapter calls.
Signed-off-by: Jaroslaw Stelter <Jaroslaw.Stelter@intel.com>
Volume module support per channel volume adjust, a dedicated
circular buffer designed for store per channel gain 4 times
for SIMD calculation. However, it is not must to store gain for
each time calculation, add a flag to indicate and decide the copy
action.
Below is the logs for before and after opt, around 5% optimized:
perf comp_copy samples 48 period 1000 cpu avg 249 peak 254
perf comp_copy samples 48 period 1000 cpu avg 236 peak 245
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
pm_runtime_get | put can't be called by ipc
msg directly. According to ipc3 implementation,
pm_runtime_enable | disable are fit for d0i3 msg.
Signed-off-by: Rander Wang <rander.wang@intel.com>
payload_with_output_fmt token is used to tell sof driver whether
there is output audio format in the init instance ipc4 message
payload. payload_with_output_fmt = 1 mean there is audio output
format in the ipc4 message payload.
Signed-off-by: Libin Yang <libin.yang@intel.com>
Add support for chained DMA pipelines in the HDMI passthrough topology.
Since the HDA hardware does not support S24_LE, remove the format from
the PCM capabilities for all the HDMI PCM's as well.
This version should work even if the kernel does not support chained DMA
as yet.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
In review of commit 76e35fbec2 ("ipc4: use atomic primitives to
maintain delayed_reply state"), we had a debate whether 'delayed_reply'
was really a counter at all, or should it be a boolean. As a compromise,
we kept it as a counter, but added asserts on its expected values.
Now soon after, the SOF driver started using compound SET_PIPELINE_STATE
calls, which led to 'delayed_reply' really becoming a counter now due to
loop in ipc4_set_pipeline_state().
The code is correct, but now the assert statements are no longer
correct, so remove them.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add the missing necessary delay after changing DSP bus frequency.
Change the core frequency when initialize clock to avoid
altering the core frequency in the middle of execution.
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Initialize the mt8186 ADSP PLL before change ADSP core
to high frequency because the clock source of high
frequency is coming from ADSP PLL.
Because the ADSP bus source switches to the EMI clock,
the ADSP local bus clock should switch to 26M.
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Change the maximum frequency to 300M because power issue.
The mt8186 supports 800M/400M/300M frequencies, each requires
0.8/0.7/0.65 minimum core voltages. The 300M is the most
compatible option because it has the lowest minimum core voltage.
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
Free the memory allocated for DMA channels when the ref count is 0 when
using native zephyr drivers.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Check DMA domain pointer before calling scheduler_init_ll().
DMA domain is currently not initialized for MTL platform, but
there may be need to use in the future.
Without this check, secondary core crash on NULL pointer.
Signed-off-by: Przemyslaw Blaszkowski <przemyslaw.blaszkowski@intel.com>
Audio hardware configuration of SKU 0C40 product is rt711 on link2,
two rt1316s on link0 and link1 and rt714 on link3
Signed-off-by: Gongjun Song <gongjun.song@intel.com>
Audio hardware configuration of SKU 0C10 product is rt714 on link0,
two rt1316s on link1 and link2
Signed-off-by: Gongjun Song <gongjun.song@intel.com>
Adding missing header: rtos/wait.h
The error appears in meteorlake after enabling power management.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
D3 (PM_STATE_SOFT_OFF) state can be only entered after IPC request from
host. That why this prevent should be permanent.
D0i3 (PM_STATE_RUNTIME_IDLE) can be entered if host allows it and under
special conditions. State is prevented by default. Host will remove this
prevent with dedicated IPC message.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This patch introduce custom power management policy for ace platforms.
Default version depends mainly on system tick. Definition on the
application side will allow later for better customization.
When CONFIG_PM_POLICY_CUSTOM is set, kernel expect that application will
provide custom policy implementation.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
The up_down_mixer currently depends on Hifi3 intrinsics and
there is no generic ANSI C version provides. This leads to CI
build errors with Zephyr SDK toolchain version, which doesn't
support Hifi/XCC extensions.
Add stubs for the generic implementation to allow the CI
build checks to pass. Code will raise a panic if execution
is attempted as the implementation is missing.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Fix compiler warnings on discarding const when passing
arguments to init_up_down_mixer [-Werror=discarded-qualifiers].
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
PR to change the error into a warning
is a good quick compromise
until a better limit is figured out
Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
In pause/release triggering, if dma is stopped it needs to do set_config
before start. Otherwise the dma state prohibits the start.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Buffers allocated need to be sparse_force casted when assigning to
sparse_cache typed variables.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Compared with DF2T, the DF1 has better performance on low frequency and
saves about 9.9% cycles on HiFi3 version, so select DF1 instead of DF2T
as the default IIR lib for component EQ and TDFB.
Signed-off-by: Andrula Song <xiaoyuan.song@intel.com>
This series of changes allows developers to enable DMA
domain on Zephyr. Currently, this feature is marked as
experimental because it still requires a lot of testing
and bug fixes.
In the case of i.MX, these changes still allow the usage
of dma_multi_chan_domain in conjunction with ll_schedule
if so desired. This is done because the feature is still
experimental and once it becomes more stable the appropriate
changes will be done in order to make DMA domain the
default option.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
The purpose of this patch is to allow zephyr_ll to be used
with multiple domains. Previously, zephyr_ll only allowed
the usage of timer domain.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
The purpose of this patch is to allow the domain to know whenever a
task gets cancelled. As of now, this is only used by the DMA domain
in order to know when the DMA IRQs get shut down (sch->n_tasks == 0).
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
The purpose of this patch is to introduce a new domain operation:
domain_task_cancel.
The purpose of this new domain operation is to let the domain know
that a task has been cancelled. As of now, this is only used by
the preempt domain in order to know if the DMA IRQs got shut
down (meaning, sch->n_tasks == 0).
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Check for NULL in init_delay and fifo functions. These are called in
very early stage when dai might not be set. Thus fix it and align with
legacy.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
The macro names in sof/math/numbers.h conflict with C library
so they must be renamed. New macro names are
INT_MAX_FOR_NUMBER_OF_BITS() and INT_MIN_FOR_NUMBER_OF_BITS().
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
When a pointer to a function is used the assignment can take one of
two forms:
ptr = fn;
or
ptr = &fn;
however, I don't think an assignment of the form
ptr = *fn;
is valid and passes compilation. Fix one such assignment.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Add a new pipeline chain-dma-playback.conf for chained DMA playback
and use it for HDMI depending on the HDMI_CONFIG.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>