STOP copying all files
from dir: sof/tools/build_tools/topology/topology2/cavs/
to dir: sof/tools/build_tools/topology/
The original plan discussed in the reviews of commit c0bee428ae
("topology: prepare for Topology2.0") and commit 308a24a92b
("topology2: Add build support") and more recently
mentioned in #4611 was to overwrite in place some v1 topologies with
newer v2 topologies in order to "force" users to upgrade without them
realizing it. This original plan is now being abandoned. v2 topologies
will never overwrite v1 topologies and if ever then certainly not "en
masse". Moreover, v2 topologies will be placed in a new /lib/firmware/
subdirectory. So, partial revert the aforementioned commits. More
specifically. stop installing v2 topologies into the same directory as
v1 topologies.
Note there had never been any actual overwrite of any v1 topology yet
because there had never been any v2 topology of the same name.
At this point in time this gets rid of the following copies:
tools/build_tools/topology: abi.conf
tools/build_tools/topology: cavs-mixin-mixout-hda-2ch-cnl.conf
tools/build_tools/topology: cavs-mixin-mixout-hda-2ch-cnl.tplg
tools/build_tools/topology: cavs-mixin-mixout-hda-2ch-tgl.conf
tools/build_tools/topology: cavs-mixin-mixout-hda-2ch-tgl.tplg
tools/build_tools/topology: cavs-mixin-mixout-hda-4ch-cnl.conf
tools/build_tools/topology: cavs-mixin-mixout-hda-4ch-cnl.tplg
tools/build_tools/topology: cavs-mixin-mixout-hda-4ch-tgl.conf
tools/build_tools/topology: cavs-mixin-mixout-hda-4ch-tgl.tplg
tools/build_tools/topology: cavs-mixin-mixout-hda.conf
tools/build_tools/topology: cavs-mixin-mixout-hda.tplg
tools/build_tools/topology: cavs-passthrough-hdmi.conf
tools/build_tools/topology: cavs-passthrough-hdmi.tplg
tools/build_tools/topology: cavs-sdw.conf
tools/build_tools/topology: cavs-sdw.tplg
tools/build_tools/topology: cavs-tgl-nocodec.conf
tools/build_tools/topology: cavs-tgl-nocodec.tplg
tools/build_tools/topology: nhlt-ace-mtl-nocodec.bin
tools/build_tools/topology: nhlt.bin
tools/build_tools/topology: nhlt-cavs-tgl-nocodec.bin
tools/build_tools/topology: sof-mtl-nocodec.conf
tools/build_tools/topology: sof-mtl-nocodec.tplg
From an "installer/" and sof-bin release perspective, this removes the
following topology that was just added by commit
ba26eeff9d ("topology2: cavs-nocodec: Add support for MTL nocodec
topology"). Installing v2 topologies into a new /lib/firmware/
subdirectory has not been implemented yet.
No other change besides dropping these copies, everything else is the
same.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
The value returned by the rballoc function is stored in the global variable
msg_reply.tx_data. If an allocation error occurs, the function returns an
error, but tx_data is overwritten with null. This value is then used in the
ipc_msg_send function which leads to null pointer reference.
Signed-off-by: Adrian Warecki <adrianx.warecki@intel.com>
These paths are not well supported on all devices and lead to errors such as
17:06:06 kernel: HDA Digital: ASoC: dpcm_be_dai_startup() failed at Digital Playback and Capture (-22)
17:06:06 kernel: Digital Playback and Capture: __soc_pcm_open() failed (-22)
17:06:06 kernel: snd_hda_codec_conexant ehdaudio0D0: ASoC: error at snd_soc_dai_startup on Digital Codec DAI: -22
17:06:06 kernel: snd_hda_codec_conexant ehdaudio0D0: ASoC: error at snd_soc_dai_startup on Digital Codec DAI: -22
17:06:06 kernel: snd_hda_codec_conexant ehdaudio0D0: didn't find PCM for DAI Digital Codec DAI
We've already removed this digital path for IPC4/topology2, let's also remove this for topology1.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This issue is found by CI capture test with Linux ipc4 driver.
For a pipeline like module A <-> mixin <-> mixout, mixin is
first bound to mixout then bound to module A in CI test. The
original code assume that module A is first bound to mixin
since windows driver always bind module from data source to
data sink.
This patch adds support for bind sequence in CI test.
Signed-off-by: Rander Wang <rander.wang@intel.com>
.module_init sections is used to keep all components constructor
functions.
Zephyr uses -ffunction-sections option which will create a section for
each function. Unfortunately, this creates a section named .module_init
for the function module_init() used to initialize the processing module
generic layer.
Thus, places module_init() in the constructor area named .module_init
which is wrong.
To avoid this we rename .module_init section for constructors to
.initcall.
Fixes: https://github.com/thesofproject/sof/issues/5662
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Commit 475e09f17d ("xtensa-build-zephyr.py: default to
subprocess.run(check=True)") switched the default value of the
execute_command() function to "True". Remove all the "check=True"
arguments that are now redundant.
Zero functional change.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This reverts commit 9b3715fc16.
The commit causes the following error:
[ 146.052617] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx : 0x47000000|0x0: MOD_SET_DX [data size: 8]
[ 146.556588] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc timed out for 0x47000000|0x0
[ 146.556596] sof-audio-pci-intel-tgl 0000:00:1f.3: ctx_save IPC error: -110, proceeding with suspend
The reason is that for IPC4 the reply format is different compared to what
IPC3 is using and also the signaling is different.
If we skip sending the reply, there will be no reply going to be sent to
the host.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
There are warnings about bison and flex not available.
Interestingly these were not fatal errors but time to fix them.
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Add ipc4 build support for tgl with IPC4_CONFIG_OVERLAY.
If IPC_VERSION is chosen as IPC4, then overlay configuration file
for different platforms will be used automatically without assigning
the configuration file with options.
Different configuration files will be used according to what platform
is building firmware for.
Signed-off-by: Xiaoyun Wu(Iris) <xiaoyun.wu@intel.com>
The function rballoc_align did not take into account the passed flags, so
it always incorrectly allocated a cached memory. Added support for the
SOF_MEM_FLAG_COHERENT flag.
Signed-off-by: Adrian Warecki <adrianx.warecki@intel.com>
The notifier struct contains a spin lock which was located in
incoherent memory. This caused an assert on startup when enabling the
build with CONFIG_ASSERT.
At the very least this fix enables building and running with
SPIN_VALIDATE and ASSERT which could help diagnosing issues such
as the panic_dump being garbled.
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
Fix capture issue on windows and linux. In original code
if the source is in another pipeline line and is inactive
, ENODATA is returned. If current pipeline has higher
priority than the source pipeline, then the source pipeline
may be not started, so we return error only when source
pipeline has higher priority.
Signed-off-by: Rander Wang <rander.wang@intel.com>
This Patch to help easily understand available heap from the trace dump.
Current dump:
src/lib/alloc.c:567 heap: 0xbe206000 size 12288 blocks 3 caps 0x65
src/lib/alloc.c:569 used 448 free 11840
src/lib/alloc.c:577 block 0 base 0xbe206000 size 64
src/lib/alloc.c:580 count 64 free 57
Dump with this patch:
src/lib/alloc.c:567 INFO heap: 0xbe206000 size 12288 blocks 3 caps 0x65
src/lib/alloc.c:569 INFO (In Bytes) used 0 free 12288
src/lib/alloc.c:576 INFO 64 Bytes blocks ID:0 base 0xbe206000
src/lib/alloc.c:580 INFO Number of Blocks: total 64 used 0 free 64
Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Signed-off-by: Jairaj Arava <jairaj.arava@intel.com>
Add the audio formats for 4ch in passthrough-be and passthrough-capture
pipelines.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
When SetDx message shut down primary core, response to this IPC will be
send during power down procedure. It's done to minimize the chances of
the host shutting down power before the core is ready.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
This reduces the number of warnings from about 600 to a more manageable
350.
Disable W0312 because the entire file uses tabs.
Disable C0103 because we have higher priority than naming conventions.
Disable C0116 because the script is small enough, shouldn't require
pydoc everywhere.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Sometimes we want to load a binary block of data without letting
userspace interact with the underlying control. An RO control will do
this exactly by loading the data and providing no write access.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
All TGL-based ADSPs are multicore, but it should also be possible to
build SOF with CONFIG_CORE_COUNT=1.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
The log buffer status notifications are triggered too frequently on
small buffer chunks causing an unnecessary overhead on dma transfer.
In order to make the dma transport more effective this change
triggers the ipc4 dma transport only when half of the available buffer
is filled with log entries. The ipc3 transport is always triggered.
Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
Use the size which is already initialized in posn.rhdr.hdr instead of
using sizeof(posn) which is incompatible with ipc4.
Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
Initialize the header and size of the ipc4 log buffer status
notification to correct values.
Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com>
In ipc4 path there is no ipc param message from host and
each module needs to build param from module config.
It does not affect ipc3 since the function does nothing
in ipc3 path.
Signed-off-by: Rander Wang <rander.wang@intel.com>
CPC is for pipeline schedule not for dev->frames and its
value is more than 1000 which is not fir for frames.
Dev->frame is assigned in src_verify_params and we don't
need to set it here.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Currently we stop preparing when a component in another
pipeline only for some conditions. In ipc4 passthrough pipeline
host & dai are in different pipelines, these conditions can't
cover it. Actually we should only prepare component in its
parent pipeline, not in other pipeline.
This patch make sure that component is prepared in its own pipeline.
Signed-off-by: Rander Wang <rander.wang@intel.com>
When two modules in different pipeline are unbind, the buffer used
by them is free. The buffer is not free if they are in the same
pipeline. So we need to free buffer when pipeline is free
Signed-off-by: Rander Wang <rander.wang@intel.com>
In a topology where mixer is connected to multiple source pipelines, the
mixer<->DAI downstream pipeline for playback is kept running when
sources are put to PAUSED state.
This design means that mixer_copy() needs to continue to produce output
samples as the DAI is kept running as well. There is existing code to
generate silence when all sources are PAUSED.
A problem remains in the sequence when sources are RELEASED. On the
first iteration after RELEASE, the source state can be changed (so mixer
sees non-zero num_mix_sources). But the sources may not have any data
available on the first cycle. This can lead to XRUNs observed at the DAI
as the mixer is not continuously producing data in ACTIVE state.
Address this issue by adding a "sources_inactive" state to mixer. When
all sources are inactive, mixer enters this state. When sources are
resumed, mixer will note this state, and continue to generate silence
(on its output) until at least one source starts generating audio data.
This ensures continuous audio output to the mixer downstream pipeline.
The change is not sufficient on its own, but is part of the fixes
to address: https://github.com/thesofproject/sof/issues/5469
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
`_end` and `_heap_sentry` linker symbols are used to infer heap size. In
Zephyr, `_end` is referenced as `char []` while in SOF as `uint8_t`.
This may "conflicting types", should those declarations be built
together.
This patch changes the Zephyr wrapper to also use `char []`, thus
avoiding this issue.
Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
The copier component receiving data from the host has an empty
bsource_list. The copier_params function references the first item in the
list without checking its size. In some cases, this leads to memory
corruption.
Signed-off-by: Adrian Warecki <adrianx.warecki@intel.com>
gcc implements COMPILER_FALLTHROUGH with an __attribute__ so there
must be a semicolon after it. Also remove unused variables.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Obviously this is a bug, but it works now because parameters are known
before prepare is done.
We will be introducing dynamic codec id set at prepare time, so there
will be a problem if apply config is called before codec is prepared.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Move cadence_codec_resolve_api to cadence_codec_post_init function.
We need this because later the entire cadence_codec_post_init function
will be called later then init.
At init we do not know yet the codec id.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Separate code that finds and assigns API function given an codec_id
into a function.
This makes code cleaner and helps us move finding the api id in another
part of the code.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>