diff options
author | Ricardo Garcia <rago@google.com> | 2014-12-04 17:47:19 -0800 |
---|---|---|
committer | Ricardo Garcia <rago@google.com> | 2014-12-04 17:47:19 -0800 |
commit | 47d4c9a4d53ed014b520edbda2edc3e280efb8a5 (patch) | |
tree | 5970b2b39c01cb5deb5d98c6b88db0202500dfe8 /media | |
parent | f1828910d48bbd22e1392e6ab0ce31298d1f115c (diff) | |
download | frameworks_av-47d4c9a4d53ed014b520edbda2edc3e280efb8a5.zip frameworks_av-47d4c9a4d53ed014b520edbda2edc3e280efb8a5.tar.gz frameworks_av-47d4c9a4d53ed014b520edbda2edc3e280efb8a5.tar.bz2 |
Fix for AOSP force virtualization mode
Forcing virtualization mode with AOSP code might erroneously return
a failed code, whilst it was correct. Fixing the condition for
Automatic mode.
bug: 18538537
Change-Id: I5837ff40cfed04c99889813cd56ebe3d90793e74
Diffstat (limited to 'media')
-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) { |