Commit graph

15 commits

Author SHA1 Message Date
Per Åhgren
db5d728878 Add refined handling of the internal scaling of the audio in APM
This CL adds functionality that allows adjusting the audio levels
internally in APM. The main purpose of the functionality is to allow
APM to optionally be moved to an integration that does not provide an
analog gain to control, and the implementation of this has been
tailored specifically to meet the requirements for that.

More specifically, this CL does
-Add a new variant of the pre-amplifier gain that is intended to replace
 the pre-amplifier gain (but at the moment can coexist with that). The
 main differences with the pre-amplifier gain is that an attenuating
 gain is allowed, the gain is applied jointly with any emulated analog
 gain, and that its packaging fits better with the post gain.
-Add an emulation of an analog microphone gain. The emulation is
 designed to match the analog mic gain functionality in Chrome OS (which
 is digital) but should be usable also on other platforms.
-Add a post-gain which is applied after all processing has been applied.
 The purpose of this gain is for it to work well with the integration
 in ChromeOS, and be used to compensate for the offset that there is
 applied on some USB audio devices.


Bug: b/177830918
Change-Id: I0f312996e4088c9bd242a713a703eaaeb17f188a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/209707
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33466}
2021-03-15 19:12:02 +00:00
Per Åhgren
552d3e3d5e Reland "Add ability to state whether the APM output will be used"
This is a reland of 8be2f201ba

Original change's description:
> Add ability to state whether the APM output will be used
> 
> This CL adds the ability for the surrounding code to state that the
> APM output will not be used. The intended usecase for this is to allow
> APM to run at a lower complexity when the endpoint is muted.
> When APM has been informed that the output will not be used, it can
> turn off code that is needed only for ensuring that the output audio
> will sound good.
> 
> Bug: b/154437967,b/163802450
> Change-Id: I8e22989e35354372e96191d15da44beb9d1b26ae
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181200
> Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31949}

Bug: b/154437967
Bug: b/163802450
Change-Id: Ia77a9e43f913929d1afa72212f1ea6c192d0e519
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181887
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31957}
2020-08-18 12:29:32 +00:00
Erik Språng
1804b339a9 Revert "Add ability to state whether the APM output will be used"
This reverts commit 8be2f201ba.

Reason for revert: Breaks downstream

Original change's description:
> Add ability to state whether the APM output will be used
> 
> This CL adds the ability for the surrounding code to state that the
> APM output will not be used. The intended usecase for this is to allow
> APM to run at a lower complexity when the endpoint is muted.
> When APM has been informed that the output will not be used, it can
> turn off code that is needed only for ensuring that the output audio
> will sound good.
> 
> Bug: b/154437967,b/163802450
> Change-Id: I8e22989e35354372e96191d15da44beb9d1b26ae
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181200
> Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
> Commit-Queue: Per Åhgren <peah@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31949}

TBR=alessiob@webrtc.org,peah@webrtc.org

Change-Id: I1e56dafbbfa6ea69cccbbb5cdc2b1e2a6c122c11
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/154437967
Bug: b/163802450
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181884
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31953}
2020-08-17 14:10:08 +00:00
Per Åhgren
8be2f201ba Add ability to state whether the APM output will be used
This CL adds the ability for the surrounding code to state that the
APM output will not be used. The intended usecase for this is to allow
APM to run at a lower complexity when the endpoint is muted.
When APM has been informed that the output will not be used, it can
turn off code that is needed only for ensuring that the output audio
will sound good.

Bug: b/154437967,b/163802450
Change-Id: I8e22989e35354372e96191d15da44beb9d1b26ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181200
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31949}
2020-08-17 12:56:24 +00:00
Alessio Bazzica
7c19a706b0 Audio Processing Module: add play-out audio device runtime information
Add a runtime setting that notifies play-out audio device changes.
The payload is a pair indicating a device id and its maximum play-out
volume.

kPlayoutVolumeChange is now forwarded not only to capture, but also
render (required by render_pre_processor).

Bug: webrtc:10608
Change-Id: I8997c207422c1dcd1d53775397d6290939ef3db8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159002
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29725}
2019-11-07 13:33:09 +00:00
Fredrik Hernqvist
ca362855e1 Add PlayoutVolumeChange RuntimeSetting.
Add a PlayoutVolumeChange RuntimeSetting. Trigger an echo path change when the playout volume is changed.

Bug: webrtc:10608
Change-Id: I1e736b93c1865d08c7d2582f6fe00216c1e1f72e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135746
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Fredrik Hernqvist <fhernqvist@webrtc.org>
Commit-Queue: Fredrik Hernqvist <fhernqvist@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27913}
2019-05-10 14:12:23 +00:00
Per Åhgren
6ee75fdfcb Allow setting the AGC2 fixed gain during runtime
This CL extends the supported runtime settings in
APM to also comprise the AGC2 fixed gain.
The CL was originally created by Adam Whiteside.

Bug: webrtc:10574
Change-Id: I79b3d6501f1e202b66a9b6018f8a493a56b01f62
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134101
Commit-Queue: Per Åhgren <peah@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27782}
2019-04-26 10:05:45 +00:00
Sam Zackrisson
8c147b68e6 Reland "Remove APM-internal usage of EchoControlMobile"
This is a reland of 2fbb83b16b

Original change's description:
> Remove APM-internal usage of EchoControlMobile
> 
> This is a sibling CL to a similar one for EchoCancellation:
> https://webrtc-review.googlesource.com/c/src/+/97603
> 
>  - EchoControlMobileImpl will no longer inherit EchoControlMobile.
>  - Removes usage of AudioProcessing::echo_control_mobile() inside most of
>    the audio processing module and unit tests.
> 
> The CL breaks audioproc_f backwards compatibility: It can no longer
> use all recorded settings (comfort noise, routing mode), but prints an
> error message when unsupported settings are encountered.
> 
> Tested: audioproc_f with .wav and aecdump inputs.
> Bug: webrtc:9535
> Change-Id: I63c3c81bcaf44021315978e1a0f3e42173b988ce
> Reviewed-on: https://webrtc-review.googlesource.com/101621
> Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24888}

Bug: webrtc:9535
Change-Id: I172706c6729cac4eb6afde1ebd6fc8f3a289d6c7
Reviewed-on: https://webrtc-review.googlesource.com/c/102881
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24943}
2018-10-03 07:45:33 +00:00
Sam Zackrisson
05a7004442 Revert "Remove APM-internal usage of EchoControlMobile"
This reverts commit 2fbb83b16b.

Reason for revert: Speculative revert over failing Chromium bot:
https://ci.chromium.org/p/chromium/builders/luci.chromium.webrtc.fyi/WebRTC%20Chromium%20FYI%20Android%20Tests%20%28dbg%29%20%28M%20Nexus5X%29/117

Original change's description:
> Remove APM-internal usage of EchoControlMobile
> 
> This is a sibling CL to a similar one for EchoCancellation:
> https://webrtc-review.googlesource.com/c/src/+/97603
> 
>  - EchoControlMobileImpl will no longer inherit EchoControlMobile.
>  - Removes usage of AudioProcessing::echo_control_mobile() inside most of
>    the audio processing module and unit tests.
> 
> The CL breaks audioproc_f backwards compatibility: It can no longer
> use all recorded settings (comfort noise, routing mode), but prints an
> error message when unsupported settings are encountered.
> 
> Tested: audioproc_f with .wav and aecdump inputs.
> Bug: webrtc:9535
> Change-Id: I63c3c81bcaf44021315978e1a0f3e42173b988ce
> Reviewed-on: https://webrtc-review.googlesource.com/101621
> Reviewed-by: Alex Loiko <aleloi@webrtc.org>
> Commit-Queue: Sam Zackrisson <saza@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24888}

TBR=saza@webrtc.org,aleloi@webrtc.org

Change-Id: I1f8a27ac291f2cdc16c8daa32e399b74d489dbb9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9535
Reviewed-on: https://webrtc-review.googlesource.com/102642
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24895}
2018-09-28 13:39:19 +00:00
Sam Zackrisson
2fbb83b16b Remove APM-internal usage of EchoControlMobile
This is a sibling CL to a similar one for EchoCancellation:
https://webrtc-review.googlesource.com/c/src/+/97603

 - EchoControlMobileImpl will no longer inherit EchoControlMobile.
 - Removes usage of AudioProcessing::echo_control_mobile() inside most of
   the audio processing module and unit tests.

The CL breaks audioproc_f backwards compatibility: It can no longer
use all recorded settings (comfort noise, routing mode), but prints an
error message when unsupported settings are encountered.

Tested: audioproc_f with .wav and aecdump inputs.
Bug: webrtc:9535
Change-Id: I63c3c81bcaf44021315978e1a0f3e42173b988ce
Reviewed-on: https://webrtc-review.googlesource.com/101621
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24888}
2018-09-28 11:11:44 +00:00
Alex Loiko
623472219f Store RuntimeSetting in Aec Dumps.
Also read and apply settings when parsing and replaying dumps.

The implementation contains
* an extra field in debug.proto for the runtime settings
* code in AudioProcessingImpl to initiate the logging of the RS to the
  AecDump
* code in aec_dump/ to log the RS in the AecDump
* code in test/ for re-playing the RS. E.g. for APM simulation with
  audioproc_f.

Bug: webrtc:9138
Change-Id: Ia2a00537c2eb19484ff442fbffd0b95f8495516f
Reviewed-on: https://webrtc-review.googlesource.com/70502
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24647}
2018-09-10 11:40:28 +00:00
Alessio Bazzica
cc22f51988 Removing the intelligibility enhancer.
The intelligibility enhancer is always disabled and it is the only non-test
target using the lapped transform in common_audio (which we planned to remove).

Bug: webrtc:9689, webrtc:5298
Change-Id: Ida65d3aa11ac366471e7e5cbc053108b376c67d8
Reviewed-on: https://webrtc-review.googlesource.com/96460
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24504}
2018-08-30 21:29:57 +00:00
Minyue Li
656d609a95 Add UTC time to init event in AEC debug dump.
Bug: webrtc:9616
Change-Id: I1350212f0b8835fb64427483269da96d51670c01
Reviewed-on: https://webrtc-review.googlesource.com/92620
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24267}
2018-08-11 20:29:07 +00:00
Alex Loiko
5feb30e85f Options and settings for the Pre-amplifier.
Add configuration fields for the pre-amplifier in the Audio Processing
Module. Also add flags and settings for the pre-amplifier in
audioproc_f.

Also make the setting stored in Aec Dumps. And make the setting
applied when playing back Aec Dumps in audioproc_f.

Bug: webrtc:9138
Change-Id: I4e59df200e1ebc56f06fae74ebf17d85858958a3
Reviewed-on: https://webrtc-review.googlesource.com/69560
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Alex Loiko <aleloi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22876}
2018-04-16 12:25:48 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/modules/audio_processing/debug.proto (Browse further)