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
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 @@
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;