Loading services/audiopolicy/managerdefault/AudioPolicyManager.cpp +4 −3 Original line number Original line Diff line number Diff line Loading @@ -7862,9 +7862,10 @@ float AudioPolicyManager::computeVolume(IVolumeCurves &curves, } } if (Volume::getDeviceForVolume(deviceTypes) != AUDIO_DEVICE_OUT_SPEAKER if (Volume::getDeviceForVolume(deviceTypes) != AUDIO_DEVICE_OUT_SPEAKER && !Intersection(deviceTypes, {AUDIO_DEVICE_OUT_BLUETOOTH_A2DP, && !Intersection(deviceTypes, {AUDIO_DEVICE_OUT_BLUETOOTH_A2DP, AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES}).empty()) { AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES, // on A2DP, also ensure notification volume is not too low compared to media when AUDIO_DEVICE_OUT_BLE_HEADSET}).empty()) { // intended to be played // on A2DP/BLE, also ensure notification volume is not too low compared to media // when intended to be played. if ((volumeDb > -96.0f) && if ((volumeDb > -96.0f) && (musicVolDb - SONIFICATION_A2DP_MAX_MEDIA_DIFF_DB > volumeDb)) { (musicVolDb - SONIFICATION_A2DP_MAX_MEDIA_DIFF_DB > volumeDb)) { ALOGV("%s increasing volume for volume source=%d device=%s from %f to %f", ALOGV("%s increasing volume for volume source=%d device=%s from %f to %f", Loading Loading
services/audiopolicy/managerdefault/AudioPolicyManager.cpp +4 −3 Original line number Original line Diff line number Diff line Loading @@ -7862,9 +7862,10 @@ float AudioPolicyManager::computeVolume(IVolumeCurves &curves, } } if (Volume::getDeviceForVolume(deviceTypes) != AUDIO_DEVICE_OUT_SPEAKER if (Volume::getDeviceForVolume(deviceTypes) != AUDIO_DEVICE_OUT_SPEAKER && !Intersection(deviceTypes, {AUDIO_DEVICE_OUT_BLUETOOTH_A2DP, && !Intersection(deviceTypes, {AUDIO_DEVICE_OUT_BLUETOOTH_A2DP, AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES}).empty()) { AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES, // on A2DP, also ensure notification volume is not too low compared to media when AUDIO_DEVICE_OUT_BLE_HEADSET}).empty()) { // intended to be played // on A2DP/BLE, also ensure notification volume is not too low compared to media // when intended to be played. if ((volumeDb > -96.0f) && if ((volumeDb > -96.0f) && (musicVolDb - SONIFICATION_A2DP_MAX_MEDIA_DIFF_DB > volumeDb)) { (musicVolDb - SONIFICATION_A2DP_MAX_MEDIA_DIFF_DB > volumeDb)) { ALOGV("%s increasing volume for volume source=%d device=%s from %f to %f", ALOGV("%s increasing volume for volume source=%d device=%s from %f to %f", Loading