From da6c8e47a8f189c38a9228a7feba6b093403d144 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Mon, 26 Oct 2026 17:22:30 +0200 Subject: [PATCH] topology2: echo reference: route from loopback DAI only when it exists 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 --- .../platform/intel/sdw-amp-echo-ref.conf | 16 ++++++++++++---- .../platform/intel/sdw-jack-echo-ref.conf | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/tools/topology/topology2/platform/intel/sdw-amp-echo-ref.conf b/tools/topology/topology2/platform/intel/sdw-amp-echo-ref.conf index abde20519f2e..8a00d8d43516 100644 --- a/tools/topology/topology2/platform/intel/sdw-amp-echo-ref.conf +++ b/tools/topology/topology2/platform/intel/sdw-amp-echo-ref.conf @@ -34,11 +34,19 @@ IncludeByKey.SDW_SPK_ECHO_REF { } ] - Object.Base.route [ - { - source "alh-copier.Loopback_Virtual.25" - sink "siggen.$SDW_SPK_ECHO_REF_PIPELINE_ID.1" + # the loopback DAI copier is only defined with SDW_ECHO_REF_DAI + IncludeByKey.SDW_ECHO_REF_DAI { + "true" { + Object.Base.route [ + { + source "alh-copier.Loopback_Virtual.25" + sink "siggen.$SDW_SPK_ECHO_REF_PIPELINE_ID.1" + } + ] } + } + + Object.Base.route [ { source "module-copier.21.22" sink "siggen.$SDW_SPK_ECHO_REF_PIPELINE_ID.1" diff --git a/tools/topology/topology2/platform/intel/sdw-jack-echo-ref.conf b/tools/topology/topology2/platform/intel/sdw-jack-echo-ref.conf index fa506c6b2d46..3d8ef9b7f579 100644 --- a/tools/topology/topology2/platform/intel/sdw-jack-echo-ref.conf +++ b/tools/topology/topology2/platform/intel/sdw-jack-echo-ref.conf @@ -90,11 +90,19 @@ IncludeByKey.SDW_JACK_ECHO_REF { } ] - Object.Base.route [ - { - source "alh-copier.Loopback_Virtual.25" - sink "siggen.$SDW_JACK_ECHO_REF_PIPELINE_ID.1" + # the loopback DAI copier is only defined with SDW_ECHO_REF_DAI + IncludeByKey.SDW_ECHO_REF_DAI { + "true" { + Object.Base.route [ + { + source "alh-copier.Loopback_Virtual.25" + sink "siggen.$SDW_JACK_ECHO_REF_PIPELINE_ID.1" + } + ] } + } + + Object.Base.route [ { source "module-copier.1.12" sink "siggen.$SDW_JACK_ECHO_REF_PIPELINE_ID.1"