Revert "Reland "Activate adaptive channel mixing when the echo canceller runs in stereo"" This reverts commit 5ad42502a816e90fcb8ff1d157267f676fe8ebc9. Reason for revert: broke the chromium roll. Original change's description: > Reland "Activate adaptive channel mixing when the echo canceller runs in stereo" > > This reverts commit 8c9f8a0fc026f856961845e4cb835237aeb61304. > > Reason for revert: The issues in code that this CL relies on have now been addressed and the CL should now work as intended. > > Original change's description: > > Revert "Activate adaptive channel mixing when the echo canceller runs in stereo" > > > > This reverts commit 82a3659e1164aeb4f3ace437a061684734786d50. > > > > Reason for revert: Seems to be breaking in chromium: > > https://chromium-review.googlesource.com/c/chromium/src/+/7490942?tab=checks > > > > # > > # Fatal error in: third_party/webrtc/modules/audio_processing/audio_buffer.cc, line 152 > > # last system error: 2 > > # Check failed: !use_adaptive_downmixing || buffer_internal_num_channels_ == 2 > > # > > > > Original change's description: > > > Activate adaptive channel mixing when the echo canceller runs in stereo > > > > > > This CL activates adaptive channel mixing when the echo canceller runs in stereo mode. > > > The mixing is provided by the CaptureRemixer class. > > > The adaptive mixing is activated behind a finch-based kill-switch that allows it to be > > > activated. > > > > > > Bug: webrtc:42221468 > > > Change-Id: I5c4e79edb69752bbbb4c1cfe9271d1224fb695aa > > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/433640 > > > Commit-Queue: Per Åhgren <peah@webrtc.org> > > > Reviewed-by: Tomas Lundqvist <tomasl@google.com> > > > Cr-Commit-Position: refs/heads/main@{#46678} > > > > Bug: webrtc:42221468 > > Change-Id: Ifc3f489e0fe8b4da1b891fd0dd425280a8698fdf > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/442441 > > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > > Reviewed-by: Harald Alvestrand <hta@webrtc.org> > > Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org> > > Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org> > > Cr-Commit-Position: refs/heads/main@{#46685} > > Bug: webrtc:42221468 > Change-Id: I720df6d70de705a1027907d3cd2758d6b569cd75 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/444140 > Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org> > Reviewed-by: Harald Alvestrand <hta@webrtc.org> > Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org> > Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> > Commit-Queue: Per Åhgren <peah@webrtc.org> > Cr-Commit-Position: refs/heads/main@{#46800} Bug: webrtc:42221468 No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: If52e241869547996452f62aff9baba943f459723 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/446340 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#46809}
diff --git a/api/audio/audio_processing.h b/api/audio/audio_processing.h index 878059b..d257929 100644 --- a/api/audio/audio_processing.h +++ b/api/audio/audio_processing.h
@@ -156,7 +156,7 @@ // needed). DownmixMethod capture_downmix_method = DownmixMethod::kAverageChannels; DownmixMethod capture_downmix_method_stereo_aec = - DownmixMethod::kAdaptive; + DownmixMethod::kAverageChannels; } pipeline; // Enabled the pre-amplifier. It amplifies the capture signal
diff --git a/experiments/field_trials.py b/experiments/field_trials.py index 537fb67..9faa63a 100755 --- a/experiments/field_trials.py +++ b/experiments/field_trials.py
@@ -53,9 +53,6 @@ FieldTrial('WebRTC-Agc2SpeechLevelEstimatorExperimental', 457791164, date(2026, 11, 5)), - FieldTrial('WebRTC-ApmAdaptiveCaptureMixingForStereoKillSwitch', - 42221468, - date(2026, 8, 1)), FieldTrial('WebRTC-ApmEnforce48kHzProcessingRate', 454695115, date(2026, 6, 1)),
diff --git a/modules/audio_processing/audio_processing_impl.cc b/modules/audio_processing/audio_processing_impl.cc index 6857eb3..e86cc3c 100644 --- a/modules/audio_processing/audio_processing_impl.cc +++ b/modules/audio_processing/audio_processing_impl.cc
@@ -474,9 +474,7 @@ "WebRTC-ApmExperimentalMultiChannelCaptureKillSwitch"), EnforceSplitBandHpf(env.field_trials()), MinimizeProcessingForUnusedOutput(env.field_trials()), - env.field_trials().IsEnabled("WebRTC-ApmEnforce48kHzProcessingRate"), - env.field_trials().IsEnabled( - "WebRTC-ApmAdaptiveCaptureMixingForStereoKillSwitch")), + env.field_trials().IsEnabled("WebRTC-ApmEnforce48kHzProcessingRate")), capture_(), capture_nonlocked_(), applied_input_volume_stats_reporter_( @@ -566,20 +564,12 @@ render_.render_converter.reset(nullptr); } - const bool use_echo_controller = - NeedEchoController(config_, !!echo_control_factory_); - const bool multi_channel_capture = config_.pipeline.multi_channel_capture && - constants_.multi_channel_capture_support; // Enforce adaptive downmixing when the echo canceller is active and // multi-channel processing is used. AudioProcessing::Config::Pipeline::DownmixMethod downmixing_method = config_.pipeline.capture_downmix_method; AudioProcessing::Config::Pipeline::DownmixMethod downmixing_method_stereo = config_.pipeline.capture_downmix_method_stereo_aec; - if (constants_.fallback_to_generic_downmixing_with_stereo_aec || - (!(use_echo_controller && multi_channel_capture))) { - downmixing_method_stereo = downmixing_method; - } capture_.capture_audio.reset(new AudioBuffer( formats_.api_format.input_stream().sample_rate_hz(),
diff --git a/modules/audio_processing/audio_processing_impl.h b/modules/audio_processing/audio_processing_impl.h index 6db177b..c058961 100644 --- a/modules/audio_processing/audio_processing_impl.h +++ b/modules/audio_processing/audio_processing_impl.h
@@ -424,23 +424,19 @@ bool multi_channel_capture_support, bool enforce_split_band_hpf, bool minimize_processing_for_unused_output, - bool enforce_48_khz_max_internal_processing_rate, - bool fallback_to_generic_downmixing_with_stereo_aec) + bool enforce_48_khz_max_internal_processing_rate) : multi_channel_render_support(multi_channel_render_support), multi_channel_capture_support(multi_channel_capture_support), enforce_split_band_hpf(enforce_split_band_hpf), minimize_processing_for_unused_output( minimize_processing_for_unused_output), enforce_48_khz_max_internal_processing_rate( - enforce_48_khz_max_internal_processing_rate), - fallback_to_generic_downmixing_with_stereo_aec( - fallback_to_generic_downmixing_with_stereo_aec) {} + enforce_48_khz_max_internal_processing_rate) {} bool multi_channel_render_support; bool multi_channel_capture_support; bool enforce_split_band_hpf; bool minimize_processing_for_unused_output; bool enforce_48_khz_max_internal_processing_rate; - bool fallback_to_generic_downmixing_with_stereo_aec; } constants_; struct ApmCaptureState {