Echo reference tuning and bug fixes

- Add some smoothing in the method used to detect and compensate for echo path
delay deviation: update the reference buffer only if a deviation in the same
direction is observed for more than N consecutive reads.
Also increase the threshold controlling the reference buffer update to avoid
excessive adjustments.

- Fix problem in get_next_buffer() when echo_reference_write() is called with
variable buffer sizes which happens when the echo reference is used after a
resampler in the audio HAL.

- Use the same resampler quality level in echo reference and audio HAL to help
the AEC by reducing the delay variation and filtering differences between the
capture and echo path.

- Take resampler delay into account when calculating echo reference delay.

Change-Id: I2f425154efddd9a28f1d035fde70d55104043606
1 file changed
tree: e0455887b304155f70cb80cfea87940b1198652e
  1. audio_effects/
  2. audio_utils/
  3. camera/
  4. CleanSpec.mk