Repository navigation
Conversation
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>
Contributor
There was a problem hiding this comment.
🟢 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
PR 11347: test resultsRun date: Tested commit: a49ba951d780207be1565cd4dc6601cbf0d3d047 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.