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

Commit 9ef6889c authored by Vlad Popa's avatar Vlad Popa
Browse files

CSD: Remove a2dp for safe volume index devices

Currently there is no good way to identify whether an a2dp device is a
bluetooth headphone for which the sound dose calculation can be applied
or just a bluetooth speaker (e.g.: car kit). Disabling the CSD
calculation for a2dp for now until we have a good solution for this use
case.

Test: dumpsys audio, audio_flinger
Bug: 276660720
Change-Id: Iaced9137481ff82eaa51ef60e351371195d04a38
parent 580eb729
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -303,8 +303,9 @@ public class SoundDoseHelper {
                SAFE_MEDIA_VOLUME_UNINITIALIZED);
        mSafeMediaVolumeDevices.append(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES,
                SAFE_MEDIA_VOLUME_UNINITIALIZED);
        mSafeMediaVolumeDevices.append(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,
                SAFE_MEDIA_VOLUME_UNINITIALIZED);
        // TODO(b/278265907): enable A2DP when we can distinguish A2DP headsets
        // mSafeMediaVolumeDevices.append(AudioSystem.DEVICE_OUT_BLUETOOTH_A2DP,
        //        SAFE_MEDIA_VOLUME_UNINITIALIZED);
    }

    float getOutputRs2UpperBound() {