audio policy: update spatializer policy
Modify the rules to open and close the spatializer output
to address more scenarios:
- more than one spatializer output profile available
- some devices only reachable via a spatializer output profile
The spatializer outputs are opened and closed like other outputs
and a logic evaluates the best output when getSpatializerOutput()
is called
Bug: 188502620
Test: make
Change-Id: Id336e5c38a398525b3fab406cedce8a010d6c854
diff --git a/services/audioflinger/Threads.h b/services/audioflinger/Threads.h
index 58864e7..0e86391 100644
--- a/services/audioflinger/Threads.h
+++ b/services/audioflinger/Threads.h
@@ -1122,6 +1122,11 @@
// for any processing (including output processing).
bool mEffectBufferValid;
+ // Frame size aligned buffer used to convert mEffectBuffer samples to mSinkBuffer format prior
+ // to accumulate into mSinkBuffer on SPATIALIZER threads
+ void* mEffectToSinkBuffer = nullptr;
+
+
// suspend count, > 0 means suspended. While suspended, the thread continues to pull from
// tracks and mix, but doesn't write to HAL. A2DP and SCO HAL implementations can't handle
// concurrent use of both of them, so Audio Policy Service suspends one of the threads to