This patch unifies all the control types (bytes, enum, switch).
Previously for binary control the fragment pointed to
cdata->data[0].data while for other control types the cdata
was passed via fragment. If fragment always points to cdata
the module adapter client can reliably check the control type
from cdata->cmd and handle other than binary control types.
Since the client components with binary control pass the
data to comp_data_blob_set() in data_blob.c the restore of
pointer fragment to cdata->data[0].data can be done there.
A check for SOF_CTRL_CMD_BINARY is added to comp_data_blob_set()
and comp_data_blob_get_cmd() to avoid wrong usage of controls.
With IPC4 in comp_data_blob_set() the use of
struct sof_ipc_ctrl_data pointer step is not done but the
fragment is treated as raw data payload without the header.
The generic support for other than binary control will be
solved later for IPC4.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
When GOOGLE_RTC_AUDIO is applied, Speaker and DMIC pipeline tasks are
scheduled in the same domain. The AEC function in GOOGLE_RTC_AUDIO
has the hard requirement for input sample synchronization between DMIC
input and Echo reference (sourced from Speaker).
At present, both pipelines are pri-0 so the task order in schedule
list depends on which pipeline starts first. This commit sets DMIC as
pri-1 when GOOGLE_RTC_AUDIO is applied to make sure that DMIC task
will be always put after Speaker task, which guarantees the
requirement for input sample synchronization.
Signed-off-by: Pin-chih Lin <johnylin@google.com>
Move and rename the hw_config class to
platform/intel/hw_config_cardinal_clk.conf.
This hw_config is specific to Intel SSP DAI that use the cardinal clock
for the mclk frequency.
Ideally, this class should have immutable mclk_frequency and link clock
source. But because the alsatplg compiler expects the name of the hw
config class to be "hw_config" without any extensions, it is left as
modifiable for now. Once the topology compiler is modified, this will be
made immutable in a follow up PR.
Also, introduce a new hw_config_simple.conf file that contains the
hw_config definition for the HDA/DMIC/SDW type DAIs with only the ID and
name attributes.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add the SSP blob version and set it based on the platform.
Co-developed-by: Jaska Uimonen <jaska.uimonen@intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This change sets USE_CHAIN_DMA=true for sof-hda-generic-2ch
and sof-hda-generic-4ch mtl targets in sof-ace-tplg directory.
Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
Logger was disabled for i.MX8 platforms with Zephyr because
of problems with DMA domain.
Now that DMA domain works fine for i.MX8 platforms enable logging as
well.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
DMA domain with Zephyr works fine for i.MX platforms. So, remove
"experimental" from description and enable it by default for i.MX
platforms.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
It is wrong to set a default value when creating widgets objects within
pipelines and these must be set at the top-level based on the DAI type.
So remove the default value in be-dai.conf and set the node_type
whenever the pipeline is initialized.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
All it contains is a IO gateway copier and a pipeline widget. So rename
it accordingly.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
The smart amp test module will first process feedback if
presents, and then process main input to its output.
However, minimum available frames from main input and
feedback is used in processing feedback, while available
frames from main input is used in processing main input.
The different frames of audio data could be processed from
main input buffer and feedback buffer.
This patch make sure the same number of frames are processed
from main input and feedback buffers.
Fixes: #7184
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Some components like mixer have special handling of the prepare function
whenever they are already active. Ensure said handling has a chance to
run.
With the old code, that code doesn't run, mixer doesn't have a chance to
return PPL_STATUS_PATH_STOP and the DAI then receives a second prepare
request, which is invalid given that it's already active.
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
The old code does not deal correctly with input streams going away
without everything stopping. This commit ensures only active streams are
considered as mixer input, and the other streams are ignored (considered
zeroed out).
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
There's been a recent kernel change to compute the DMA buffer size using
the ibs/obs. So this attribute no longer needs to be set in the
topology.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
MTL nocodec devices have been configured with DMIC 4 channels.
The topology should be aligned with it.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
This should avoid error in tools/oss-fuzz build:
sof_ep/install/lib/libsof.a(dai.c.o):
in function `dai_assign_group':
dai.c:(.text.dai_assign_group[dai_assign_group]+0x0):
multiple definition of `dai_assign_group';
/usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x25
sof_ep/install/lib/libsof.a(dai-legacy.c.o):dai-legacy.c:
(.text.dai_assign_group[dai_assign_group]+0x0): first defined here
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This avoids tools/oss-fuzz build fail to issue
dai-legacy.c:
(.text.dai_comp_trigger_internal[dai_comp_trigger_internal]+0xaca):
undefined reference to `platform_dai_wallclock'
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Currently host build of module adapter builds the module adapter core
for each module. Lets only build it once on host.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Strip out all the threading and cache debug to become a pure xt-run
application. This removes a lot of code, including in the host LL
scheduler.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Abstract the topology APIs to provide support for other IPC ABIs and
further simplify the codebase. Makse sure all public APIs have the tplg
prefix and make sure private APIs are in the correct places.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
When calculating the time_ratio, a situation may occur
where cd->initial_ramp is equal to zero. To avoid dividing
by zero it is necessary to insert an additional condition
Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
This is a follow up with #7330, remove dai zephyr part callback
register/unregister, call callback function directly at notifier
event place.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
There is pinmux conflict between SSP1 and DMIC
on MTL RVP, add a new nocodec topology target
for MTL, on which only SSP0 and SSP2 are enabled.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
Src can module API, but is still getting data from buffers
What more dangerous, it is calling buffer_acquire on source
and sink.
Both buffers have already been taken by module adapter, so
it may lead to deadlocks.
Signed-off-by: Marcin Szkudlinski <marcin.szkudlinski@intel.com>
Adding attenuation checking based on the frame_fmt
from the config of the module instead of calling
sink->stream.frame_fmt, because sending IPC_SET_ATTENUATION
before calling module_prepare results in an error,
because at this stage the sink values are not yet set
(sink->stream.frame_fmt is zero)
Signed-off-by: Kwasowiec, Fabiola <fabiola.kwasowiec@intel.com>
This patch adds for host gcc build the updated atomic
operations. These are intended to replace the previous
__sync built-ins. For more information see
https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html .
The atomic functions for xcc are fake but sufficient for
host arch build for static single-thread testbench.
Suggested-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Start using zephyr pm_runtime, clk and dma glue code in cavs25 native
drivers build. Move the files from ace/lib into zephyr/lib.
Also update west.yaml to related zephyr commit as power related
files have been moved to zephyr side.
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
Remove unnecessary blank line after '{' as reported
by checkpatch:
"CHECK: Blank lines aren't necessary after an open
brace '{'".
Signed-off-by: Alaa Emad <eng.alaaemad.ae@gmail.com>
- Create new setup() function
- Separate export for set -e compatibility
- Don't use the generic `build` directory but a more specific
`build-fuzz` instead.
- De-hardcode zephyr path thanks to west
- shellcheck clean
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Add Kconfig options to specify when to reload DMA, by default it will
reload 4ms before the buffer is empty (or full).
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This should reduce DRAM access frequency and allow deeper power
saving modes, particularly when using Deep Buffer PCMs.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Add fast mode which enables to support unlimited transfer size (more than
ibs/obs) between a dma buffer and the copier. Enable it to satisfy
specific module requirements to guarantee enough data size to decoders or
from encoders since the pcm audio period size does not apply to variable
size frame.
Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>