Repository navigation
Conversation
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>
|
Found with the new tplg2 validator tool #11344 |
There was a problem hiding this comment.
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 behindIncludeByKey.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
PR 11359: test resultsRun date: 2026-10-26 16:58 UTC Tested commit: da6c8e47a8f189c38a9228a7feba6b093403d144 |
bardliao
left a comment
There was a problem hiding this comment.
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.
|
Thanks @bardliao, you're right, and I misread this. The tool checked sof-sdca-amp-ref against sof-sdca-amp-ref-dai, which are alternatives, and missed that it's meant to pair with sof-sdca-jack-ref-dai, which provides the single loopback DAI. Validated together, the way the kernel loads them (sof-sdca-1amp-id2, sof-sdca-jack-id0, then sof-sdca-jack-ref-dai before sof-sdca-amp-ref in feature_topologies), the route resolves and there's no error. The jack side of this PR is the mirror case, so I'm closing the whole PR. I've also updated the validator in #11344 to handle this. A new --base option checks a feature topology on top of the topologies loaded before it. It also flags a second definition of a base topology's widget, so a duplicate echo reference DAI would show up. The known-issues entry for sof-sdca-amp-ref now records that it depends on sof-sdca-jack-ref-dai. One question while we're here. In that combination the validator still warns that alh-copier.Loopback_Virtual.25 has 0 output pins, and that siggen.120.1has two input routes but only one input pin. If the kernel binds Loopback_Virtual.25 -> siggen.120.1 when "Speaker Echo Reference" capture is opened, I'd expect sof_ipc4_get_queue_id() to fail with "invalid output num_pins: 0". Is that route skipped for the virtual loopback DAI or handled some other way? |
|
@kv2019i Not sure what combination you are referring to. Below are the tplg graphics of 1. sof-sdca-1amp-id2 + sof-sdca-amp-ref-dai 2. sof-sdca-jack-id0 + sof-sdca-jack-ref-dai and 3 sof-sdca-1amp-id2 + sof-sdca-amp-ref-dai + sof-sdca-jack-id0 + sof-sdca-jack-ref-dai
|



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.