| Index: webrtc/modules/audio_processing/audio_processing_impl.cc | 
| diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc | 
| index 3a83d1c2d69f65d8cede7f12e2f3eb2fa11a4b63..af6d9b7a2123bc0daa289ed769b99107be8d181f 100644 | 
| --- a/webrtc/modules/audio_processing/audio_processing_impl.cc | 
| +++ b/webrtc/modules/audio_processing/audio_processing_impl.cc | 
| @@ -366,18 +366,20 @@ int AudioProcessingImpl::InitializeLocked(const ProcessingConfig& config) { | 
| std::min(formats_.api_format.input_stream().sample_rate_hz(), | 
| formats_.api_format.output_stream().sample_rate_hz()))); | 
|  | 
| -  // We normally process the reverse stream at 16 kHz. Unless... | 
| -  int rev_proc_rate = kSampleRate16kHz; | 
| +  int rev_proc_rate = ClosestHigherNativeRate(std::min( | 
| +      formats_.api_format.reverse_input_stream().sample_rate_hz(), | 
| +      formats_.api_format.reverse_output_stream().sample_rate_hz())); | 
| +  // TODO(aluebs): Remove this restriction once we figure out why the 3-band | 
| +  // splitting filter degrades the AEC performance. | 
| +  if (rev_proc_rate > kSampleRate32kHz) { | 
| +    rev_proc_rate = is_rev_processed() ? kSampleRate32kHz : kSampleRate16kHz; | 
| +  } | 
| +  // If the forward sample rate is 8 kHz, the reverse stream is also processed | 
| +  // at this rate. | 
| if (capture_nonlocked_.fwd_proc_format.sample_rate_hz() == kSampleRate8kHz) { | 
| -    // ...the forward stream is at 8 kHz. | 
| rev_proc_rate = kSampleRate8kHz; | 
| } else { | 
| -    if (formats_.api_format.reverse_input_stream().sample_rate_hz() == | 
| -        kSampleRate32kHz) { | 
| -      // ...or the input is at 32 kHz, in which case we use the splitting | 
| -      // filter rather than the resampler. | 
| -      rev_proc_rate = kSampleRate32kHz; | 
| -    } | 
| +    rev_proc_rate = std::max(rev_proc_rate, static_cast<int>(kSampleRate16kHz)); | 
| } | 
|  | 
| // Always downmix the reverse stream to mono for analysis. This has been | 
| @@ -1151,11 +1153,11 @@ bool AudioProcessingImpl::is_rev_processed() const { | 
|  | 
| bool AudioProcessingImpl::rev_synthesis_needed() const { | 
| return (is_rev_processed() && | 
| -          formats_.rev_proc_format.sample_rate_hz() == kSampleRate32kHz); | 
| +          is_multi_band(formats_.rev_proc_format.sample_rate_hz())); | 
| } | 
|  | 
| bool AudioProcessingImpl::rev_analysis_needed() const { | 
| -  return formats_.rev_proc_format.sample_rate_hz() == kSampleRate32kHz && | 
| +  return is_multi_band(formats_.rev_proc_format.sample_rate_hz()) && | 
| (is_rev_processed() || | 
| public_submodules_->echo_cancellation | 
| ->is_enabled_render_side_query() || | 
|  |