diff options
author | Vincent Becker <vincentx.becker@intel.com> | 2012-09-03 14:29:57 +0800 |
---|---|---|
committer | Robert Beatty <robert.m.beatty@intel.com> | 2014-07-16 17:45:43 -0700 |
commit | 31de680d5649ffc9568172b3904dccd3580d71ae (patch) | |
tree | bb67056a1ae74202c5653c73766e8b9b1cc37f7a /include/hardware_legacy/AudioPolicyManagerBase.h | |
parent | 4248e7c3cc06244b9d80a470e65dc95f862fccfa (diff) | |
download | hardware_libhardware_legacy-31de680d5649ffc9568172b3904dccd3580d71ae.zip hardware_libhardware_legacy-31de680d5649ffc9568172b3904dccd3580d71ae.tar.gz hardware_libhardware_legacy-31de680d5649ffc9568172b3904dccd3580d71ae.tar.bz2 |
audio: add mechanism to re-route nullified audio
Fixes a race condition whereby two requests attempt to change the audio stream
(and interrupt each other). For example, a user space app makes a call through
the audio API and before completion, a kernel function such as jack removal is
detected and is serviced. In this case, you have a nullified audio route that
needs to be re-routed.
In order to know a routing update is needed, a boolean member mForceRouting
has been introduced to enforce routing for the next attempt to set audio output
with a non-null device.
Change-Id: Ia0aa2f27fe63c39f0980dec2e1e79dbc26b81e56
Author: Vincent Becker <vincentx.becker@intel.com>
Signed-off-by: Vincent Becker <vincentx.becker@intel.com>
Signed-off-by: Zhi Jin <zhi.jin@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Signed-off-by: Robert Beatty <robert.m.beatty@intel.com>
Diffstat (limited to 'include/hardware_legacy/AudioPolicyManagerBase.h')
-rw-r--r-- | include/hardware_legacy/AudioPolicyManagerBase.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hardware_legacy/AudioPolicyManagerBase.h b/include/hardware_legacy/AudioPolicyManagerBase.h index 8343f2b..4244e0f 100644 --- a/include/hardware_legacy/AudioPolicyManagerBase.h +++ b/include/hardware_legacy/AudioPolicyManagerBase.h @@ -286,6 +286,7 @@ protected: bool mStrategyMutedByDevice[NUM_STRATEGIES]; // strategies muted because of incompatible // device selection. See checkDeviceMuteStrategies() uint32_t mDirectOpenCount; // number of clients using this output (direct outputs only) + bool mForceRouting; // Next routing for this output will be forced as current device routed is null }; // descriptor for audio inputs. Used to maintain current configuration of each opened audio input |