Skip to content

ASoC: SOF: ipc4-pcm: reset skip_during_fe_trigger pipelines before DE… - #5876

Closed
naveen-manohar wants to merge 10000 commits into
thesofproject:topic/sof-devfrom
naveen-manohar:compr
Closed

ASoC: SOF: ipc4-pcm: reset skip_during_fe_trigger pipelines before DE…#5876
naveen-manohar wants to merge 10000 commits into
thesofproject:topic/sof-devfrom
naveen-manohar:compr

Conversation

@naveen-manohar

Copy link
Copy Markdown

Bug: SOF IPC4 compressed audio fails on second playback (WCL/PTL/SoundWire)

Component: Sound / SOF IPC4 driver
Platform: Intel WCL/PTL with RT721-SDW codec
Symptom: First AAC compressed playback succeeds; every subsequent attempt fails immediately with ERR: cannot set device: Invalid argument.

Root cause:
Shared output pipelines marked skip_during_fe_trigger=1 bypass started_count/paused_count updates during the STOP trigger. At teardown, SET_PIPELINE_STATE(RESET) is never issued for these pipelines because the condition !started_count && !paused_count evaluates to false. When DELETE_PIPELINE is sent while the pipeline is still in RUNNING state the firmware rejects it with error 12 ("Required resource is in invalid state"). The pipeline remains stranded in firmware, so the next CREATE_PIPELINE for that pipeline instance fails with error 9, blocking all further compressed stream opens.
LOG:

FW reported error: 12 - Required resource is in invalid state
ipc error for msg 0x12010000|0x0
failed to free pipeline widget pipeline.1
sof_ipc4_compr_stream_free: pcm50: sof_widget_list_free failed -22
FW reported error: 9 - Specified resource not found
failed to create module pipeline.1
sof_ipc4_compr_set_params: widget list set up failed

IPC trace showing exact call sequence: -
aac_debug_trace_20260812_230146.log
[
Key: widget alh-copier: calling sof_widget_free → immediately ipc tx 0x12010000 (DELETE_PIPELINE pipeline.1) → FW error 12 — confirms pipeline.1 was never RESET before DELETE

Root cause trace (pipeline_list dump): -
aac_pipeline_trace_20260812_232524.log

PAUSED trigger: pipeline_list[1]: id=1 started=1 paused=0 skip=1 ← SKIPPED
RESET trigger: pipeline_list[1]: id=1 started=1 paused=0 skip=1 ← !1 = FALSE → NOT RESET

Fix verified — 5 consecutive passes -
aac_5run_verify_20260812_233425.log

Loading
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

19 participants

@naveen-manohar@ujfalusi@kirankrishnappa-intel@chethantn@toblux@Darksonn@johnstultz-work@VinceLiu-MTK@inc1de@V4bel@iganschel-bit@dceraolo@WenjieQiHUST@chaseyu@liujinbao1@smoelius@bvanassche@bryamzxz