1package { 2 default_team: "trendy_team_android_media_audio_framework", 3 // See: http://go/android-license-faq 4 // A large-scale-change added 'default_applicable_licenses' to import 5 // all of the 'license_kinds' from "hardware_interfaces_license" 6 // to get the below license kinds: 7 // SPDX-license-identifier-Apache-2.0 8 default_applicable_licenses: ["hardware_interfaces_license"], 9} 10 11cc_defaults { 12 name: "aidlaudioservice_defaults", 13 vendor: true, 14 shared_libs: [ 15 "libalsautilsv2", 16 "libaudio_aidl_conversion_common_ndk", 17 "libaudioaidlcommon", 18 "libaudioutils", 19 "libbase", 20 "libbinder_ndk", 21 "libcutils", 22 "libfmq", 23 "libnbaio_mono", 24 "liblog", 25 "libmedia_helper", 26 "libstagefright_foundation", 27 "libtinyalsav2", 28 "libutils", 29 "libxml2", 30 "android.hardware.common-V2-ndk", 31 "android.hardware.common.fmq-V1-ndk", 32 ], 33 header_libs: [ 34 "libaudio_system_headers", 35 "libaudioaidl_headers", 36 "libxsdc-utils", 37 ], 38 cflags: [ 39 "-DBACKEND_NDK", 40 ], 41} 42 43cc_library { 44 name: "libaudioserviceexampleimpl", 45 defaults: [ 46 "aidlaudioservice_defaults", 47 "latest_android_media_audio_common_types_ndk_shared", 48 "latest_android_hardware_audio_core_ndk_shared", 49 "latest_android_hardware_audio_core_sounddose_ndk_shared", 50 "latest_android_hardware_bluetooth_audio_ndk_shared", 51 ], 52 export_include_dirs: ["include"], 53 srcs: [ 54 "AidlConversionXsdc.cpp", 55 "AudioPolicyConfigXmlConverter.cpp", 56 "Bluetooth.cpp", 57 "Config.cpp", 58 "Configuration.cpp", 59 "EngineConfigXmlConverter.cpp", 60 "Module.cpp", 61 "ModulePrimary.cpp", 62 "SoundDose.cpp", 63 "Stream.cpp", 64 "StreamSwitcher.cpp", 65 "Telephony.cpp", 66 "XsdcConversion.cpp", 67 "alsa/Mixer.cpp", 68 "alsa/ModuleAlsa.cpp", 69 "alsa/StreamAlsa.cpp", 70 "alsa/Utils.cpp", 71 "bluetooth/DevicePortProxy.cpp", 72 "bluetooth/ModuleBluetooth.cpp", 73 "bluetooth/StreamBluetooth.cpp", 74 "primary/PrimaryMixer.cpp", 75 "primary/StreamPrimary.cpp", 76 "r_submix/ModuleRemoteSubmix.cpp", 77 "r_submix/SubmixRoute.cpp", 78 "r_submix/StreamRemoteSubmix.cpp", 79 "stub/ModuleStub.cpp", 80 "stub/StreamStub.cpp", 81 "usb/ModuleUsb.cpp", 82 "usb/StreamUsb.cpp", 83 "usb/UsbAlsaMixerControl.cpp", 84 ], 85 generated_sources: [ 86 "audio_policy_configuration_aidl_default", 87 "audio_policy_engine_configuration_aidl_default", 88 ], 89 generated_headers: [ 90 "audio_policy_configuration_aidl_default", 91 "audio_policy_engine_configuration_aidl_default", 92 ], 93 export_generated_headers: [ 94 "audio_policy_configuration_aidl_default", 95 "audio_policy_engine_configuration_aidl_default", 96 ], 97 shared_libs: [ 98 "android.hardware.bluetooth.audio-impl", 99 "libaudio_aidl_conversion_common_ndk", 100 "libaudioutils", 101 "libbluetooth_audio_session_aidl", 102 "liblog", 103 "libmedia_helper", 104 "libmediautils_vendor", 105 "libstagefright_foundation", 106 ], 107 export_shared_lib_headers: [ 108 "libaudio_aidl_conversion_common_ndk", 109 ], 110 cflags: [ 111 "-Wall", 112 "-Wextra", 113 "-Werror", 114 "-Wthread-safety", 115 "-DBACKEND_NDK", 116 ], 117} 118 119cc_binary { 120 name: "android.hardware.audio.service-aidl.example", 121 relative_install_path: "hw", 122 defaults: [ 123 "aidlaudioservice_defaults", 124 "latest_android_hardware_audio_core_sounddose_ndk_shared", 125 "latest_android_hardware_audio_core_ndk_shared", 126 "latest_android_hardware_bluetooth_audio_ndk_shared", 127 "latest_android_media_audio_common_types_ndk_shared", 128 ], 129 static_libs: [ 130 "libaudioserviceexampleimpl", 131 ], 132 shared_libs: [ 133 "android.hardware.bluetooth.audio-impl", 134 "libaudio_aidl_conversion_common_ndk", 135 "libbluetooth_audio_session_aidl", 136 "liblog", 137 "libmedia_helper", 138 "libstagefright_foundation", 139 ], 140 srcs: ["main.cpp"], 141 cflags: [ 142 "-Wall", 143 "-Wextra", 144 "-Werror", 145 "-Wthread-safety", 146 "-DBACKEND_NDK", 147 ], 148 installable: false, //installed in apex com.android.hardware.audio 149} 150 151cc_test { 152 name: "audio_policy_config_xml_converter_tests", 153 vendor_available: true, 154 defaults: [ 155 "latest_android_media_audio_common_types_ndk_static", 156 "latest_android_hardware_audio_core_ndk_static", 157 ], 158 shared_libs: [ 159 "libaudio_aidl_conversion_common_ndk", 160 "libaudioaidlcommon", 161 "libaudioutils", 162 "libbase", 163 "libbinder_ndk", 164 "libcutils", 165 "libfmq", 166 "libmedia_helper", 167 "libstagefright_foundation", 168 "libutils", 169 "libxml2", 170 ], 171 header_libs: [ 172 "libaudio_system_headers", 173 "libaudioaidl_headers", 174 "libxsdc-utils", 175 ], 176 generated_sources: [ 177 "audio_policy_configuration_aidl_default", 178 "audio_policy_engine_configuration_aidl_default", 179 ], 180 generated_headers: [ 181 "audio_policy_configuration_aidl_default", 182 "audio_policy_engine_configuration_aidl_default", 183 ], 184 srcs: [ 185 "AudioPolicyConfigXmlConverter.cpp", 186 "tests/AudioPolicyConfigXmlConverterTest.cpp", 187 ], 188 cflags: [ 189 "-Wall", 190 "-Wextra", 191 "-Werror", 192 "-Wthread-safety", 193 "-DBACKEND_NDK", 194 ], 195 test_suites: ["general-tests"], 196} 197 198cc_defaults { 199 name: "aidlaudioeffectservice_defaults", 200 defaults: [ 201 "latest_android_media_audio_common_types_ndk_shared", 202 "latest_android_hardware_audio_effect_ndk_shared", 203 ], 204 vendor: true, 205 shared_libs: [ 206 "libaudioaidlcommon", 207 "libaudioutils", 208 "libbase", 209 "libbinder_ndk", 210 "libcutils", 211 "libfmq", 212 "liblog", 213 "libutils", 214 "android.hardware.common-V2-ndk", 215 "android.hardware.common.fmq-V1-ndk", 216 ], 217 header_libs: [ 218 "libaudioaidl_headers", 219 "libaudio_system_headers", 220 "libsystem_headers", 221 ], 222 cflags: [ 223 "-Wall", 224 "-Wextra", 225 "-Werror", 226 "-Wthread-safety", 227 ], 228} 229 230filegroup { 231 name: "effectCommonFile", 232 srcs: [ 233 "EffectContext.cpp", 234 "EffectThread.cpp", 235 "EffectImpl.cpp", 236 ], 237} 238 239cc_binary { 240 name: "android.hardware.audio.effect.service-aidl.example", 241 relative_install_path: "hw", 242 defaults: ["aidlaudioeffectservice_defaults"], 243 shared_libs: [ 244 "libapexsupport", 245 "libtinyxml2", 246 ], 247 srcs: [ 248 "EffectConfig.cpp", 249 "EffectFactory.cpp", 250 "EffectMain.cpp", 251 ], 252 installable: false, //installed in apex com.android.hardware.audio 253} 254 255cc_library_headers { 256 name: "libaudioaidl_headers", 257 export_include_dirs: ["include"], 258 vendor_available: true, 259 host_supported: true, 260} 261 262prebuilt_etc { 263 name: "android.hardware.audio.service-aidl.example.rc", 264 src: "android.hardware.audio.service-aidl.example.rc", 265 installable: false, 266} 267 268prebuilt_etc { 269 name: "android.hardware.audio.service-aidl.xml", 270 src: "android.hardware.audio.service-aidl.xml", 271 sub_dir: "vintf", 272 installable: false, 273} 274