Repository navigation
[BUG][ADL-P] DSP panic on device boot-up or resume-from-suspend for sof-adl-max98357a-rt5682-2way tplg #6964
Description
Describe the bug
ChromeOS device: Brya/Taniks (ADL-P)
ChromeOS image version: R111-15313.0.0
Under this OS version the backporting v5.10 kernel commit chain is landed.
The waves-integrated SOF build is generated from Google-internal rpl-001-drop-stable branch (checkout head: https://chrome-internal-review.googlesource.com/c/chromeos/third_party/sound-open-firmware-private/+/5325552/1).
While issues being fixed on other devices e.g. Vell, Primus, we found the DSP panic is now observable on Taniks devices. And it seems to be (not strictly-verified) reproducible on Taniks only, and only after kernel backporting commits landing (it can pass by the latest SOF build + OS version 15308.0.0)
To Reproduce
Can be reproduced by Taniks (tplg: sof-adl-max98357a-rt5682-waves-2way). Verified that even if we removed waves (use sof-adl-max98357a-rt5682-2way.tplg instread) the issue is still reproducible.
- Flash OS image R111-15313.0.0
- DSP panic may be observed after device rebooted (not 100%)
- DSP panic can be ~100% reproducible after resume-from-suspend by command
suspend_stress_test -c 1
Observation
To summarize the observation so far:
| proposed fixes | attached conf/tplg | Core SPK | Core DMIC48K | Core DMIC16K/KWD | DSP panic? |
|---|---|---|---|---|---|
| the present tplg | sof-adl-max98357a-rt5682-waves-2way | 1 | 1 | 0 | Has DSP panic |
| tplg w/ removing Waves | sof-adl-max98357a-rt5682-2way | 1 | 1 | 0 | Has DSP panic |
| tplg running on one core | sof-adl-max98357a-rt5682-waves-2way-core0 | 0 | 0 | 0 | NO |
| tplg w/ removing dmic16k/KWD | sof-adl-max98357a-rt5682-waves-2way-nohotword | 1 | 1 | 0 | NO |
(tplg/conf files can be found in the attached zip-file)
Impact
Audio broken on Taniks devices
Log Analysis
The observed DSP panic information is like the following:

Although the error was shown on DMIC0 (DMIC48K), by comparing between sof-loggers from the present tplg (left) and the one-core tplg (right), the error seems to start from the suspicious behavior while re-loading DMIC16K/KWD topology of the present tplg after resume-from-suspend. (logs can be found in the attached zip-file)
The following sof-loggers are extracted from the timing after resume-from-suspend. Arrows in yellow are starting points for loading a new pipeline. Both of the first loading pipe_id is 12 (KWD pipeline). Logs on the right (one-core tplg) show the next actions to create selector (arrow in green) and google-hotword-detect which are located on KWD pipeline, and then load pipe_id 11 (DMIC16K pipeline).
However, logs on the left (present tplg) show the different behavior which jumps to Core#1 for edf_scheduler_init (arrow in read) and then starts to load pipe_id 10 (DMIC48K pipeline). KWD/DMIC16K pipelines seem to be skipped loading since I didn't find in the following logs.

In the end of logs from the present tplg we can find the error message on ipc_comp_connect which leads to DSP issue like the example below (sink_id 59 stands for the selector located on KWD pipeline while source_id 60 is its source buffer).

From my perspective the missing logs for loading KWD/DMIC16K pipelines might be caused from the side effect of multi-core processing. However the ipc_comp_connect error shouldn't be expected which implies the defect by DSP recovering during suspend-resume. However, I have no idea why it is only observed on sof-adl-max98357a-rt5682-2way cases (w/ and w/o Waves). Would it happen to meet the corner case for AMP_SSP=2 or codec in TDM mode?
Activity
sathyap-chrome commentedon Jan 19, 2023
@johnylin76 similar issue i saw with suspend resume cycling on Skolas too ( sof-adl-max98360a-rt5682.tplg) Attach below dmesg logs.. Will perform more experiments.
I also think the DMIC16k loading is the cause from the minimal logs.
@kv2019i
kv2019i commentedon Jan 19, 2023
@johnylin76 @sathyap-chrome One suspicion is whether the SOF tree used here, has any components that are not safe w.r.t. to freeing widgets.
For some background, SOF kernel&FW have enabled dynamic loading of pipeline elements in upstream. As one requirement, kernel has started to free FW widgets (versus old FW versions where the free was not used at all, everything was static and FW power was just cut off with all state lost).
Recently we found issues with newer kernel and older 2.0-based SOF FW. This was fixed with patch merged as https://lore.kernel.org/r/20221101114913.1292671-1-kai.vehmanen@linux.intel.com and this should be present in ChromeOS kernels as well.
That patch used SOF2.2 as a cutoff point when the new flow is used. E.g. if FW is newer than 2.2.0, then FW is expected to cleanly implement the free widget flows. We have tests against stable-2.2 tree in upstream CI that regularly tests this for all kernel changes.
But, but, I now wonder whether the FW in this case has some module (or just a different type of code flow with existing code), that triggers on error. This FW branch is based on 2.2 SOF, so kernel will use the new flow.
A quick way to test for this hypothesis is to modify the version check in sof_ipc3_tear_down_all_pipelines() and to skip the widget free flow for 2.2.0 as well. So something like:
FYI to @ranj063 as well
marc-hb commentedon Jan 20, 2023
I'm afraid the version in the firmware comes from parsing the output of
git describewith a regular expression which is obviously super brittle:kv2019i commentedon Jan 20, 2023
@marc-hb wrote:
I'm all for moving to a plain-version-in-make (like Linux and many other projects do), but in this specific case, a vanilla FW built from rpl-001-drop-stable branch has:
$ git describe --tags --abbrev=12 --match v* --dirty
v2.2-59-g7f8e01dfc753
... so the version is correctly set and kernel will use the new flow (that assume FW can handle free_widget calls).
CHROMIUM: ASoC: SOF: ipc3-topology: use old pipeline even for SOF v2.2
lgirdwood commentedon Jan 26, 2023
@kfrydryx @kv2019i any status update ?
kv2019i commentedon Jan 27, 2023
@lgirdwood wrote:
@Vamshigopal @sathyap-chrome any update on this? I see there's a patch merged to chrome kernel tree...
Vamshigopal commentedon Jan 30, 2023
@kv2019i we have a patch by increasing the SOF_FW_VER check to 2.3 in chrome kernel tree as suggested by you.
Issue is not observed after that.
marc-hb commentedon Jan 30, 2023
@Vamshigopal I believe @kv2019i's suggestion was only a temporary test hack to narrow down the issue, not a fix. I think it was only intended to point the finger at the code that frees widgets in order to understand the issue better; not to fix it. It fools the kernel into thinking the firmware is "old", I mean < 2.2. But that firmware branch is not actually old.
... except maybe for some component(s) which are actually "old"? In that case is such a mix of old and new firmware code safe? No idea sorry.
Vamshigopal commentedon Jan 31, 2023
Agree @marc-hb we took it as a temporary fix in chrome kernel
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4179517
We have seen this issue when we have thirdpatry modules in pipeline, may be we should investigate more on why tp modules cannot free widgets .
johnylin76 commentedon Jan 31, 2023
I don't think it's exactly right. In my description above DSP panic issues are reproducible with and without Waves (third-party module). However it might have bad influence since we mostly found out this issue on 3P module-integrated devices.
lgirdwood commentedon Feb 1, 2023
@johnylin76 do we need the pipeline teardown feature for this device ? If not, then safest option is probably to disable it for the moment. This could be a use after free() situation. e.g. does the following patch make any difference ?
This would cause a NULL deref on any reuse after free().
kv2019i commentedon Feb 3, 2023
@Vamshigopal @johnylin76 I'll lower priority as a workaround is available and deployed.
I think there are two ways to go about this in upstream:
Now I'd prefer not to go via (2) approach. Avoiding this flow will significantly reduce validation coverage of pipeline setup/teardown paths, which are essential to enabling dynamic pipelines. And as SOF2.2 is our long-term support branch for cAVS2.5 hardware with IPC3, we'd like to keep covering this feature as well.
The issue does not happen in SOF main or SOF stable-v2.2, so this does point to some out-of-tree component. It seems Waves is not the cause, so this would point to some other delta.
johnylin76 commentedon Feb 9, 2023
This issue probably has the same root cause as what @cujomalainey proposed the fix #7056 for.
Unfortunately we still got some user feedback with DSP panic encountered after we landed #6964 (comment) for skipping static pipeline tear-down and #6928 for running core re-distribution, although they considerably lowered the reproducing rate in most devices.
lgirdwood commentedon Feb 9, 2023
@mwasko fyi - fix for #7056 could help here too.
github-actions commentedon Jun 19, 2025
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.