From 8895925e38d2521607fd2010f3f3b14ecd15962c Mon Sep 17 00:00:00 2001 From: Eric Laurent Date: Tue, 28 Aug 2012 14:26:53 -0700 Subject: 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 --- media/libeffects/preprocessing/PreProcessing.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'media/libeffects/preprocessing') 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(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; -- cgit v1.1