Remove all support for cAVS 2.0 platformsm including Ice Lake and
Jasper Lake, they aren't supported any more.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
select_cpu_clock() on cAVS currently takes all the clock locks while
adjusting them. And that function is called from clock_set_freq()
which also takes one of those locks, which leads to a recursive
spin-lock. To fix that remove per-clock spin-locks and use a global
clock lock instead.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
We are always returning 0 if the dai_copier is not found and never an error
code. Make it clear by returning 0.
With that out of the way, it is clear that this is not an error, it is
something which can happen.
Firmware log is a proof of that since it is flooded with
<err> copier: comp:X 0xSOMEHEX failed to find dai comp or sink pipeline not running.
prints. Drop the log level to info and add a comment as explanation.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
With previous commits, copier can perform DMA copy without host
endpoint buffer and host device, so remove host device and endpoint buffer
creation, accordinlgy, related state settings are all removed.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Replace params and copy host dev with copier dev, after this change,
host dev and endpoint buffer are no longer useful for copier, next
step can remove host device and its endpoint buffer.
Simplified host_zephyr_params parameters, since all parameters changed
to copier dev aligned.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Current host dma call back register on host device,
With this optimization, move this call back function from host
to copier device, create a new copier_dma_cb for copier usage.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Create and expose a couple of functions for host DMA copy
along with struct host_data,these functions will be shared by both
host and copier component.
This is in preparation to remove the creation of a host component and
endpoint buffer in create_host().
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Create and expose a couple of functions for host DMA parameters
along with struct host_data,these functions will be shared by both
host and copier component.
This is in preparation to remove the creation of host component and
endpoint buffer in create_host().
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Create and expose a couple of functions for host DMA trigger along with
struct host_data,these functions will be shared by both host and
copier component.
This is in preparation to remove the creation of host component and
endpoint buffer in create_host().
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Create and expose a couple of functions for host DMA prepare and
reset along with struct host_data,these functions will be shared by both
host and copier component.
This is in preparation to remove the creation of host component and
endpoint buffer in create_host().
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Create and expose a couple of functions for host DMA allocation and
free along with struct host_data,these functions will be shared by both
host and copier component.
This is in preparation to remove the creation of host component and
endpoint buffer in create_host().
Below is the preparation work:
1. Add host data structure to copier data structure
Currently, copier call host interface need through ops driver.
However, with dedicated work, all host interface can be called
through host data, this commit add host data into copier data.
2. Add Header file to share host data between copier and host
Data and interaface will be shared through this header file between
host and copier.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
The IPC gateway copier from the host copier both have the same comp type
SOF_COMP_HOST. So add a new flag to distinguish between the two and set
it in create_ipcgtw(). This will be used in the follow ups patches
to isolate the optimization for the host copier only.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
buffer_from_list() is always used for buffer objects, the type is
always struct comp_buffer. Hard code the type instead of always
specifying is as a parameter.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Extend module adapter simple_copy flow to support modules with only
one sink or one source connected such as KD or Intel WoV.
Signed-off-by: Ievgen Ganakov <ievgen.ganakov@intel.com>
Add support for LargeConfigSet:SET_ATTENUATION IPC.
The purpose is to add attenuation adjustment for peak-meter.
To properly mix multiple streams without saturation, driver configures
attenuation to the input copier of each playback stream that is going
to be mixed into one output stream. In some topologies, PeakVol is
placed behind the copier with attenuation, hence its peak-meter value
is artificially scaled by FW. To report valid peak-meter value, FW has to
adjust the measurement by reverting attenuation provided in copier.
Example for 2 streams:
----
| A PeakMeter (A*2)
|<-------------------+
| |
| att=2 | A/2
| A -------- A/2 ------- ------- A/2
|--->|Copier|----->|PeakV|-->|MixIN|--+
| -------- ------- ------- | -------- ------
HOST| +-->|MixOut|-->|Aria|-->...
| A -------- A/2 ------- ------- | -------- ------
|--->|Copier|----->|PeakV|-->|MixIN|--+
| -------- ------- ------- A/2
| att=2 | A/2
| |
|<-------------------+
| A PeakMeter (A*2)
----
att - attenuation set in copier
A - signal amplitude
Signed-off-by: Przemyslaw Blaszkowski <przemyslaw.blaszkowski@intel.com>
This patch extend the selector module to use base
config extension for module init, which ensures only
base_cfg and base_cfg_ext is received in module init
on linux side and align the init blob format with
other modules.
However, on Windows side, the payload base config with
output format style payload is still used, this payload
should be supported before Windows doing the payload
format migration.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Fix format validation in set_attenuation function.
In previous implementation, bitdepth was compared to sink->buffer_fmt
value, which is an enum sof_ipc_buffer_format (interleaved or not).
Format bitdepth is represented by stream.frame_fmt (enum sof_ipc_frame),
so it should be compared to this value.
Signed-off-by: Przemyslaw Blaszkowski <przemyslaw.blaszkowski@intel.com>
Using frame aligned API to avoid the division in
audio_stream_avail_frames() function, which is called by
dcblock processing function every time.
Signed-off-by: Andrula Song <andrula.song@intel.com>
KPB in micselector mode has
a different number of channels on each sinks.
Sink 0 has one channel and the other sinks
have the same number as on the module input.
Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
Add large config set function
to be able to set the micselector.
Allow to configure which mics are
used by the kpb,
using large_config_set interface
Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
Add separate file for notifications initializations. All generic
initializations could be stored in one place. Add initialization for
generic xrun notification message which can be sent by gateway.
Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
The validator is intended to verify everything that the regular
algorithm checks without changing the actual component state. If it
receives an invalid data blob, it is discarded and an error returned
from the set_config function (which propagates to sof-ctl tool in the
userspace, assuming the set_config function was called from there).
The validator is only called during playback, to avoid invalid
configuration in the topology preventing the topology from loading in
the first place.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
Whenever a new data blob arrives via IPC it used to be the case that we
just trust it. Here we add the possibility to validate it before it is
actually active. If the data blob is invalid, an error is reported to
the tool and the old data is kept.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
This was not the correct fix for the ll timer free crash issue. Now
that the correct fix[1] is found and merged, this workaround can be
removed.
[1] b3a808afa8 "chain-dma: fix scheduling exception"
This reverts commit 60e9e97e0d.
Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
mx_mu_xsr_rmw() doesn't work correctly for w1c bits
because it reads the register and writes it back fully.
So, use imx_mu_write to clear pending interrupts from MU,
instead of imx_mu_xsr_rmw.
Using imx_mu_xsr_rmw might clear a pending interrupt that
was triggered while handling the current interrupt.
This fixes the case when fw boot confirmation and first
command are sent, from kernel, close to each other and
the command is missed.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Remove all support for cAVS 1.8 platformsm including Cannon Lake,
Comet Lake, Whiskey Lake and Coffee Lake, they aren't supported
any more.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
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 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>
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 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>