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

Commit 5e74b8d6 authored by Eric Laurent's avatar Eric Laurent Committed by Automerger Merge Worker
Browse files

Merge "audio policy: fix volume for unsupported device" into rvc-dev am:...

Merge "audio policy: fix volume for unsupported device" into rvc-dev am: afee5576 am: e6ba3267 am: 60b470e6

Change-Id: I069f7e894ae0846f42bdee17d0b840222ccc2ef8
parents 2fdf02a1 60b470e6
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -152,10 +152,16 @@ bool AudioOutputDescriptor::isFixedVolume(const DeviceTypeSet& deviceTypes __unu
bool AudioOutputDescriptor::setVolume(float volumeDb,
                                      VolumeSource volumeSource,
                                      const StreamTypeVector &/*streams*/,
                                      const DeviceTypeSet& /*deviceTypes*/,
                                      const DeviceTypeSet& deviceTypes,
                                      uint32_t delayMs,
                                      bool force)
{

    if (!supportedDevices().containsDeviceAmongTypes(deviceTypes)) {
        ALOGV("%s output ID %d unsupported device %s",
                __func__, getId(), toString(deviceTypes).c_str());
        return false;
    }
    // We actually change the volume if:
    // - the float value returned by computeVolume() changed
    // - the force flag is set