Skip to content

topology2: echo reference: route from loopback DAI only when it exists - #11359

Open
kv2019i wants to merge 1 commit into
thesofproject:mainfrom
kv2019i:202610-swd-echo-ref-loopfix
Open

kv2019i wants to merge 1 commit into
thesofproject:mainfrom
kv2019i:202610-swd-echo-ref-loopfix

Conversation

@kv2019i

@kv2019i kv2019i commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

The speaker and jack echo reference configurations always add a route from alh-copier.Loopback_Virtual.25 to the echo reference siggen, but cavs-sdw.conf defines that DAI copier only with SDW_ECHO_REF_DAI=true.

sof-sdca-amp-ref is built with SDW_SPK_ECHO_REF=true and the default SDW_ECHO_REF_DAI=false, so it contains a route from a widget that no topology defines, and the kernel fails loading it in sof_route_load():

error: G001 route 'alh-copier.Loopback_Virtual.25' -> 'siggen.120.1':
source widget 'alh-copier.Loopback_Virtual.25' does not exist
(kernel: snd_soc_dapm_add_routes, sof_route_load)

Add the loopback route only with SDW_ECHO_REF_DAI=true. The jack echo reference has the same problem, although no current target uses it without the loopback DAI. Topologies built with SDW_ECHO_REF_DAI=true are unchanged apart from the order of routes.

The speaker and jack echo reference configurations always add a route
from alh-copier.Loopback_Virtual.25 to the echo reference siggen, but
cavs-sdw.conf defines that DAI copier only with SDW_ECHO_REF_DAI=true.

sof-sdca-amp-ref is built with SDW_SPK_ECHO_REF=true and the default
SDW_ECHO_REF_DAI=false, so it contains a route from a widget that no
topology defines, and the kernel fails loading it in sof_route_load():

  error: G001 route 'alh-copier.Loopback_Virtual.25' -> 'siggen.120.1':
  source widget 'alh-copier.Loopback_Virtual.25' does not exist
  (kernel: snd_soc_dapm_add_routes, sof_route_load)

Add the loopback route only with SDW_ECHO_REF_DAI=true. The jack echo
reference has the same problem, although no current target uses it
without the loopback DAI. Topologies built with SDW_ECHO_REF_DAI=true
are unchanged apart from the order of routes.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@kv2019i
kv2019i requested review from bardliao and ujfalusi and a balanced review from Copilot October 26, 2026 15:25
@kv2019i

kv2019i commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator Author

Found with the new tplg2 validator tool #11344

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

No open issues 🎉

What changed in this PR

Conditionally adds the echo reference loopback route only when the loopback DAI copier is actually defined (SDW_ECHO_REF_DAI=true), preventing kernel topology load failures due to missing source widgets.

Changes:

  • Gate the alh-copier.Loopback_Virtual.25 -> siggen.* route behind IncludeByKey.SDW_ECHO_REF_DAI { "true" { ... } } for both speaker and jack echo reference configurations.
File Description
tools/​topology/​topology2/​platform/​intel/​sdw-jack-echo-ref.conf Wraps the loopback echo-ref route in an SDW_ECHO_REF_DAI conditional to avoid referencing an undefined DAI copier.
tools/​topology/​topology2/​platform/​intel/​sdw-amp-echo-ref.conf Same conditional gating for speaker echo reference to prevent missing-widget route errors when the loopback DAI isn’t present.

Review effort: Lite

@intel-sofci

Copy link
Copy Markdown

PR 11359: test results

Run date: 2026-10-26 16:58 UTC

Tested commit: da6c8e47a8f189c38a9228a7feba6b093403d144

mtl pass rate lnl pass rate ptl pass rate wcl pass rate nvl pass rate

@bardliao bardliao left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was intentional. We may have echo reference for jack and or amp and we need to make sure there is one and only one echo reference DAI. The sof-sdca-amp-ref.tplg is supposed to work with sof-sdca-jack-ref-dai.tplg and the echo reference DAI will be created by sof-sdca-jack-ref-dai.tplg.

Sign up for free to 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.

4 participants