AudioFlinger: forward active tracks channel mask to spatializer effect
Partial implementation of track metadata forwarding to effects.
Currently limited to spatializer effect and track channel masks.
Bug: 303920722
Test: atest AudioEffectTest
Test: atest atest android.media.audio.cts.SpatializerTest
Change-Id: Iaaa947f12946d6f87dffb3993612d58f0400e6c5
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index f8960cf..aafe3cd 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -4144,7 +4144,7 @@
}
// Only audio policy service can create a spatializer effect
- if ((memcmp(&descOut.type, FX_IID_SPATIALIZER, sizeof(effect_uuid_t)) == 0) &&
+ if (IAfEffectModule::isSpatializer(&descOut.type) &&
(callingUid != AID_AUDIOSERVER || currentPid != getpid())) {
ALOGW("%s: attempt to create a spatializer effect from uid/pid %d/%d",
__func__, callingUid, currentPid);