Skip to content

topology2: google-rtc-aec: use single format on the input pins - #11347

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

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

Conversation

@ujfalusi

Copy link
Copy Markdown
Contributor

The google-rtc-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 (2ch or 4ch) is going to be used by the microphone path.

Remove the 4ch format from pin0 and from the output in the class definition, leaving a single 2ch format on each pin and on the output. The firmware requires the output channel count to match the microphone channel count.

The DMIC topologies use NUM_DMICS to select the channel count: override the google-rtc-aec pin0 and output format for 4ch microphones and move the formats of module-copier.1 from the pipeline class to the pipeline object to use a single format matching the google-rtc-aec pin0.

The google-rtc-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 (2ch or
4ch) is going to be used by the microphone path.

Remove the 4ch format from pin0 and from the output in the class
definition, leaving a single 2ch format on each pin and on the output.
The firmware requires the output channel count to match the microphone
channel count.

The DMIC topologies use NUM_DMICS to select the channel count: override
the google-rtc-aec pin0 and output format for 4ch microphones and move
the formats of module-copier.1 from the pipeline class to the pipeline
object to use a single format matching the google-rtc-aec pin0.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Copilot AI balanced review requested due to automatic review settings October 23, 2026 13:28

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

Static review supports consistent format counts, matching microphone and output channels, and compatibility with existing topology consumers.

No open issues 🎉

What changed in this PR

This PR makes Google RTC AEC pin formats deterministic at module instantiation, allowing either the microphone or echo-reference path to start first.

Changes:

  • Restricts the AEC class to one stereo format per input pin and one matching output format.
  • Adds four-channel microphone and output overrides selected by NUM_DMICS, while keeping the echo reference stereo.
  • Moves microphone copier format selection from the pipeline class to the pipeline object.
File Description
tools/​topology/​topology2/​platform/​intel/​google-rtc-aec-reference.conf Selects matching copier and AEC formats for two- or four-channel microphones.
tools/​topology/​topology2/​include/​pipelines/​cavs/​google-rtc-aec-capture.conf Delegates microphone copier formats to the pipeline object.
tools/​topology/​topology2/​include/​components/​google-rtc-aec.conf Defines single-format stereo defaults and documents override requirements.

Review effort: Balanced

@intel-sofci

intel-sofci commented Oct 23, 2026 •

Copy link
Copy Markdown

PR 11347: test results

Run date:

Tested commit: a49ba951d780207be1565cd4dc6601cbf0d3d047

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