Loading services/audiopolicy/enginedefault/src/Engine.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -266,7 +266,7 @@ audio_devices_t Engine::getDeviceForStrategyInt(routing_strategy strategy, break; case STRATEGY_SONIFICATION_RESPECTFUL: if (isInCall()) { if (isInCall() || outputs.isStreamActiveLocally(AUDIO_STREAM_VOICE_CALL)) { device = getDeviceForStrategyInt( STRATEGY_SONIFICATION, availableOutputDevices, availableInputDevices, outputs, outputDeviceTypesToIgnore); Loading Loading @@ -409,7 +409,7 @@ audio_devices_t Engine::getDeviceForStrategyInt(routing_strategy strategy, // If incall, just select the STRATEGY_PHONE device: The rest of the behavior is handled by // handleIncallSonification(). if (isInCall()) { if (isInCall() || outputs.isStreamActiveLocally(AUDIO_STREAM_VOICE_CALL)) { device = getDeviceForStrategyInt( STRATEGY_PHONE, availableOutputDevices, availableInputDevices, outputs, outputDeviceTypesToIgnore); Loading services/audiopolicy/managerdefault/AudioPolicyManager.cpp +7 −3 Original line number Diff line number Diff line Loading @@ -5117,7 +5117,8 @@ float AudioPolicyManager::computeVolume(audio_stream_type_t stream, } // in-call: always cap earpiece volume by voice volume + some low headroom if ((stream != AUDIO_STREAM_VOICE_CALL) && (device & AUDIO_DEVICE_OUT_EARPIECE) && isInCall()) { if ((stream != AUDIO_STREAM_VOICE_CALL) && (device & AUDIO_DEVICE_OUT_EARPIECE) && (isInCall() || mOutputs.isStreamActiveLocally(AUDIO_STREAM_VOICE_CALL))) { switch (stream) { case AUDIO_STREAM_SYSTEM: case AUDIO_STREAM_RING: Loading @@ -5127,7 +5128,10 @@ float AudioPolicyManager::computeVolume(audio_stream_type_t stream, case AUDIO_STREAM_ENFORCED_AUDIBLE: case AUDIO_STREAM_DTMF: case AUDIO_STREAM_ACCESSIBILITY: { const float maxVoiceVolDb = computeVolume(AUDIO_STREAM_VOICE_CALL, index, device) int voiceVolumeIndex = mVolumeCurves->getVolumeIndex(AUDIO_STREAM_VOICE_CALL, AUDIO_DEVICE_OUT_EARPIECE); const float maxVoiceVolDb = computeVolume(AUDIO_STREAM_VOICE_CALL, voiceVolumeIndex, AUDIO_DEVICE_OUT_EARPIECE) + IN_CALL_EARPIECE_HEADROOM_DB; if (volumeDB > maxVoiceVolDb) { ALOGV("computeVolume() stream %d at vol=%f overriden by stream %d at vol=%f", Loading Loading
services/audiopolicy/enginedefault/src/Engine.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -266,7 +266,7 @@ audio_devices_t Engine::getDeviceForStrategyInt(routing_strategy strategy, break; case STRATEGY_SONIFICATION_RESPECTFUL: if (isInCall()) { if (isInCall() || outputs.isStreamActiveLocally(AUDIO_STREAM_VOICE_CALL)) { device = getDeviceForStrategyInt( STRATEGY_SONIFICATION, availableOutputDevices, availableInputDevices, outputs, outputDeviceTypesToIgnore); Loading Loading @@ -409,7 +409,7 @@ audio_devices_t Engine::getDeviceForStrategyInt(routing_strategy strategy, // If incall, just select the STRATEGY_PHONE device: The rest of the behavior is handled by // handleIncallSonification(). if (isInCall()) { if (isInCall() || outputs.isStreamActiveLocally(AUDIO_STREAM_VOICE_CALL)) { device = getDeviceForStrategyInt( STRATEGY_PHONE, availableOutputDevices, availableInputDevices, outputs, outputDeviceTypesToIgnore); Loading
services/audiopolicy/managerdefault/AudioPolicyManager.cpp +7 −3 Original line number Diff line number Diff line Loading @@ -5117,7 +5117,8 @@ float AudioPolicyManager::computeVolume(audio_stream_type_t stream, } // in-call: always cap earpiece volume by voice volume + some low headroom if ((stream != AUDIO_STREAM_VOICE_CALL) && (device & AUDIO_DEVICE_OUT_EARPIECE) && isInCall()) { if ((stream != AUDIO_STREAM_VOICE_CALL) && (device & AUDIO_DEVICE_OUT_EARPIECE) && (isInCall() || mOutputs.isStreamActiveLocally(AUDIO_STREAM_VOICE_CALL))) { switch (stream) { case AUDIO_STREAM_SYSTEM: case AUDIO_STREAM_RING: Loading @@ -5127,7 +5128,10 @@ float AudioPolicyManager::computeVolume(audio_stream_type_t stream, case AUDIO_STREAM_ENFORCED_AUDIBLE: case AUDIO_STREAM_DTMF: case AUDIO_STREAM_ACCESSIBILITY: { const float maxVoiceVolDb = computeVolume(AUDIO_STREAM_VOICE_CALL, index, device) int voiceVolumeIndex = mVolumeCurves->getVolumeIndex(AUDIO_STREAM_VOICE_CALL, AUDIO_DEVICE_OUT_EARPIECE); const float maxVoiceVolDb = computeVolume(AUDIO_STREAM_VOICE_CALL, voiceVolumeIndex, AUDIO_DEVICE_OUT_EARPIECE) + IN_CALL_EARPIECE_HEADROOM_DB; if (volumeDB > maxVoiceVolDb) { ALOGV("computeVolume() stream %d at vol=%f overriden by stream %d at vol=%f", Loading