diff options
author | jpadmana <jayashree.r.padmanaban@intel.com> | 2013-11-14 17:20:52 +0530 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2014-01-31 00:58:44 +0000 |
commit | f90c7e0bb8d83d8b7f733bdf430d331ea3f221e8 (patch) | |
tree | f2e5372c4876aad1901b54cc98d988cbee387549 /media/libeffects/proxy/EffectProxy.h | |
parent | b447379e2ea1c9ca4cd543ac183df70567d40485 (diff) | |
download | frameworks_av-f90c7e0bb8d83d8b7f733bdf430d331ea3f221e8.zip frameworks_av-f90c7e0bb8d83d8b7f733bdf430d331ea3f221e8.tar.gz frameworks_av-f90c7e0bb8d83d8b7f733bdf430d331ea3f221e8.tar.bz2 |
fix deadlock issues that arise when there are simultaneous
effect control interface calls to proxy and to
non sub-effect wrappers(eg., bundlewrapper) from audioflinger
Also, return NO_ERROR when CMD_OFFLOAD succeeds
Whenever there are parallel calls to proxy and non sub-effects wrappers,
some of the calls are not completed. This is due to deadlock arsing out
of Proxy waiting for the subeffect call to return and subeffect waiting
for proxy to release lock.
The call flow is changed to a cleaner and simple one - Proxy gets the
aeli(effect library info) of subeffects during the EffectGetSubEffects()
call. Therby, proxy will manage the sub effects by itself rather than
going through effects factory.
Signed-off-by: jpadmana <jayashree.r.padmanaban@intel.com>
Bug: 12424044
Change-Id: I16852222f1d0e94e433a19177729323a4bb1c090
Diffstat (limited to 'media/libeffects/proxy/EffectProxy.h')
-rw-r--r-- | media/libeffects/proxy/EffectProxy.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/media/libeffects/proxy/EffectProxy.h b/media/libeffects/proxy/EffectProxy.h index acbe17e..046b93e 100644 --- a/media/libeffects/proxy/EffectProxy.h +++ b/media/libeffects/proxy/EffectProxy.h @@ -16,6 +16,8 @@ #include <hardware/audio.h> #include <hardware/audio_effect.h> +#include "EffectsFactory.h" + namespace android { enum { SUB_FX_HOST, // Index of HOST in the descriptor and handle arrays @@ -62,7 +64,9 @@ const struct effect_interface_s gEffectInterface = { struct EffectContext { const struct effect_interface_s *common_itfe; // Holds the itfe of the Proxy + sub_effect_entry_t** sube; // Points to the sub effects effect_descriptor_t* desc; // Points to the sub effect descriptors + audio_effect_library_t** aeli; // Points to the sub effect aeli effect_handle_t eHandle[SUB_FX_COUNT]; // The effect handles of the sub effects int index; // The index that is currently active - HOST or OFFLOAD int32_t sessionId; // The sessiond in which the effect is created. |