Uprev of the CRAS APM code

This CL is an uprev of the CRAS APM code. The uprev is to the WebRTC commit
ce702dbbe4e86d5248a6ad4b13475cc166dd02a8 (Dec 8, 2021).

Some important new features picked up by the uprev include
-Disabling of denormals (shown to have huge impact of CPU when the audio processed is silent.
-Code optimizations (shown to significantly reduce the AEC complexity).
-Improved handling of echoes in reverberant environments.

BUG=b:177830918
TEST=Manually tested
Exempt-From-Owner-Approval:This CL already has OWNERS approval by hychao@ but gerrit still asks for owners approval. To circumvent the gerrit-issue, I exempt this CL for approval.

Change-Id: I0fefa3644d25cb2ebafb356df69221da3829c814
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/webrtc-apm/+/3452884
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Per Åhgren <peah@chromium.org>
Tested-by: Per Åhgren <peah@chromium.org>
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Commit-Queue: Per Åhgren <peah@chromium.org>
(cherry picked from commit 8136191a962e1a62c28a12bc0392d7db94adb1d2)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/webrtc-apm/+/3509293
Reviewed-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Commit-Queue: Hsinyu Chao <hychao@chromium.org>
Tested-by: Hsinyu Chao <hychao@chromium.org>
1425 files changed
tree: fe21cc99a7a5f531f7f2d669613730f8504ef21d
  1. absl/
  2. api/
  3. audio/
  4. common_audio/
  5. cras-config/
  6. modules/
  7. rtc_base/
  8. script/
  9. system_wrappers/
  10. third_party/
  11. bak.h
  12. common.mk
  13. common_types.h
  14. libwebrtc_apm.pc.template
  15. Makefile
  16. OWNERS
  17. pc_utils.mk
  18. README.md
  19. typedefs.h
  20. webrtc_apm.cc
  21. webrtc_apm.h
README.md

WebRTC APM

APM is the audio processing module of WebRTC project in charge of effects like echo cancellation, noise suppression, etc. The purpose of this project is to build a standalone library for Chrome OS system side audio processing.

Files content

  • scripts to copy over folders and files from upstream WebRTC project for APM and its dependencies.
  • Copied files from upstream WebRTC project. For example: common_audio, modules, rtc_base and system_wrappers.
  • webrtc_apm.cc/h C wrappers to access APM functions.
  • common-mk based makefiles to build shared library libwebrtc_apm.so

Update

To update this package to latest upstream WebRC:

  • Run ./script/sync-apm.sh path/to/webrtc-checkout/src .
  • emerge webrtc-apm to see if anything breaks.
  • If emerge success, then we're good.
  • Otherwise look into the emerge failure, and then possibly:
    • Update sync-apm.sh to copy more files if upstream directory structure changes.
    • Update makefiles if upstream build files has changed.
    • Update webrtc-apm ebuild file if dependencies changed.
  • Create a new commit