This is required by ARM64 platforms as they don't have
an arch/compiler_info.h so the compilation would fail.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
These were added for use with IPC3 but since topology2 is not targeted
for IPC3, there's no need to keep them anymore.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This has been replaced by num_input_audio_formats and
num_output_audio_formats. So remove the attribute from all components
and mark the token ID as deprecated.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Set byte_align as 1 and frame_align as 1 means no limit on both byte and
frame for this stream. Call audio_stream_init_alignment_constants in
audio_stream_init, set default align info while buffer created. And every
specific component can set its own byte and frame align info in its
prepare function later.
Signed-off-by: Andrula Song <andrula.song@intel.com>
No need for type-casting: void * is compatible with any pointers and
both pointers already have the __sparse_cache annotation. Dropping it
causes sparse warnings.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
NUM_SDW_AMPS refers to how many sdw links are used by the amp pcm.
Rename to NUM_SDW_AMP_LINKS for less confusing.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
The 24-bit formats defined in topologies will never be used because the
mixin/mixout only support 32-bit format. So remove these audio formats
from the component and pipelines audio format definitions.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Separate the pin index token ID for input/output pin index to avoid
collisions between the two and incorrect pin index parsing in the
kernel.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
GDB debug should only be used when CONFIG_DBG_DEBUG=y. On ARM64
platforms with Zephyr, including this header will cause compilation
errors due to the fact that they don't have an arch/ entry. This
commit fixes this issue by conditionally defining all symbols based
on CONFIG_GDB_DEBUG.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
After commit 7d0a0c673f ("Audio: Module adapter: Pass entire cdata to
clients for all controls") md->ops->set_configuration gets the entire
cdata but module_set_configuration expects only cdata>data[0].data.
So, restore the pointer fragment to cdata->data[0].data.
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.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
With 208c2049f ("topology2: deep buffer: use 32 bits to align with
other pipeline"), we can remove this override now.
Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Sparse output is spammed with "Variable length array" warnings from
Zephyr logging system. The use of VLAs there can be disabled via
Kconfig. Do that to avoid exceeding sparse's warning maximum and
losing important warnings.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This patch followed with #7210, copier also need change to
get correct processed data.
More changes are done due to below reason:
bsource_buffer is assigned in create host/dai/gtw, however, host/dai
part are removing this flag, so this flag is no longer valid.
Also, cd->endpoint_num currently are always 1, and stream_no always 0.
Remove this contion check also.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Recent experience has shown that upstream Zephyr regressions are much
more common than platform-specific failures. So move the Zephyr version
in first position, so this will group zephyr regressions and make them
much more obvious.
Use very short keys for the revisions because the left column in
Github's results "checks" tab is very narrow and cannot be resized.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Code in unbind is looking at wrong field for queue-id. This works
some of the time, but in some cases leads to access to freed
heap data and later to heap corruption.
Link: https://github.com/thesofproject/sof/issues/7191
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Move the ROUND_DOWN() definition to the nearby #ifndef __ZEPHYR__ block.
The previous `#ifndef ROUND_DOWN` logic depends on the #include order,
so it fails sometimes.
Fixes commit a6f8daec2a ("kpb: add micselection function")
Fixes XCC compilation failure with
```
./scripts/xtensa-build-zephyr.py mtl --cmake-args='-DEXTRA_CFLAGS=-Werror'
- In file included from sof/src/audio/src/src_hifi4.c:22:
zephyr/include/zephyr/sys/util.h:238:9: warning:
'ROUND_DOWN' macro redefined [-Wmacro-redefined]
^
sof/zephyr/../src/include/sof/math/numbers.h:33:9:
note: previous definition is here
```
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
When module_prepare() fails we need to return to calling module the
exact specific error not just -EIO.
There is no real use for Host AP to receive an error code that doesn't
reflect the actual error.
While at it, make the code more compact as suggested by Guennadi.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
This is a typical example of why environment variables are (a sometimes
necessary) evil: imagine you're trying to reproduce exactly the `west
build` command run by xtensa-build-zephyr.py when building with the
`xt-xcc` toolchain. So you would typically look at the logs, feel lucky
that it shows the extra environment variables used and copy them:
```
XTENSA_TOOLCHAIN_PATH=/srv/home/jenkins/xcc/install/tools
TOOLCHAIN_VER=RG-2017.8-linux
XTENSA_SYSTEM=/home/jenkins/xcc/install/builds/RG-2017.8-linux/cavs...
In dir: workspace/sof; running: west build ...
```
Except this won't work because there's one variable currently missing:
`ZEPHYR_TOOLCHAIN_VARIANT`!
Of course there could be more in the future.
Fix this by leveraging the recent os.environ.copy() added by
commit 8aab18351f ("xtensa-build-zephyr: fix DEFAULT_TOOLCHAIN_VARIANT
spill on next platf") compare it to the current os.environ and show the
difference in a totally generic, non-hardcoded way.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The previous patch 908876cc5f introduced a bug where the wrong input
buffer had the "consumed" field updated. This affected playing from
_only_ the second input stream in weird ways (specifically, sound was
slower and every other period I'd get a "no bytes to copy" message from
the active host component).
This patch fixes the indexing for that update.
Fixes: 908876cc5f "audio: mixer: Improve handling of inactive input streams"
Signed-off-by: Paul Olaru <paul.olaru@nxp.com>
On i.MX8MP, the SAI MCLK is bound with TX enable bit.
Therefore, in order to enable MCLK, we need to enable
the transmitter.
This fixes a "wm8962 2-001a: DC servo timed out" -
a Linux Kernel error with wm8962 codec.
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Introduce a new class for module-to-module copiers and make node_type
mandatory for the copier class.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
core_kcps_adjust is an API to request clock changes indirectly, by
registering KCPS per core. It should be common method for all clock
change requests, to keep KCPS on track.
Currently, in the platform_init, maximum clock is reqeuested. This is a
workaround for missing CPC management. KCPS should be registered together
with clock change.
Even though FW does not request KCPS at any place (feature not ready) so
far, OED driver sends these requests via LargeConfigSet. It is required
to have valid initial value of KCPS in cpu-clk-manager.
Signed-off-by: Przemyslaw Blaszkowski <przemyslaw.blaszkowski@intel.com>
Combine topology files for i.MX8MP with different codecs and rate, by
using CODEC and RATE variables.
Based on CODEC use the proper DAI_CONFIG.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Add new topology file for i.MX8QM with wm8962 codec.
While here, use CODEC variable to differentiate between wm8960
and wm8962.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Check for four least significant bits set means that four
previous processes periods need to be high enough signal
level over ambient. The value 0x15 is an obvious mistake and
does not filter properly control events. The purpose of the filter
is to prevent too frequent or unreliable control updates.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
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>