audio: Parse module configurations from the APM XML files
The default implementation now loads the HAL configuration
from the legacy XML configuration file which was previously
consumed by the framework directly.
Note that errors in the config file will lead to crash
of the XML parser, pointing out to the source of the problem.
IMPORTANT NOTES:
- Never use untested legacy config files with production
devices.
- Make sure that all possible configurations (for example,
BT offload on/off) are tested.
Bug: 205884982
Test: atest VtsHalAudioCoreTargetTest
(cherry picked from commit 00a7307862f709651f3df7a763dbe2d421d200e8)
Change-Id: Id1002cb065e7cc19bdd520aca15b3fe5d39e5853
diff --git a/audio/aidl/default/Android.bp b/audio/aidl/default/Android.bp
index bb8d76f..9aa86b5 100644
--- a/audio/aidl/default/Android.bp
+++ b/audio/aidl/default/Android.bp
@@ -12,6 +12,7 @@
vendor: true,
shared_libs: [
"libalsautilsv2",
+ "libaudio_aidl_conversion_common_ndk",
"libaudioaidlcommon",
"libaudioutils",
"libbase",
@@ -19,6 +20,8 @@
"libcutils",
"libfmq",
"libnbaio_mono",
+ "liblog",
+ "libmedia_helper",
"libstagefright_foundation",
"libtinyalsav2",
"libutils",
@@ -31,6 +34,9 @@
"libaudioaidl_headers",
"libxsdc-utils",
],
+ cflags: [
+ "-DBACKEND_NDK",
+ ],
}
cc_library {
@@ -78,6 +84,7 @@
"Stream.cpp",
"StreamSwitcher.cpp",
"Telephony.cpp",
+ "XsdcConversion.cpp",
"alsa/Mixer.cpp",
"alsa/ModuleAlsa.cpp",
"alsa/StreamAlsa.cpp",
@@ -172,6 +179,7 @@
"libbase",
"libbinder_ndk",
"libcutils",
+ "libfmq",
"libmedia_helper",
"libstagefright_foundation",
"libutils",
@@ -184,9 +192,11 @@
],
generated_sources: [
"audio_policy_configuration_aidl_default",
+ "audio_policy_engine_configuration_aidl_default",
],
generated_headers: [
"audio_policy_configuration_aidl_default",
+ "audio_policy_engine_configuration_aidl_default",
],
srcs: [
"AudioPolicyConfigXmlConverter.cpp",