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

Commit 02ac77ae 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

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



Change-Id: Id5ad27834f5007a3b955b979062f4961c82e0e41
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 60a3c31e 287bb121
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -7945,9 +7945,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",