diff options
author | Eric Laurent <elaurent@google.com> | 2014-08-28 19:37:25 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2014-08-28 19:37:25 -0700 |
commit | 1c9c2cc4b170b79a83433749808e286eb0fcc449 (patch) | |
tree | 806b0c03d38c4d68c1571e2bf6def83431957fc9 /services | |
parent | 890a5637b3e3eb197fd2c7f5deec816c7feb13fc (diff) | |
download | frameworks_av-1c9c2cc4b170b79a83433749808e286eb0fcc449.zip frameworks_av-1c9c2cc4b170b79a83433749808e286eb0fcc449.tar.gz frameworks_av-1c9c2cc4b170b79a83433749808e286eb0fcc449.tar.bz2 |
audio policy: fix input source passed to openInput()
The input source passed to openInput() must be
modified from HOTWORD to VOICE_RECOGNITION if the capture does not
correspond to a sound trigger session.
Bug: 16731718.
Change-Id: I48aa4180e75dd5335cd096b48da1c15f2236e6ed
Diffstat (limited to 'services')
-rw-r--r-- | services/audiopolicy/AudioPolicyManager.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp index 06dd22c..3c1400d 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 |