diff options
author | Eric Laurent <elaurent@google.com> | 2010-11-02 12:03:04 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2010-11-02 18:18:13 -0700 |
commit | 2f2db765228f110b37a2851d1199d3c72d313c6d (patch) | |
tree | 388bff64fa78ea4246f714f198fd6a4582912e3b /include | |
parent | d6e68c3ae5677bc6127628d1c700b11c8f0fcdaf (diff) | |
download | hardware_libhardware_legacy-2f2db765228f110b37a2851d1199d3c72d313c6d.zip hardware_libhardware_legacy-2f2db765228f110b37a2851d1199d3c72d313c6d.tar.gz hardware_libhardware_legacy-2f2db765228f110b37a2851d1199d3c72d313c6d.tar.bz2 |
Fix issue 3142808.
There is a bug in the way audio policy manager handles A2DP interface suspend/restore
when SCO is used. This bug is not new but has been triggered by a change in the timing
of the events received by audio policy manager when a call is setup and torn down
introduced by commit 164a8f86c7e48992691368c4895709c3bdb835a4.
The fix consists in grouping the control of A2DP suspended state in a single function
that is called systematically when conditions affecting this state are changed:
- call state change
- device connection/disconnection
- change in forced usage.
Change-Id: Ib76a999513b5afbfd59ba945f8650d2a48d6f480
Diffstat (limited to 'include')
-rw-r--r-- | include/hardware_legacy/AudioPolicyManagerBase.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/hardware_legacy/AudioPolicyManagerBase.h b/include/hardware_legacy/AudioPolicyManagerBase.h index ebeca55..51dc684 100644 --- a/include/hardware_legacy/AudioPolicyManagerBase.h +++ b/include/hardware_legacy/AudioPolicyManagerBase.h @@ -252,7 +252,8 @@ protected: void checkOutputForStrategy(routing_strategy strategy); // Same as checkOutputForStrategy() but for a all strategies in order of priority void checkOutputForAllStrategies(); - + // manages A2DP output suspend/restore according to phone state and BT SCO usage + void checkA2dpSuspend(); #endif // selects the most appropriate device on output for current state // must be called every time a condition that affects the device choice for a given output is @@ -309,6 +310,7 @@ protected: uint32_t mTotalEffectsCpuLoad; // current CPU load used by effects uint32_t mTotalEffectsMemory; // current memory used by effects KeyedVector<int, EffectDescriptor *> mEffects; // list of registered audio effects + bool mA2dpSuspended; // true if A2DP output is suspended #ifdef AUDIO_POLICY_TEST Mutex mLock; |