diff options
-rw-r--r-- | media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp index 6c2cbe3..3ddeb4e 100644 --- a/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp +++ b/media/libeffects/lvm/wrapper/Bundle/EffectBundle.cpp @@ -1236,10 +1236,12 @@ int VirtualizerForceVirtualizationMode(EffectContext *pContext, audio_devices_t bool useVirtualizer = false; if (VirtualizerIsDeviceSupported(forcedDevice) != 0) { - // forced device is not supported, make it behave as a reset of forced mode - forcedDevice = AUDIO_DEVICE_NONE; - // but return an error - status = -EINVAL; + if (forcedDevice != AUDIO_DEVICE_NONE) { + //forced device is not supported, make it behave as a reset of forced mode + forcedDevice = AUDIO_DEVICE_NONE; + // but return an error + status = -EINVAL; + } } if (forcedDevice == AUDIO_DEVICE_NONE) { |