Add support for audio recording source in generic audio policy mgr.

Update the platform-independent audio policy manager to pass the
 nature of the audio recording source to the audio policy client
 interface through the AudioPolicyClientInterface::setParameters()
 method.

Change-Id: I6b4fd0f8a3acea0d7d30bbad98edd1977dc012bf
This commit is contained in:
Jean-Michel Trivi
2010-11-09 14:06:52 -08:00
parent 62e2fa24cd
commit 1a22bdb01a
3 changed files with 7 additions and 5 deletions

View File

@@ -760,10 +760,8 @@ status_t AudioPolicyManagerBase::startInput(audio_io_handle_t input)
AudioParameter param = AudioParameter();
param.addInt(String8(AudioParameter::keyRouting), (int)inputDesc->mDevice);
// use Voice Recognition mode or not for this input based on input source
int vr_enabled = inputDesc->mInputSource == AUDIO_SOURCE_VOICE_RECOGNITION ? 1 : 0;
param.addInt(String8("vr_mode"), vr_enabled);
LOGV("AudioPolicyManager::startInput(%d), setting vr_mode to %d", inputDesc->mInputSource, vr_enabled);
param.addInt(String8(AudioParameter::keyInputSource), (int)inputDesc->mInputSource);
LOGV("AudioPolicyManager::startInput() input source = %d", inputDesc->mInputSource);
mpClientInterface->setParameters(input, param.toString());