Skip to content

audio: ecns: changes to operate with real speaker echo reference - #11523

Merged
lgirdwood merged 7 commits into
thesofproject:intel/wov-d0i3-002from
singalsu:intel_wov-d0i3-002_ecns_echo_ref
Nov 23, 2026
Merged

lgirdwood merged 7 commits into
thesofproject:intel/wov-d0i3-002from
singalsu:intel_wov-d0i3-002_ecns_echo_ref

Conversation

@singalsu

Copy link
Copy Markdown
Collaborator

No description provided.

The ECNS module is changed to take a speaker echo reference into its
second input pin. The DMIC-only multi-slot WoV topologies have no
speaker playback to provide the reference, so they are removed.

Removed are the standalone manifests dmic-wov-multi-ptl-4ch-manifest.conf
and dmic-wov-multi-4ch-manifest.conf with their targets
sof-ptl-dmic-wov-multi-4ch and sof-tgl-dmic-wov-multi-4ch, the
dmic-wov-feature.conf targets sof-dmic-4ch-wov-multi and
sof-ptl-dmic-4ch-wov-multi, the WCL symlinks to them and the prebuilt
binaries in build/.

The dmic-wov-feature.conf no longer supports INCLUDE_WOV=multi, so the
classes used only by the multi-slot WoV are not included anymore. The
legacy single detector topology sof-dmic-4ch-wov and the
sof-ptl-dmic-wov-multi without ECNS are kept.

The documentation is updated to not refer to the removed topologies.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Change the ECNS input pin 1 from the 48 kHz DMIC stream to a 16 kHz
speaker echo reference. Input pin 0 stays the 16 kHz DMIC stream and
there is now a single output pin with 16 kHz mono to the KPB. The 48 kHz
host output pin and its high-pass filter are removed, the topology
captures the 48 kHz DMIC with the regular DMIC pipelines.

The 100 Hz high-pass filter and the capture boost switch of the output
are kept. The microphone downmix channel selection is changed from the
CONFIG_ECNS_KPB_MONO_AVG_* Kconfig choice to a new enum control. The
default value averages all microphone channels, the other values select
a single channel Mic1 to Mic4. A channel beyond the input channel count
falls back to the average. The new AEC switch control subtracts the
average of the echo reference channels from the filtered output. The new
NS switch control has no function yet. Both are off by default. The
echo reference is always consumed, missing frames are processed as zero.
The test signal switch is removed.

The output sample format is not in the IPC4 base config of ECNS, so it
is taken from the input format bit depth of the consumer, s16 or s32.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The WoV topologies use the tone component as siggen in the ECNS echo
reference pipeline. It passes through the speaker playback and
produces silence when the speaker is not running. Enable it for the
boards with ECNS and add the missing TGL manifest entry.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The ECNS is changed to take the speaker echo reference into its second
input pin. The headset WoV has no echo reference, so remove the ECNS
from it. The 48 kHz stereo headset capture is downmixed to mono (L+R)/2
with a micsel before the SRC to 16 kHz, so the SRC processes only one
channel. A module-copier converts the SRC output to 16 bits for the KPB.

The headset ECNS capture PCM 13 is removed with the ECNS, the raw
headset capture is available from PCM 1.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Add an echo reference pipeline class with a siggen and an SRC from
48 kHz to 16 kHz stereo. The siggen passes through the speaker playback
and produces silence when the speaker is not running. The SRC output
feeds the ECNS echo reference input pin in another pipeline.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The ECNS now takes the 16 kHz DMIC stream into input pin 0 and the
speaker echo reference into input pin 1, and has a single mono output
to the KPB. Add the AEC and NS switch controls to the ECNS class and
remove the test signal switch. Add the "DMIC ECNS mic channel" enum
control to the ECNS widget instance with the values Average, Mic1 and
Mic2 for 2ch microphones, and also Mic3 and Mic4 for 4ch microphones.

The echo reference pipeline 120 with siggen and SRC from 48 kHz to
16 kHz stereo feeds the ECNS pin 1. The speaker playback is duplicated
to the siggen with a module-copier before the DAI copier:

- SoundWire uses module-copier.21.22 and the Loopback_Virtual DAI as in
  the sof-ptl-rt713-l3-rt1320-l12-wov-aec topology, enabled with
  SDW_SPK_ECHO_REF_ECNS=true.
- ADL rt5682 adds a module-copier to the SSP speaker pipeline and uses
  the SSP loopback capture DAI, enabled with SPEAKER_ECHO_REF_ECNS=true.
- HDA generic adds a module-copier to the analog playback pipeline,
  enabled with HDA_SPEAKER_ECHO_REF_ECNS=true. There is no loopback
  DAI to start the echo reference pipeline setup.

The kernel matches the params of the first walked path against the
ECNS pin 0 formats, so with 4ch microphones pin 0 lists also the 2ch
format of the echo reference path.

The 48 kHz dmic01 is no longer passed through the ECNS. It is captured
with the same DMIC0 pipelines as in the topologies without WoV, e.g.
sof-hda-generic-4ch, but without the TDFB and DRC enhancements. The gain
component provides the volume and mute control, and the IIR the 40 Hz
high-pass filter with +20 dB gain. The WoV specific dmic01 pipelines
110 and 117 and the PCM 11 are removed. The capture is in the platform
DMIC Raw PCM, 10 for SoundWire, 6 for HDA generic and 99 for ADL
rt5682. The ADL WoV targets set DMIC0_PCM_ID=99 as the other rt5682
targets, and DMIC0_DAI_EQIIR=highpass_40hz_20db as SoundWire and HDA
generic have by default.

The documentation is updated for the new graph.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Build the SoundWire wov-multi topologies with
SDW_SPK_ENHANCED_PLAYBACK=false and SDW_DMIC_ENHANCED_CAPTURE=false.
The speaker playback is then without the IIR, FIR and DRC, and the
SmartMic capture is without the TDFB and DRC. The module-copier.21.22
for the ECNS echo reference is kept in the basic speaker pipeline.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
@singalsu
singalsu force-pushed the intel_wov-d0i3-002_ecns_echo_ref branch from 031ad12 to 1f5ab6f Compare November 23, 2026 11:30
@singalsu

Copy link
Copy Markdown
Collaborator Author
sof-wcl-rt722-4ch-wov-multi

@singalsu
singalsu marked this pull request as ready for review November 23, 2026 12:07
@lgirdwood
lgirdwood merged commit a0366e9 into thesofproject:intel/wov-d0i3-002 Nov 23, 2026
9 of 41 checks passed
@intel-sofci

Copy link
Copy Markdown

PR 11523: test results

Run date: 2026-11-23 12:31 UTC

Tested commit: 1f5ab6f74266f259ff161b5b30ce8de29c28f6a1

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

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.

3 participants