... down from ERROR. It was never an error, this was a hack to be
duplicated to both trace and etrace. This will make it easier to search
for actual errors.
Also make the banners slightly different between etrace and trace thanks
to new SHM: and DMA: prefixes. This makes identification of log files
easier.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Direct access to mbox shared memory logging when DMA tracing is
either not initialized yet or disabled or found broken for any
reason.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Returns a small constant instead of crashing platform_timer_get() when
timer is NULL.
This is required to restore early tracing before sof->timer is
initialized.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Found by chance while looking for something else.
This makes no difference right now because we checked the "length" in
the line immediately before but let's do the right thing anyway, at the
very least it's more readable.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Add matching comp_data_blob_handler_free calls for
comp_data_blob_handler_new in error paths, which are
missing in many components' "new" functions.
Signed-off-by: Li-Yu Yu <aaronyu@google.com>
Fixes#4356
In XTOS SOF, ipc_send_queued_msg() is run by task_main_primary_core(),
the initialization of which has a hard and circular dependency with the
initialization of the EDF scheduler. This EDF scheduler is not part of
Zephyr. Because of the circular dependency it does not seem
possible (nor desirable?) to refactor this code and make it compatible
with Zephyr. So schedule ipc_send_queued_msg() differently in Zephyr:
using a notifier triggered by the periodic Low Latency scheduler.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Reword doxygen comments and change the private helper function
names to better reflect the actual implementation. No functional
change.
The PM_RUNTIME_HOST_DMA_L1 resource is used to coordinate host DMA
users, so that DMI link is kept in L1 until all users are ready to
activate the link. This is a bit unusual usage of runtime-pm interface
in that a 'put on a resource' triggers transition to higher power state,
so this deserves some more documentation.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Buffer and params not initialised to zero like the other IPC structures
used by testbench. Fix this.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This enables support for running the allocator mocks with valgrind by
building the allocator for the host library target using a similar
heap map to Intel CAVS targets (memory.c is almost identical copy of CAVS
version).
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This makes it possible to match the table with the definitions.
Pure comment change, no code change.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
If the core is not up, the comp exist in the comp_list.
So no need to check if the core is up.
This reverts commit bccecb1a8e.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
To increase performance of audio application code, the SOF heap should
be mapped to cached address region on platforms with aliased
cached/uncached memory layout.
This splits the heap into two and maps the SOF_MEM_ZONE_BUFFER to
the cached heap and all rest to uncached heap.
The raw heap memory area is still mapped to uncached memory, even for
the cached heap. The allocated blocks are converted to cached addresses
and passed to SOF users of rmalloc() and rballoc_align(). To ensure
application buffers do not share cachelines with heap metadata chunks,
allocation sizes are rounded up to integer multiples of platform
cacheline size.
BugLink: https://github.com/thesofproject/sof/issues/4306
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Disable dmic interrupts first followed freeing by the dmic task
and finally, free the dmic pdata.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Buffer lists were being deleted twice, at first by the
pipeline_disconnect() (the correct place) and then by buffer_free().
Fix this so buffer_free() only frees the buffer.
==426365== Invalid write of size 8
==426365== at 0x49CB47B: list_item_del (list.h:57)
==426365== by 0x49CB47B: buffer_free (buffer.c:179)
==426365== by 0x49C8C7B: ipc_buffer_free (helper.c:697)
==426365== by 0x10C1E6: free_comps (testbench.c:165)
==426365== by 0x10C1E6: main (testbench.c:415)
==426365== Address 0x4bdce48 is 152 bytes inside a block of size 168 free'd
==426365== at 0x484521F: free (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==426365== by 0x49C9163: comp_free (component_ext.h:55)
==426365== by 0x49C9163: ipc_comp_free (helper.c:866)
==426365== by 0x10C200: free_comps (testbench.c:162)
==426365== by 0x10C200: main (testbench.c:415)
==426365== Block was alloc'd at
==426365== at 0x4847A25: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==426365== by 0x10D4E8: comp_alloc (component.h:548)
==426365== by 0x10D4E8: file_new (file.c:430)
==426365== by 0x49C81E7: comp_new (helper.c:423)
==426365== by 0x49C8F0F: ipc_comp_new (helper.c:823)
==426365== by 0x10E642: load_fileread (topology.c:323)
==426365== by 0x49E13A0: load_widget (tplg_parser.c:1281)
==426365== by 0x10F796: parse_topology (topology.c:779)
==426365== by 0x10BE76: main (testbench.c:310)
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
DAI config IPC is propagated to all DAI comps scheduled on
all cores but it should only be done if the secondary core is
enabled.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Make them shared between cores as they can be shared with
other pipelines, trace and possibly even DMA.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
When a secondary core is disabled and re-enabled without a
D3 cycle, the POWER_UP IDC message end up reading the trace
point message from the first boot. Reset it during power down
to avoid this.
Suggested-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Pipeline components will be freed by the host before the
pipeline widget itself is freed. No need to walk the pipeline
and free anything during pipeline_free().
Fix the unit tests to remove the tests that are not relevant anymore.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
edf_sh->list is not an item. So calling list_itel_del()
on it is wrong in scheduler_free_edf().
remove list_init() from scheduler_free_edf() as the list
should already be free and initialized.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Check and return error if enabling a core fails instead
of overwriting the error with a subsequent successful
core power up.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Move the existing sof-apl-nocodec to the development folder, in case
SOF CI still wants to use it.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Not all devices have 4 cores, some only have 2 and even APL/GLK is
currently limited to a single core.
For now we still use a single core for all topologies, we will enable
multi-core in a follow-up patch.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Prepare for reuse across all platforms. For now this still uses
single-core.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
We first want to enable the simplified topologies, then multi-core
then dynamic pipelines. The latter two cases will be handled in
follow-up patches.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This memory is already owned and initialized by the OS under Zephyr
(and in many cases already holds live output!), don't touch it.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Print out the target_core value when timed out during
idc_wait_in_blocking_mode(), which is useful for debugging.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
After first compress play run init_done is initialized with 1 and it
keeps this value as no one resets it.
This causes subsequent compress play to miss codec process init phase
and this causes decoding to fail.
With this change multiple cplay runs work fine!
Notice that cadence_codec_reset calls cadence_codec_init and thus resets
init_done flag.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
There is no rt1308 on the TGL-H-RVP platform, need to add a topology
file with only rt711 to enable soundwire on the TGL-H-RVP platform.
The patch of enable soundwire on the TGL-H-RVP platform has been
merged into the thesofproject/linux.
Signed-off-by: Gongjun Song <gongjun.song@intel.com>