Repository navigation
Conversation
In sof_static_topology_init(), Stage 7 calls sof_static_topology_init_controls()
which dispatches to sof_static_kcontrol_set() to set initial default control
values. However, sof_static_kcontrol_set() checks for an active topology via:
if (!s_active_topo)
return -ENODEV;
Because s_active_topo was previously assigned only after Stage 7 succeeded,
all initial kcontrol configurations failed with -ENODEV (-19).
Publish s_active_topo prior to running Stage 7 so control lookups succeed,
and ensure s_active_topo is reset to NULL in err_unwind if initialization fails.
Signed-off-by: Liam Girdwood <lgirdwood@gmail.com>
In sof_static_topology_prepare_comps() (Stage 6), comp_prepare() is called on all components in COMP_STATE_READY. For optional or unrouted components declared in a static topology that currently have neither source buffers nor sink buffers attached (both bsource_list and bsink_list are empty), comp_prepare() fails with -ENOTCONN (-107). Skip components that have no buffer connections in the stage 6 prepare loop. Signed-off-by: Liam Girdwood <lgirdwood@gmail.com>
lgirdwood
force-pushed
the
topic/static-pipeline-fixes
branch
from
October 15, 2026 18:25
9084313 to
a0838bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes two initialization and prepare issues in the declarative static pipeline loader subsystem (
static_pipeline_loader.c), which operates strictly under IPC4 (CONFIG_IPC_MAJOR_4=y):Premature kcontrol initialization order in
sof_static_topology_init():sof_static_topology_init_controls()) dispatches default control values viasof_static_kcontrol_set(), which verifiesif (!s_active_topo) return -ENODEV;.s_active_topowas assigned only after Stage 7 succeeded, causing all initial kcontrol configurations at boot to fail with-ENODEV(-19).s_active_topo = topo;prior to Stage 7, and reset it toNULLinerr_unwindif topology construction fails.Unrouted component prepare failure:
sof_static_topology_prepare_comps()),comp_prepare()is called on all components inCOMP_STATE_READY. For optional or unrouted components declared in a static topology that have no connected buffers (bsource_listandbsink_listboth empty),comp_prepare()fails with-ENOTCONN(-107).Changes
src/audio/pipeline/static_pipeline_loader.c:s_active_topo = topo;before callingsof_static_topology_init_controls(), and clear toNULLon error unwind.list_is_empty(&dev->bsource_list) && list_is_empty(&dev->bsink_list).All static pipeline logic remains strictly IPC4-based with zero IPC3 dependencies.