summaryrefslogtreecommitdiffstats
path: root/services/audiopolicy/service/AudioPolicyEffects.h
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-03-07 03:43:14 -0800
committerSteve Kondik <shade@chemlab.org>2016-03-08 17:34:54 -0800
commit47f8c7303c9e2054f1492b02b6c7472385c52dc9 (patch)
tree99179985590f64d6c01051365deaa59552d1d582 /services/audiopolicy/service/AudioPolicyEffects.h
parent0479d7c79a7fd6f112e8dc7e45c009cf6602dbaa (diff)
downloadframeworks_av-47f8c7303c9e2054f1492b02b6c7472385c52dc9.zip
frameworks_av-47f8c7303c9e2054f1492b02b6c7472385c52dc9.tar.gz
frameworks_av-47f8c7303c9e2054f1492b02b6c7472385c52dc9.tar.bz2
audiopolicy: Defer release of output session effects
* Some effects modules are racy and don't tolerate being destroyed and immediately resurrected on the same session. This is the common case when switching tracks, and the use of default output effects makes the problem even worse. Certain apps which handle gapless in a sloppy way are also to blame. * Instead of immediately nuking the entire descriptor with the stream, just decrease the refcount and defer it for 10 seconds. If it needs resurrected, the refcount will be increased and the delayed release command will not shoot it in the face. Change-Id: I068dd72c4180023a74eb9ccbe8a180f6f0683dbf
Diffstat (limited to 'services/audiopolicy/service/AudioPolicyEffects.h')
-rw-r--r--services/audiopolicy/service/AudioPolicyEffects.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/services/audiopolicy/service/AudioPolicyEffects.h b/services/audiopolicy/service/AudioPolicyEffects.h
index 2023784..7988515 100644
--- a/services/audiopolicy/service/AudioPolicyEffects.h
+++ b/services/audiopolicy/service/AudioPolicyEffects.h
@@ -86,6 +86,12 @@ public:
audio_stream_type_t stream,
int audioSession);
+ // For deferred release
+ status_t doReleaseOutputSessionEffects(audio_io_handle_t output,
+ audio_stream_type_t stream,
+ int audioSession);
+
+
private:
// class to store the description of an effects and its parameters