-
Notifications
You must be signed in to change notification settings - Fork 350
Topology2: add echo reference support to jack and amp function topologies #10546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Currently, the "Loopback_Virtual" copier DAI is created in both sdw-amp-generic.conf and sdw-jack-generic.conf. It works fine in the monolithic topology because with the SDW_SPK_ECHO_REF flag, it will be created either by sdw-amp-generic.conf or sdw-jack-generic.conf. However, it doesn't work in the function topology case. The jack function topology will be loaded first and the "Loopback_Virtual" copier DAI is not created in the jack function topology if the amp function topology is also loaded. The commit suggests to use a SDW_ECHO_REF_DAI flag to indicate whether the "Loopback_Virtual" copier DAI is required or not. So that we can set the flag in the cmake file and create the "Loopback_Virtual" copier DAI in the jack function topology even when the amp function topology is loaded, too. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request refactors echo reference support in topology2 configurations by centralizing the shared alh-copier widget instantiation. The PR moves the Loopback_Virtual alh-copier widget definition from individual jack and amp configuration files to a central location in cavs-sdw.conf, controlled by a new SDW_ECHO_REF_DAI flag. This consolidation eliminates code duplication and provides a cleaner approach for enabling echo reference DAI support across different topology configurations.
Changes:
- Added new
SDW_ECHO_REF_DAIflag and centralized alh-copier widget definition in cavs-sdw.conf - Removed duplicate alh-copier widget definitions from sdw-jack-generic.conf and sdw-amp-generic.conf
- Added
SDW_SPK_ECHO_REF=trueandSDW_ECHO_REF_DAI=trueparameters to existing and new topology configurations
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/topology/topology2/cavs-sdw.conf | Adds SDW_ECHO_REF_DAI flag definition and centralized alh-copier widget for echo reference support |
| tools/topology/topology2/platform/intel/sdw-jack-generic.conf | Removes duplicate alh-copier widget definition previously instantiated conditionally |
| tools/topology/topology2/platform/intel/sdw-amp-generic.conf | Removes duplicate alh-copier widget definition for speaker echo reference |
| tools/topology/topology2/production/tplg-targets-sdca-generic.cmake | Updates existing topologies with echo reference flags and adds new ref_dai topology variants |
| tools/topology/topology2/development/tplg-targets.cmake | Adds SDW_ECHO_REF_DAI=true to development topology configurations with echo reference |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "cavs-sdw\;sof-sdca-1amp-id2\;NUM_SDW_AMP_LINKS=1,SDW_JACK=false,\ | ||
| SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\ | ||
| DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true" | ||
| DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true,SDW_SPK_ECHO_REF=true" |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing SDW_ECHO_REF_DAI=true parameter. The SDW_SPK_ECHO_REF=true flag requires the alh-copier widget "Loopback_Virtual" to be instantiated, which is now only created when SDW_ECHO_REF_DAI=true (see cavs-sdw.conf lines 142-171). Without SDW_ECHO_REF_DAI=true, the route at sdw-amp-generic.conf:1102 will reference a non-existent "alh-copier.Loopback_Virtual.25" widget, causing a topology build or runtime error. Either add SDW_ECHO_REF_DAI=true to this topology configuration or remove SDW_SPK_ECHO_REF=true.
| "cavs-sdw\;sof-sdca-2amp-id2\;NUM_SDW_AMP_LINKS=2,SDW_JACK=false,\ | ||
| SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\ | ||
| DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true" | ||
| DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true,SDW_SPK_ECHO_REF=true" |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing SDW_ECHO_REF_DAI=true parameter. The SDW_SPK_ECHO_REF=true flag requires the alh-copier widget "Loopback_Virtual" to be instantiated, which is now only created when SDW_ECHO_REF_DAI=true (see cavs-sdw.conf lines 142-171). Without SDW_ECHO_REF_DAI=true, the route at sdw-amp-generic.conf:1102 will reference a non-existent "alh-copier.Loopback_Virtual.25" widget, causing a topology build or runtime error. Either add SDW_ECHO_REF_DAI=true to this topology configuration or remove SDW_SPK_ECHO_REF=true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is intentional. The "Loopback_Virtual" will be vreated by the jack topology.
| "cavs-sdw\;sof-sdca-3amp-id2\;NUM_SDW_AMP_LINKS=3,SDW_JACK=false,\ | ||
| SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\ | ||
| DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true" | ||
| DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true,SDW_SPK_ECHO_REF=true" |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing SDW_ECHO_REF_DAI=true parameter. The SDW_SPK_ECHO_REF=true flag requires the alh-copier widget "Loopback_Virtual" to be instantiated, which is now only created when SDW_ECHO_REF_DAI=true (see cavs-sdw.conf lines 142-171). Without SDW_ECHO_REF_DAI=true, the route at sdw-amp-generic.conf:1102 will reference a non-existent "alh-copier.Loopback_Virtual.25" widget, causing a topology build or runtime error. Either add SDW_ECHO_REF_DAI=true to this topology configuration or remove SDW_SPK_ECHO_REF=true.
| "cavs-sdw\;sof-sdca-4amp-id2\;NUM_SDW_AMP_LINKS=4,SDW_JACK=false,\ | ||
| SDW_AMP_FEEDBACK=false,SDW_SPK_STREAM=Playback-SmartAmp,NUM_HDMIS=0,\ | ||
| DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true" | ||
| DEEPBUFFER_FW_DMA_MS=10,DEEP_BUF_SPK=true,SDW_SPK_ECHO_REF=true" |
Copilot
AI
Feb 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing SDW_ECHO_REF_DAI=true parameter. The SDW_SPK_ECHO_REF=true flag requires the alh-copier widget "Loopback_Virtual" to be instantiated, which is now only created when SDW_ECHO_REF_DAI=true (see cavs-sdw.conf lines 142-171). Without SDW_ECHO_REF_DAI=true, the route at sdw-amp-generic.conf:1102 will reference a non-existent "alh-copier.Loopback_Virtual.25" widget, causing a topology build or runtime error. Either add SDW_ECHO_REF_DAI=true to this topology configuration or remove SDW_SPK_ECHO_REF=true.
topologies Add echo reference support to the jack and amp function topologies. The function topologies will be loaded with the jack -> amp order. So always create the "Loopback_Virtual" DAI copier in the jack function topology and there are 2 versions of amp function topologies. One is with the "Loopback_Virtual" DAI copier and the other doesn't. The Linux driver will select the one with "Loopback_Virtual" DAI copier if no jack function is loaded and select the one without "Loopback_Virtual" DAI copier otherwise. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
8ec6f99 to
12e37b9
Compare
Add echo reference support to jack and amp function topologies