When the length of the path/file name surpass 32, there is no '\0'
anymore in the panicinfo.filename[] array, which will lead to file name
printing errors on the host side like this:
.../include/cavs/lib/pm_memory.h\xd8:472
Here copy the last character from the filename together to fix the issue
and eventually got correct output like this:
.../include/cavs/lib/pm_memory.h:472
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
The upstream zephyr adds new SDK requirement for APL,
upgrade zephyr SDK version to 0.13.1 for APL build.
Signed-off-by: Chao Song <chao.song@linux.intel.com>
The number of host and link DMAs need to be aligned on capture and
playback since they can be coupled/decoupled. The existing code
defined 8 link DMA channels for input and output which does not make
any sense.
This patch modifies the number of link DMAs to align with hardware
specs. The values were doubled-checked in the closed-source firmware,
there is no such thing as 8ch link DMA support.
cAVS 1.5/APL:
capture: 7 ch
playback: 6ch
cAVS 1.8+:
capture: 7ch
playbach: 9ch
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
The run with valgrind will error if memory leaks are detected.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This updates SoF rimage submodule to the current TOP
of main branch. Namely from 246ea64 to 8960097, delta change log:
8960097 (HEAD -> main, upstream/main) Revert "ext_manifest: Fix incorrect signature"
0d7f2d4 Do not exit(0) on invalid options or parameters
6e22944 README.md: explain how to run SOF tests on new rimage code
a9faf85 remove '-x' option
241af31 ext_manifest: Fix incorrect signature
4823e87 pkcs: quote the name of key file when logging it
dcfcef8 config: Remove unused, platform specific, memory region definitions
fc4d7b8 rimage: Fix error message content after adsp malloc fail
3e20076 config: Return error value in parse_uint32_* functions when key is not found
ada30c1 config: Explicit state return value for error cases in parse_uint32_* functions
de9177b config: Adjust return type with function name
c4a7456 config: Remove machine_id field
916fc2c config: Remove unused adsp structs
9bf46d3 rimage: Add support for mt8195
aea1969 adsp_config: fix potential overflow in strtol()
9716e10 (origin/master, origin/main) config: Add imx8ulp.toml
b28b993 fixing incorrect data offset in ri_manifest_sign_v1_5
d1553e9 config: add rn toml file to support renoir build
246ea64 config: skl: change image_size to the real SRAM size
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
We have limited buffer zone which can't afford as big as 200KB+
allocation request on platforms like APL, remove the case.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
The buffer zone will not occupy more than half of the HP SRAM, decrease
the HEAP_BUFFER_COUNT_MAX which can help save about 5KB for us.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
For driver timer,
use mtk systimer instead of xtensa internal timer.
(xtensa timer clk will affect by dsp clock rate.)
mtk systimer runs at clk at 26M.
Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Because it's not needed.
Also add a comment explaining why it's still needed to build topologies
so we can remove it some day and test much faster.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This reverts commit 9fadef789e.
After multiple trials on a CometLake SoundWire device, this revert to
bring the trace back to what it was seems to be the only solution, the
suggested PR https://github.com/thesofproject/linux/pull/3166 does not
help on this SoundWire device.
We had similar issues with SD offset timeouts and a similar revert
with https://github.com/thesofproject/sof/pull/4578 at the end of
July, there's something that we are missing on what the trace does and
how it impacts the DMA handling.
BugLink: https://github.com/thesofproject/sof/issues/4779
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Add Waves override config for jasperlake_chrome.
Enable codec_adapter and Waves codec.
Disable unnecessary components to save resources.
Signed-off-by: Oleh Titov <Otitov@waves.com>
When freeing we currently implicitly are trusting the ID to match the
type specified in the message. From a security standpoint this is wrong,
never trust the other side. This is the likely cause of how the fuzzer
is leaking memory in pipelines since they have additional allocations
that are not freed when they are treated as a buffer or a component.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
This patch fixes the ipc timeout issues by avoiding
the acquiring of ipc lock in platform ipc driver, which
was already hold by ipc core thread during ipc complete command.
Signed-off-by: balapati <balakishore.pati@amd.com>
Add panic code to dump required info during
firmware exceptions.
This patch enables to dump the call stack, debug info
and inform host driver for exceptions in firmware.
Signed-off-by: balapati <balakishore.pati@amd.com>
Align the DMAC usage and channel mappings with the closed source firmware.
This may help with DMA stability when trace is disabled.
Compile tested only as I have no working BYT/CHT HW.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Looks like a copy and paste error.
BDW also has SSP as target for DMAC0 which is forbidden by the
direction capability. Align with the direction cap to avoid confusion.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Fixes 177d9bd073 ("cmake: defer the rimage build until it's actually
needed.") that corrected the rimage dependency but forgot about the
include.
This allows building the testbench without fetching rimage.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
before copy section to host, the hist pointer should
be updated.
otherwise, there are some left data in dma buffer and
host don't know.
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
No matter if CONFIG_DEBUG_HEAP selected or not, we need to print out
error message when allocation failed. Furthermore, dump the whold heap
usage in case under heap debugging or allocation failure.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Previously the file component stored component data to device
private data similarly as processing components. However the
pipeline treats file as DAI. Without this patch the missing driver
and DAI operation get_init_delay_ms() causes a segfault in pipeline
parameters walk. It is sufficient for the walk to pass to have just
rzalloc() cleared pointers in driver structure.
The file component data is now placed into DAI private data.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
For ipc3 mixer, pipeline will stop at mixer for trigger
and prepare cases, but it is not fit for ipc4, since there
are more than 1 pipeline in the pcm stream, one for mixer and
following components and another one is for front-end components.
This patch divides prepare & trigger function to two parts: common
shared part and part for mixer.
Signed-off-by: Rander Wang <rander.wang@intel.com>
source & sink components are set when pipeline is complete,
so skip these components check when pipeline is set to
complete.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Unlike current ipc3 pipeline, driver will not set schedule
component for ipc4 pipeline. This patch set the last component
of each pipeline as a schedule component.
Signed-off-by: Rander Wang <rander.wang@intel.com>
New pipeline status PRE_START and PRE_RELEASE made
ipc4 pipeline failed. Now integrate the patch to ipc4.
Since ipc3 & ipc4 have different msg reply method,
this reply method will be implemented on each version.
We can't reuse ipc->delayed_response since ipc msg
should be response immediately for ipc4 and fw will
send a fw ipc msg to reply the status of the last msg.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Currently pipeline_xrun_set_limit cannot fail, but the TODO in the
function suggests that is not planned to be true for the future. Lets
fixup the error logic so when that happens we don't leak a pipeline
definition.
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
This reverts commit 89ec377cb5.
As commit 7df367451d ("trace: enable trace after it is ready") is
reverted this is not required anymore. See long previous commit message.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This reverts commit 7df367451d.
This restores the ability to use CONFIG_TRACEM (copy everything to
mailbox) without crashing, in other words it fixes#4699
This also fixes the other DSP panic #4676 and removes the need for
logical changes in #4678, which can be reverted too.
commit 7df367451d ("trace: enable trace after it is ready") was meant
to fix a crash when tr_xxx() was used early. However I've used very
early tracing for months and it never caused any crash (see #4334)
I tried adding a tr_err() statement immediately after trace_init(sof) in
primary_core_init() and it works just fine. primary_core_init() runs
extremely early so I don't think it's too demanding not to use an
tr_XXX() before the trace even exists.
The reverted commits confused initializing and enabling.
Reproduction #4683 did not seem to demonstrate anything obvious,
there's not even a link to a failed test run. I don't understand how
playing with spin locks is relevant to this.
Later, reproduction #4759 finally demonstrated the real issue: through
DEBUG_TRACE_PTR(), some tr_XXX() can indeed be called (in very unusal
debug circumstances specific to the original author) before the trace is
initialized. The previous commit in this series fixes that by simply
guarding it with if(trace_get())
--------
I am _not_ pretending that these reverts make the tracing code bug-free
and perfect again, absolutely not and very far from it. I'm merely
saying that:
- The first reverted commit caused at least two regressions: #4676 and
#4699
- These two commits added yet another variable (time) in an already
complex situation with an already existing combinatorial "explosion":
compile-time Kconfigs, run-time settings, platform-specific bugs
(#4333, #4573, ...), various races, mbox + DMA, different DMA engines,
Zephyr vs XTOS, etc.
- Last but not least, we don't want to invest in making the exist trace
implementation better. We want to switch to the Zephyr implementation
instead
So let's go back to a previous known good state, I mean _relatively_
good and stay there if we can.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This patch removes the unnecessary and unscalable -x option.
This option aims to add an offset to the .data section of
its parent .module section. This is horrible idea because this
offset will vary depend on the compiler used. It is better and
much easier to just store only the .data section so the offset
is always 0.
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Sometime, we could hear some noise after recording.
In host_prepare, reset dma buffer would be good
in general case to prevent reading uninitialized memory.
Add reset dma buffer zero to avoid unexpected noise
Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
The new gain ramp type can be selected from topology with
SOF_VOLUME_WINDOWS_FADE (4). The ramp follows function (t/T)^1.75.
The same shape is applied for all transitions: unmute, mute, vol up
and down. Subjectively it sounds somewhat smoother that linear ramp
of same duration.
As optimize and clean up the ramp type error handling is moved to new()
where the ramp function pointer is set. Ramp type does not change after
that.
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>