1package { 2 // See: http://go/android-license-faq 3 // A large-scale-change added 'default_applicable_licenses' to import 4 // all of the 'license_kinds' from "hardware_interfaces_license" 5 // to get the below license kinds: 6 // SPDX-license-identifier-Apache-2.0 7 default_applicable_licenses: ["hardware_interfaces_license"], 8} 9 10cc_library_shared { 11 name: "libbluetooth_audio_session", 12 defaults: ["hidl_defaults"], 13 vendor: true, 14 srcs: [ 15 "session/BluetoothAudioSession.cpp", 16 "session/BluetoothAudioSession_2_1.cpp", 17 "session/BluetoothAudioSupportedCodecsDB.cpp", 18 "session/BluetoothAudioSupportedCodecsDB_2_1.cpp", 19 ], 20 export_include_dirs: ["session/"], 21 header_libs: ["libhardware_headers"], 22 shared_libs: [ 23 "android.hardware.audio.common@5.0", 24 "android.hardware.bluetooth.audio@2.0", 25 "android.hardware.bluetooth.audio@2.1", 26 "libbase", 27 "libcutils", 28 "libfmq", 29 "libhidlbase", 30 "liblog", 31 "libutils", 32 "libbluetooth_audio_session_aidl", 33 ], 34} 35 36cc_library_shared { 37 name: "libbluetooth_audio_session_aidl", 38 vendor: true, 39 host_supported: true, 40 srcs: [ 41 "aidl_session/BluetoothAudioCodecs.cpp", 42 "aidl_session/BluetoothAudioSession.cpp", 43 "aidl_session/HidlToAidlMiddleware.cpp", 44 "aidl_session/BluetoothLeAudioCodecsProvider.cpp", 45 "aidl_session/BluetoothHfpCodecsProvider.cpp", 46 "aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.cpp", 47 ], 48 export_include_dirs: ["aidl_session/"], 49 header_libs: [ 50 "libhardware_headers", 51 "libxsdc-utils", 52 ], 53 defaults: [ 54 "aconfig_lib_cc_static_link.defaults", 55 "latest_android_hardware_bluetooth_audio_ndk_shared", 56 ], 57 shared_libs: [ 58 "android.hardware.bluetooth.audio@2.0", 59 "android.hardware.bluetooth.audio@2.1", 60 "libbase", 61 "libcutils", 62 "libbinder_ndk", 63 "libfmq", 64 "liblog", 65 "libhidlbase", 66 "libxml2", 67 "libflatbuffers-cpp", 68 "server_configurable_flags", 69 ], 70 static_libs: [ 71 "btaudiohal_flags_c_lib", 72 ], 73 generated_sources: [ 74 "le_audio_codec_capabilities", 75 "hfp_codec_capabilities", 76 ], 77 generated_headers: [ 78 "le_audio_codec_capabilities", 79 "hfp_codec_capabilities", 80 "AIDLLeAudioSetConfigSchemas_h", 81 ], 82 required: [ 83 "aidl_audio_set_configurations_bfbs", 84 "aidl_audio_set_configurations_json", 85 "aidl_audio_set_scenarios_bfbs", 86 "aidl_audio_set_scenarios_json", 87 "hfp_codec_capabilities_xml", 88 ], 89} 90 91cc_test { 92 name: "BluetoothLeAudioCodecsProviderTest", 93 defaults: [ 94 "latest_android_hardware_bluetooth_audio_ndk_shared", 95 ], 96 srcs: [ 97 "aidl_session/BluetoothLeAudioCodecsProvider.cpp", 98 "aidl_session/BluetoothLeAudioCodecsProviderTest.cpp", 99 ], 100 header_libs: [ 101 "libxsdc-utils", 102 ], 103 shared_libs: [ 104 "libbase", 105 "libbinder_ndk", 106 "libxml2", 107 ], 108 test_suites: [ 109 "general-tests", 110 ], 111 test_options: { 112 unit_test: false, 113 }, 114 generated_sources: ["le_audio_codec_capabilities"], 115 generated_headers: ["le_audio_codec_capabilities"], 116} 117 118cc_test { 119 name: "BluetoothHfpCodecsProviderTest", 120 defaults: [ 121 "latest_android_hardware_audio_common_ndk_static", 122 "latest_android_hardware_bluetooth_audio_ndk_static", 123 "latest_android_media_audio_common_types_ndk_static", 124 ], 125 srcs: [ 126 "aidl_session/BluetoothHfpCodecsProvider.cpp", 127 "aidl_session/BluetoothHfpCodecsProviderTest.cpp", 128 ], 129 header_libs: [ 130 "libxsdc-utils", 131 ], 132 shared_libs: [ 133 "libbase", 134 "libbinder_ndk", 135 "libxml2", 136 ], 137 test_suites: [ 138 "general-tests", 139 ], 140 test_options: { 141 unit_test: false, 142 }, 143 generated_sources: ["hfp_codec_capabilities"], 144 generated_headers: ["hfp_codec_capabilities"], 145} 146 147xsd_config { 148 name: "le_audio_codec_capabilities", 149 srcs: ["le_audio_codec_capabilities/le_audio_codec_capabilities.xsd"], 150 package_name: "aidl.android.hardware.bluetooth.audio.setting", 151 api_dir: "le_audio_codec_capabilities/schema", 152 root_elements: ["leAudioOffloadSetting"], 153} 154 155xsd_config { 156 name: "hfp_codec_capabilities", 157 srcs: ["hfp_codec_capabilities/hfp_codec_capabilities.xsd"], 158 package_name: "aidl.android.hardware.bluetooth.audio.hfp.setting", 159 api_dir: "hfp_codec_capabilities/schema", 160 root_elements: ["hfpOffloadSetting"], 161} 162 163genrule { 164 name: "AIDLLeAudioSetConfigSchemas_h", 165 tools: [ 166 "flatc", 167 ], 168 cmd: "$(location flatc) -I hardware/interfaces/bluetooth/audio/utils/ -o $(genDir) --cpp $(in) ", 169 srcs: [ 170 "le_audio_configuration_set/audio_set_configurations.fbs", 171 "le_audio_configuration_set/audio_set_scenarios.fbs", 172 ], 173 out: [ 174 "audio_set_configurations_generated.h", 175 "audio_set_scenarios_generated.h", 176 ], 177} 178 179// Binary generation 180genrule { 181 name: "AIDLLeAudioSetScenariosSchema_bfbs", 182 tools: [ 183 "flatc", 184 ], 185 cmd: "$(location flatc) -I hardware/interfaces/bluetooth/audio/utils/ -b --schema -o $(genDir) $(in) ", 186 srcs: [ 187 "le_audio_configuration_set/audio_set_scenarios.fbs", 188 ], 189 out: [ 190 "audio_set_scenarios.bfbs", 191 ], 192} 193 194genrule { 195 name: "AIDLLeAudioSetConfigsSchema_bfbs", 196 tools: [ 197 "flatc", 198 ], 199 cmd: "$(location flatc) -I hardware/interfaces/bluetooth/audio/utils/ -b --schema -o $(genDir) $(in) ", 200 srcs: [ 201 "le_audio_configuration_set/audio_set_configurations.fbs", 202 ], 203 out: [ 204 "audio_set_configurations.bfbs", 205 ], 206} 207 208// Add to prebuilt etc 209prebuilt_etc { 210 name: "aidl_audio_set_scenarios_bfbs", 211 src: ":AIDLLeAudioSetScenariosSchema_bfbs", 212 filename: "aidl_audio_set_scenarios.bfbs", 213 sub_dir: "aidl/le_audio", 214 vendor: true, 215} 216 217prebuilt_etc { 218 name: "aidl_audio_set_scenarios_json", 219 src: "le_audio_configuration_set/audio_set_scenarios.json", 220 filename: "aidl_audio_set_scenarios.json", 221 sub_dir: "aidl/le_audio", 222 vendor: true, 223} 224 225prebuilt_etc { 226 name: "hfp_codec_capabilities_xml", 227 src: "hfp_codec_capabilities/hfp_codec_capabilities.xml", 228 filename: "hfp_codec_capabilities.xml", 229 sub_dir: "aidl/hfp", 230 vendor: true, 231} 232 233prebuilt_etc { 234 name: "aidl_audio_set_configurations_bfbs", 235 src: ":AIDLLeAudioSetConfigsSchema_bfbs", 236 filename: "aidl_audio_set_configurations.bfbs", 237 sub_dir: "aidl/le_audio", 238 vendor: true, 239} 240 241prebuilt_etc { 242 name: "aidl_audio_set_configurations_json", 243 src: "le_audio_configuration_set/audio_set_configurations.json", 244 filename: "aidl_audio_set_configurations.json", 245 sub_dir: "aidl/le_audio", 246 vendor: true, 247} 248