diff options
Diffstat (limited to 'services/audiopolicy/enginedefault/src/Engine.cpp')
-rwxr-xr-x | services/audiopolicy/enginedefault/src/Engine.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/services/audiopolicy/enginedefault/src/Engine.cpp b/services/audiopolicy/enginedefault/src/Engine.cpp index 1fd3341..50f1609 100755 --- a/services/audiopolicy/enginedefault/src/Engine.cpp +++ b/services/audiopolicy/enginedefault/src/Engine.cpp @@ -63,13 +63,14 @@ status_t Engine::initCheck() return (mApmObserver != NULL) ? NO_ERROR : NO_INIT; } -float Engine::volIndexToAmpl(Volume::device_category category, audio_stream_type_t streamType, +float Engine::volIndexToDb(Volume::device_category category, audio_stream_type_t streamType, int indexInUi) { const StreamDescriptor &streamDesc = mApmObserver->getStreamDescriptors().valueAt(streamType); - return Gains::volIndexToAmpl(category, streamDesc, indexInUi); + return Gains::volIndexToDb(category, streamDesc, indexInUi); } + status_t Engine::initStreamVolume(audio_stream_type_t stream, int indexMin, int indexMax) { ALOGV("initStreamVolume() stream %d, min %d, max %d", stream , indexMin, indexMax); @@ -243,7 +244,7 @@ routing_strategy Engine::getStrategyForStream(audio_stream_type_t stream) routing_strategy Engine::getStrategyForUsage(audio_usage_t usage) { - const AudioOutputCollection &outputs = mApmObserver->getOutputs(); + const SwAudioOutputCollection &outputs = mApmObserver->getOutputs(); // usage to strategy mapping switch (usage) { @@ -291,7 +292,7 @@ audio_devices_t Engine::getDeviceForStrategy(routing_strategy strategy) const const DeviceVector &availableOutputDevices = mApmObserver->getAvailableOutputDevices(); const DeviceVector &availableInputDevices = mApmObserver->getAvailableInputDevices(); - const AudioOutputCollection &outputs = mApmObserver->getOutputs(); + const SwAudioOutputCollection &outputs = mApmObserver->getOutputs(); uint32_t device = AUDIO_DEVICE_NONE; uint32_t availableOutputDevicesType = availableOutputDevices.types(); @@ -358,7 +359,7 @@ audio_devices_t Engine::getDeviceForStrategy(routing_strategy strategy) const if (((availableInputDevices.types() & AUDIO_DEVICE_IN_TELEPHONY_RX & ~AUDIO_DEVICE_BIT_IN) == 0) || (((txDevice & availPrimaryInputDevices & ~AUDIO_DEVICE_BIT_IN) != 0) && - (primaryOutput->getAudioPort()->mModule->mHalVersion < + (primaryOutput->getAudioPort()->getModuleVersion() < AUDIO_DEVICE_API_VERSION_3_0))) { availableOutputDevicesType = availPrimaryOutputDevices; } @@ -582,7 +583,7 @@ audio_devices_t Engine::getDeviceForInputSource(audio_source_t inputSource) cons { const DeviceVector &availableOutputDevices = mApmObserver->getAvailableOutputDevices(); const DeviceVector &availableInputDevices = mApmObserver->getAvailableInputDevices(); - const AudioOutputCollection &outputs = mApmObserver->getOutputs(); + const SwAudioOutputCollection &outputs = mApmObserver->getOutputs(); audio_devices_t availableDeviceTypes = availableInputDevices.types() & ~AUDIO_DEVICE_BIT_IN; uint32_t device = AUDIO_DEVICE_NONE; |