diff options
author | Eric Laurent <elaurent@google.com> | 2011-03-29 18:22:57 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2011-03-29 18:44:03 -0700 |
commit | d7a724e6d89420408200c20937baa3b2bd902742 (patch) | |
tree | 814c39640271aeb36e7c39060bee6fb5c9e8f7e3 /voip/jni/rtp/AudioGroup.cpp | |
parent | 87805ca3a477e165891baa18efe5239a70d11bc9 (diff) | |
download | frameworks_base-d7a724e6d89420408200c20937baa3b2bd902742.zip frameworks_base-d7a724e6d89420408200c20937baa3b2bd902742.tar.gz frameworks_base-d7a724e6d89420408200c20937baa3b2bd902742.tar.bz2 |
Issue 4157048: mic gain for VoIP/SIP calls.
Herring board exhibits a strong echo even in non speakerphone modes.
To compensate the lack of AEC or AES when not in speakerphone, the mic gain
had been reduced in the ADC. But this has an adverse effect on other VoIP applications
that have their own AEC and are penalized by the weak mic gain.
This workaround enables an acceptable mic gain for other VoIP apps while offering a
SIP call experience which is not worse than it was with the residual echo that was
present even with mic gain reduction.
Change-Id: I33fd37858758e94e42ef5b545d3f0dc233220bf1
Diffstat (limited to 'voip/jni/rtp/AudioGroup.cpp')
-rw-r--r-- | voip/jni/rtp/AudioGroup.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/voip/jni/rtp/AudioGroup.cpp b/voip/jni/rtp/AudioGroup.cpp index 2cbd023..ae071ce 100644 --- a/voip/jni/rtp/AudioGroup.cpp +++ b/voip/jni/rtp/AudioGroup.cpp @@ -30,6 +30,7 @@ #define LOG_TAG "AudioGroup" #include <cutils/atomic.h> +#include <cutils/properties.h> #include <utils/Log.h> #include <utils/Errors.h> #include <utils/RefBase.h> @@ -619,6 +620,14 @@ bool AudioGroup::setMode(int mode) if (mode < 0 || mode > LAST_MODE) { return false; } + //FIXME: temporary code to overcome echo and mic gain issues on herring board. + // Must be modified/removed when proper support for voice processing query and control + // is included in audio framework + char value[PROPERTY_VALUE_MAX]; + property_get("ro.product.board", value, ""); + if (mode == NORMAL && !strcmp(value, "herring")) { + mode = ECHO_SUPPRESSION; + } if (mode == ECHO_SUPPRESSION && AudioSystem::getParameters( 0, String8("ec_supported")) == "ec_supported=yes") { mode = NORMAL; |