Use SOF_MODULE_INIT() to register mixer, mixin and mixout with the
Zephyr initialisation framework.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Use SOF_MODULE_INIT() to register volume with the Zephyr
initialisation framework.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This macro integrates SOF modules into Zephyr initialisation
framework. SOF module initialisation functions use
DECLARE_MODULE_ADAPTER() or DECLARE_MODULE() to register with the SOF
native initialisation scheme, now the same initialisation functions
can be used with the new SOF_MODULE_INIT() macro to integrate them
into the Zephyr initialisation flow.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Zephyr has an elaborate subsystem initialisation framework. Use it
for primary_core_init() instead of calling it from main(). This
prepares for a migration of module initialisation to that framework
too.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
It is possible that lib_id from IPC would not match
with lib_id of module. That can cause NULL pointer and FW crash.
Signed-off-by: Dobrowolski, PawelX <pawelx.dobrowolski@intel.com>
In preparation for making it easier to write topology conf files that
can be conditionally included without having to worry about conflicting
node ID's for objects between the included file and the top-level conf
file, modify all classes to include an instance attribute. This means
that irrespective of the object type, all objects will be instantiated
as follows:
Object.Widget.gain.1 {} or Object.Base.pdm_config.2 {} etc
The instance ID's are typically only meant for the alsatplg compiler to
differentiate the nodes in the conf file and are not relevant for the
kernel or the firmware. This change will allow the alsatplg compiler to
be modified to automatically make the node ID's unique before
conditionally including conf files.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Build the topology for the MTL chromebook with Headset on SSP 2 and
speakers on SSP 0.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Add variable definitions for all HS and Speaker settings such as codec
name, SSP DAI index, PCM caps names etc in preparation to make this file
reusable for variations in the SSP ports in different machines.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Dharageswari R <dharageswari.r@intel.com>
Refactor the module_adapter_copy() function to split the simple_copy
case into a separate helper function
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit fixes Speakers audio issue by aligning bitwidth format
of DAI config to 24-bit as SSP config, which has been modified by
commit c8fe1927c <topology1: change audio format to 24 bit for rt1019>
Signed-off-by: Pin-chih Lin <johnylin@google.com>
The limitation that SSP sample format is always S32_LE
does not hold. There can be I2S codecs where 16bit sample
width is used and SSP FIFO will expect 16bit samples from
DMA.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Add an instance attribute and make the name attribute mandatory for the
hw_config objects. This is required because the topology2 compiler allows
for expansion of string values with variable definitions. So, if we
wanted to expand the name from a variable definition(as shown below), it
is only possible if it were a normal attribute instead of the node ID as
it is currently.
Define {
SSP0_HW_CONFIG_NAME "SSP0"
}
Object.DAI.SSP.1 {
dai_index 0
Object.Base.hw_config.1 {
name $SSP0_HW_CONFIG_NAME
}
}
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add an instance attribute that will be used to instantiate DAI objects
and make dai_index a mandatory attribute for all DAI objects types. This
is in preparation to make the instance attribute default for all objects
with topology2. This is required because the topology2 compiler allows
for expansion of string values with variable definitions. So, if we
wanted to expand the value of dai_index from a variable definition(shown
as below), it is only possible if it were a normal attribute instead of
the node ID as it is currently.
Define {
SSP_DAI_INDEX 3
}
Object.Dai.SSP.1 {
dai_index $SSP_DAI_INDEX
}
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Make CONFIG_BUILD_OUTPUT_STRIPPED mandatory so we can always compare
builds. It makes practically zero build space and time difference and
has huge reproductibility value, see discussion in
https://github.com/zephyrproject-rtos/zephyr/pull/51954
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fetching different tags causes `git describe` output to be different.
Fixes commit 68b49c186e (".github/zephyr: switch Windows build to west
update --narrow")
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
It is not guaranteed that 'dd->z_config' is set when dai_reset() is
called. E.g. if the requested runtime parameters are not supported by
the hardware, the parameter setup will not be completed. When
dai_reset() is called in this state, a FW crash is hit due to NULL
dereference.
Fix the issue by checking dd->z_config value before use.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Now each stream is built with at least two pipelines and this can't
support more than 8 streams, 6 streams in normal. This results to CI
test failure since it will tests all streams although current topology
is simple.
Now increase it to 32 for future enhancement.
Signed-off-by: Rander Wang <rander.wang@intel.com>
The pipeline-free chain DMA implementation has multiple
issues, so disable it by default in Intel cAVS topologies.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
There is a checkpatch warning shown as below.
"WARNING: externs should be avoided in .c files"
Move extern declaration to afe-memif.h, so that the warning won't be
seen in the follow-up project.
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Move afe driver to afe folder so that platform independent drivers could
be reused. There are platform folder inside afe folder which are
reserved for platform independent driver.
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Sinegen control part is platform dependent and optional for debug
purporse. On the other hand, memif control driver which is platform
independent could be reused. As a result, sinegen control driver is
separated from afe-memif.c.
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
It worked because we defined DMIC_DRIVER_VERSION 3 as the default value.
We have to specify PLATFORM=mtl when the default value was removed.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Hardware HDA chain require manager for controlling multiple streams tasks.
Enable support with LL task and DMA mandatory logic.
Signed-off-by: Piotr Makaruk <piotr.makaruk@intel.com>
No need to invalidate cache again - comp_new() already has done it.
Also document why we don't need to copy config_data[] and use
memcpy() directly instead of mailbox_hostbox_read() - we already have
a pointer and cached have been invalidated already.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
With IPC4 the top level component that receives trigger events is a
copier and not the associated with it DAI. We need to retrieve the
DAI device pointer for its timing parameters.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Some DAI types share properties objects between playback and capture
directions and write to them and read from them with no locking. Add
a DAI spinlock to protect them.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Dumb search/replace per @mwasko's request in #6933.
Urgently required because the @mrawja account does not exist anymore and
Github complains.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
frame_fmt was later overwritten by ipc_config.framefmt, so
the previous assignment no use anymore.
Removed whole dai_get_hw_params function to avoid misunderstand.
Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
Other jobs typically use `west update --narrow` which is faster but also
able to fetch "wild" SHA1s from any random place! It is useful for
testing unmerged Zephyr commits but risks accepting "invalid" zephyr
commits; this will not.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Caching `docker pull` does not work for size and other reasons, add a
link to the failed experiment.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
These two generated files are the only ones stored with CRLF in git end
of lines for no reason. Probably because they were generated on Windows,
then copied to Linux before being checked into git. If they had been
added to git running on Windows then the default `autocrlf=true` would
have likely converted them to LF.
These CRLF EOLs have caused a `git hash-object` mismatch before as seen
in #5917). Now that Windows is compiling SOF, #5920 must be
reverted (see previous commit) and they are causing mismatches again.
While this normalization unfortunately causes some large git noise, that
noise can be easily filtered out with [ git ] diff -b or -w or
--ignore-space-at-eol. Github and many others also have similar
filtering options. Temporarily converting them locally with `unix2dos`
or any editor is another option.
As they are generated, comparisons should most often be performed from
the source(s) they come from anyway.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commit 3315681c69 ("cmake: make sure sha1 is computed without
filters") added the `--no-filters` option to the `git hash-object`
invocation used to produce a `src/` checksum embedded in all firmware
binaries and .ldc files.
This fixed a small mismatch for the (very few) people using the
_asymmetric_ `autocrlf = input`. However it created a huge mismatch for
the numerous people using the _symetric_ `autocrlf = true`.
So revert that commit, remove `--no-filters` and replace it with a build
time warning.
`--no-filters` produces a checksum of the files as they are on the
filesystem, as opposed to how they would be input into git after
optional CRLF -> LF conversion.
When `--no-filters` was added, no one was compiling in Windows. Most
developers were not performing any conversion because there is no
`autocrlf` conversion by default on Linux. Files were identical inside
and outside of git and life was simple.
Simple life except for at least one indomitable Linux developer who had
the _asymmetric_ `autocrlf = input` setting. Also, the SOF git repo
always had two exceptional (and generated) files with CRLF end of lines;
see issue #5917 for details (all other files have LF end of lines). So
for that "asymmetric" developer only and these two files only, `autocrlf
= input` converted these 2 files to LF before hashing and this caused a
different checksum. `--no-filters` stopped that conversion and "solved"
that mismatch.
But now Windows has entered the stage. On Windows, the default is
usually (and unfortunately) the symmetric `autocrlf = true`. It is the
default for Github's Windows runner. This symmetric default converts ALL
other files to CRLF when extracting them out of git. This causes `git
hash-object --no-filters` to produce a _different hash for all but 2
files on Windows_!
The only solution is to:
1. Drop the `--no-filters` to align everything on what is _stored in
git_. What is stored in git is the only thing we are sure all users have
in common.
2. Request users to use only _symmetric_ `autocrlf` settings so any
optional input+output conversion cancels itself out.
3. Convert odd files and make sure they all have LF end of lines.
4. In the future, drop this entire git hash-object technique which is
flawed in multiple ways and has been causing multiple issues. Much,
much more work than this very small revert though.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>