Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 493568e8 authored by Eric Laurent's avatar Eric Laurent Committed by Automerger Merge Worker
Browse files

Merge "audio: ble: volume computation improvement on BLE for notifications"...

Merge "audio: ble: volume computation improvement on BLE for notifications" into main am: 287bb121 am: 02ac77ae

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/3130638



Change-Id: I71277d86a217cb54b0c670b31ca4e158e1a28ea0
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 88cf130a 02ac77ae
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -8172,9 +8172,10 @@ float AudioPolicyManager::computeVolume(IVolumeCurves &curves,
            }
            if (Volume::getDeviceForVolume(deviceTypes) != AUDIO_DEVICE_OUT_SPEAKER
                    &&  !Intersection(deviceTypes, {AUDIO_DEVICE_OUT_BLUETOOTH_A2DP,
                        AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES}).empty()) {
                // on A2DP, also ensure notification volume is not too low compared to media when
                // intended to be played
                        AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES,
                        AUDIO_DEVICE_OUT_BLE_HEADSET}).empty()) {
                // on A2DP/BLE, also ensure notification volume is not too low compared to media
                // when intended to be played.
                if ((volumeDb > -96.0f) &&
                        (musicVolDb - SONIFICATION_A2DP_MAX_MEDIA_DIFF_DB > volumeDb)) {
                    ALOGV("%s increasing volume for volume source=%d device=%s from %f to %f",