Remove dependencies on hardware/audio_effects.h and EffectsFactoryApi.h
Also remove some outstanding dependencies on hardware/audio.h.
Most of the time, only constants and structs from audio_effects.h
are used, and no actual calls into HAL are made. Move these
definitions into system/audio_effect.h, and generate constants
from TREBLE HAL definition.
For parameters, always use values from AudioParameter class.
There are still some outstanding includes of hardware/audio.h
in code that directly deals with audio modules. Need to extend
libaudiohal interfaces to support required functionality.
Test: make
Change-Id: I0bcdf8ae199485d4d65f3eeb7e7a3b9b5cdb6ab6
diff --git a/services/audioflinger/PatchPanel.cpp b/services/audioflinger/PatchPanel.cpp
index c94ea45..93f634a 100644
--- a/services/audioflinger/PatchPanel.cpp
+++ b/services/audioflinger/PatchPanel.cpp
@@ -27,6 +27,8 @@
#include "ServiceUtilities.h"
#include <media/AudioParameter.h>
+#include <hardware/audio.h> // for AUDIO_DEVICE_API_VERSION_...
+
// ----------------------------------------------------------------------------
// Note: the following macro is used for extremely verbose logging message. In
@@ -387,7 +389,7 @@
}
if (thread == audioflinger->primaryPlaybackThread_l()) {
AudioParameter param = AudioParameter();
- param.addInt(String8(AUDIO_PARAMETER_STREAM_ROUTING), (int)type);
+ param.addInt(String8(AudioParameter::keyRouting), (int)type);
audioflinger->broacastParametersToRecordThreads_l(param.toString());
}