Skip to content

topology2: webrtc-aec: use single format on the input pins - #11348

Open
ujfalusi wants to merge 1 commit into
thesofproject:mainfrom
ujfalusi:peter/pr/tplg-webrtc-aec-fix
Open

ujfalusi wants to merge 1 commit into
thesofproject:mainfrom
ujfalusi:peter/pr/tplg-webrtc-aec-fix

Conversation

@ujfalusi

Copy link
Copy Markdown
Contributor

The webrtc-aec has two input pins: pin0 for the microphone data and pin1 for the echo reference. The format of the module's pins is set at instantiation time; pin0 via the base config and pin1 via the base config extension. There is no way to change it afterwards.

When a module has multiple input pins, the host can only configure them correctly if each pin has a single format: the module can be instantiated from either path. When the echo reference path is set up first, the host has no information on which of the pin0 formats (S16 or S32) is going to be used by the microphone path, and the pin1 format is always taken as the first one listed.

Remove the S32 formats from the class definition, leaving a single S16 format on each pin and on the output. The output uses the sample format of pin0 in the firmware. The only user, the nocodec webrtc-aec topology uses S16.

The webrtc-aec has two input pins: pin0 for the microphone data and pin1
for the echo reference. The format of the module's pins is set at
instantiation time; pin0 via the base config and pin1 via the base
config extension. There is no way to change it afterwards.

When a module has multiple input pins, the host can only configure them
correctly if each pin has a single format: the module can be
instantiated from either path. When the echo reference path is set up
first, the host has no information on which of the pin0 formats (S16 or
S32) is going to be used by the microphone path, and the pin1 format is
always taken as the first one listed.

Remove the S32 formats from the class definition, leaving a single S16
format on each pin and on the output. The output uses the sample format
of pin0 in the firmware. The only user, the nocodec webrtc-aec topology
uses S16.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
@ujfalusi
ujfalusi requested review from kv2019i, lgirdwood and singalsu and a balanced review from Copilot October 23, 2026 13:33

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.

🟢 Approval recommended

The descriptor changes match the intended S16 configuration; the remaining feedback is a minor documentation correction for S32 overrides.

1 open issue
What changed in this PR

This PR makes the WebRTC AEC topology class use a single S16 format per input pin, avoiding ambiguous format selection when either input path instantiates the module first.

Changes:

  • Removes S32 descriptors and updates the input/output format counts.
  • Keeps the output in S16, matching pin0 and the existing nocodec topology.
  • Adds comments explaining format constraints and widget overrides.
File Description
tools/​topology/​topology2/​include/​components/​webrtc-aec.conf Restricts both inputs and the output to S16 and documents override guidance.

Review effort: Balanced

Comment on lines +106 to +107
# Override the formats in the widget object for S32 (pin0 and output) or for a
# different channel count.
@intel-sofci

Copy link
Copy Markdown

PR 11348: test results

Run date: 2026-10-23 14:21 UTC

Tested commit: 65d22c405e79b1b86880c566315b016ae1810637

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