Enable HapticGenerator AIDL effect
- Add Haptic and Spatializer compatible check in AudioPolicyManager
- The generated haptic samples is expected to append to the end of input
buffer which needs special handling in both effect and libaudiohal
- Fix the haptic generator effect implementation wrong parameter and add
configuration with each init_params
- Add parameter logging in HapticGenerator AIDL effect
Bug: 330686268
Test: atest --test-mapping hardware/interfaces/audio/aidl/vts:presubmit
Test: atest CtsMediaAudioTestCases
Test: HapticGenerator debug app on Pixel AIDL audio hal
Change-Id: Ia292acc54276d3ae035682ca421dc7ab7d6cff73
Merged-In: Ia292acc54276d3ae035682ca421dc7ab7d6cff73
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 9c0176a..d24f90e 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -1486,8 +1486,8 @@
}
if (IAfEffectModule::isHapticGenerator(&desc->type) && mHapticChannelCount == 0) {
- ALOGW("%s: thread doesn't support haptic playback while the effect is HapticGenerator",
- __func__);
+ ALOGW("%s: thread (%s) doesn't support haptic playback while the effect is HapticGenerator",
+ __func__, threadTypeToString(mType));
return BAD_VALUE;
}