summaryrefslogtreecommitdiffstats
path: root/media/libeffects
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-08-28 14:26:53 -0700
committerEric Laurent <elaurent@google.com>2012-09-07 10:32:00 -0700
commit8895925e38d2521607fd2010f3f3b14ecd15962c (patch)
tree19c97b89d39488f3d60fdc64eb953cda601a6823 /media/libeffects
parent741b47db87db45dad47d115ffcc67553184ffbe3 (diff)
downloadframeworks_av-8895925e38d2521607fd2010f3f3b14ecd15962c.zip
frameworks_av-8895925e38d2521607fd2010f3f3b14ecd15962c.tar.gz
frameworks_av-8895925e38d2521607fd2010f3f3b14ecd15962c.tar.bz2
audioflinger: changes for new audio devices enums
The ThreadBase class now has a separate member for input and output devices (mInDevice, mOutDevice). Only query get_supported_devices() from audio HAL if the function is exposed and if the audio policy manager did not specify the audio module to open. Also fixed bug in AEC preprocessing that would reset to default output device when an input device was given. Change-Id: I19d4d06aeb920b068e3ef31e6e6be6345ce5d67a
Diffstat (limited to 'media/libeffects')
-rwxr-xr-xmedia/libeffects/preprocessing/PreProcessing.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/media/libeffects/preprocessing/PreProcessing.cpp b/media/libeffects/preprocessing/PreProcessing.cpp
index 5709837..597866a 100755
--- a/media/libeffects/preprocessing/PreProcessing.cpp
+++ b/media/libeffects/preprocessing/PreProcessing.cpp
@@ -517,6 +517,10 @@ int AecSetDevice(preproc_effect_t *effect, uint32_t device)
webrtc::EchoControlMobile *aec = static_cast<webrtc::EchoControlMobile *>(effect->engine);
webrtc::EchoControlMobile::RoutingMode mode = webrtc::EchoControlMobile::kQuietEarpieceOrHeadset;
+ if (audio_is_input_device(device)) {
+ return 0;
+ }
+
switch(device) {
case AUDIO_DEVICE_OUT_EARPIECE:
mode = webrtc::EchoControlMobile::kEarpiece;