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

Commit d6e7f1e1 authored by Ricardo Garcia's avatar Ricardo Garcia Committed by Android (Google) Code Review
Browse files

Merge "Fix for AOSP force virtualization mode" into lmp-mr1-dev

parents b65842dd 47d4c9a4
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -1236,11 +1236,13 @@ int VirtualizerForceVirtualizationMode(EffectContext *pContext, audio_devices_t
    bool useVirtualizer = false;
    bool useVirtualizer = false;


    if (VirtualizerIsDeviceSupported(forcedDevice) != 0) {
    if (VirtualizerIsDeviceSupported(forcedDevice) != 0) {
        if (forcedDevice != AUDIO_DEVICE_NONE) {
            //forced device is not supported, make it behave as a reset of forced mode
            //forced device is not supported, make it behave as a reset of forced mode
            forcedDevice = AUDIO_DEVICE_NONE;
            forcedDevice = AUDIO_DEVICE_NONE;
            // but return an error
            // but return an error
            status = -EINVAL;
            status = -EINVAL;
        }
        }
    }


    if (forcedDevice == AUDIO_DEVICE_NONE) {
    if (forcedDevice == AUDIO_DEVICE_NONE) {
        // disabling forced virtualization mode:
        // disabling forced virtualization mode: