summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-08-29 18:29:36 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-29 18:29:37 +0000
commit9a63396f70880772e551e1e4c38f27c635612083 (patch)
tree06cb1bc892ad47fc1219594b6b9fb179a048676d /services
parent7fa4207870344d6773b077d13e08267986801f18 (diff)
parent1c9c2cc4b170b79a83433749808e286eb0fcc449 (diff)
downloadframeworks_av-9a63396f70880772e551e1e4c38f27c635612083.zip
frameworks_av-9a63396f70880772e551e1e4c38f27c635612083.tar.gz
frameworks_av-9a63396f70880772e551e1e4c38f27c635612083.tar.bz2
Merge "audio policy: fix input source passed to openInput()" into lmp-dev
Diffstat (limited to 'services')
-rw-r--r--services/audiopolicy/AudioPolicyManager.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp
index f65e136..a805923 100644
--- a/services/audiopolicy/AudioPolicyManager.cpp
+++ b/services/audiopolicy/AudioPolicyManager.cpp
@@ -1297,21 +1297,23 @@ audio_io_handle_t AudioPolicyManager::getInput(audio_source_t inputSource,
audio_io_handle_t input = AUDIO_IO_HANDLE_NONE;
bool isSoundTrigger = false;
+ audio_source_t halInputSource = inputSource;
if (inputSource == AUDIO_SOURCE_HOTWORD) {
ssize_t index = mSoundTriggerSessions.indexOfKey(session);
if (index >= 0) {
input = mSoundTriggerSessions.valueFor(session);
isSoundTrigger = true;
ALOGV("SoundTrigger capture on session %d input %d", session, input);
+ } else {
+ halInputSource = AUDIO_SOURCE_VOICE_RECOGNITION;
}
}
-
status_t status = mpClientInterface->openInput(profile->mModule->mHandle,
&input,
&config,
&device,
String8(""),
- inputSource,
+ halInputSource,
flags);
// only accept input with the exact requested set of parameters