Bob Badour | b224b36 | 2021-02-12 20:13:01 -0800 | [diff] [blame] | 1 | package { |
| 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 | |
Jakub Pawlowski | 964f323 | 2021-02-02 15:11:39 +0100 | [diff] [blame] | 10 | cc_library_shared { |
| 11 | name: "libbluetooth_audio_session", |
| 12 | defaults: ["hidl_defaults"], |
| 13 | vendor: true, |
| 14 | srcs: [ |
| 15 | "session/BluetoothAudioSession.cpp", |
Jakub Pawlowski | 3c8dc61 | 2021-02-03 20:43:20 +0100 | [diff] [blame] | 16 | "session/BluetoothAudioSession_2_1.cpp", |
Jakub Pawlowski | 964f323 | 2021-02-02 15:11:39 +0100 | [diff] [blame] | 17 | "session/BluetoothAudioSupportedCodecsDB.cpp", |
Jakub Pawlowski | 3c8dc61 | 2021-02-03 20:43:20 +0100 | [diff] [blame] | 18 | "session/BluetoothAudioSupportedCodecsDB_2_1.cpp", |
Jakub Pawlowski | 964f323 | 2021-02-02 15:11:39 +0100 | [diff] [blame] | 19 | ], |
| 20 | export_include_dirs: ["session/"], |
| 21 | header_libs: ["libhardware_headers"], |
| 22 | shared_libs: [ |
Jakub Pawlowski | 8d87eb7 | 2021-12-06 15:22:03 +0100 | [diff] [blame] | 23 | "android.hardware.audio.common@5.0", |
Jakub Pawlowski | 964f323 | 2021-02-02 15:11:39 +0100 | [diff] [blame] | 24 | "android.hardware.bluetooth.audio@2.0", |
Jakub Pawlowski | 3c8dc61 | 2021-02-03 20:43:20 +0100 | [diff] [blame] | 25 | "android.hardware.bluetooth.audio@2.1", |
Jakub Pawlowski | 964f323 | 2021-02-02 15:11:39 +0100 | [diff] [blame] | 26 | "libbase", |
| 27 | "libcutils", |
| 28 | "libfmq", |
| 29 | "libhidlbase", |
| 30 | "liblog", |
| 31 | "libutils", |
Josh Wu | 20bac52 | 2021-12-29 23:52:39 -0800 | [diff] [blame] | 32 | "libbluetooth_audio_session_aidl", |
| 33 | ], |
| 34 | } |
| 35 | |
| 36 | cc_library_shared { |
| 37 | name: "libbluetooth_audio_session_aidl", |
| 38 | vendor: true, |
Yung Ti Su | fefceb1 | 2023-08-22 09:29:06 +0000 | [diff] [blame] | 39 | host_supported: true, |
Josh Wu | 20bac52 | 2021-12-29 23:52:39 -0800 | [diff] [blame] | 40 | srcs: [ |
| 41 | "aidl_session/BluetoothAudioCodecs.cpp", |
| 42 | "aidl_session/BluetoothAudioSession.cpp", |
| 43 | "aidl_session/HidlToAidlMiddleware.cpp", |
shihchienc | 8ed901a | 2022-09-06 08:44:44 +0000 | [diff] [blame] | 44 | "aidl_session/BluetoothLeAudioCodecsProvider.cpp", |
Bao Do | 2fa1ab4 | 2024-01-29 17:50:34 +0800 | [diff] [blame] | 45 | "aidl_session/BluetoothHfpCodecsProvider.cpp", |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 46 | "aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.cpp", |
Josh Wu | 20bac52 | 2021-12-29 23:52:39 -0800 | [diff] [blame] | 47 | ], |
| 48 | export_include_dirs: ["aidl_session/"], |
shihchienc | 8ed901a | 2022-09-06 08:44:44 +0000 | [diff] [blame] | 49 | header_libs: [ |
| 50 | "libhardware_headers", |
| 51 | "libxsdc-utils", |
| 52 | ], |
Shunkai Yao | 195d3d6 | 2023-10-10 19:26:07 +0000 | [diff] [blame] | 53 | defaults: [ |
Ted Bauer | da93213 | 2024-04-24 00:47:13 +0000 | [diff] [blame] | 54 | "aconfig_lib_cc_static_link.defaults", |
Shunkai Yao | 195d3d6 | 2023-10-10 19:26:07 +0000 | [diff] [blame] | 55 | "latest_android_hardware_bluetooth_audio_ndk_shared", |
| 56 | ], |
Josh Wu | 20bac52 | 2021-12-29 23:52:39 -0800 | [diff] [blame] | 57 | shared_libs: [ |
| 58 | "android.hardware.bluetooth.audio@2.0", |
| 59 | "android.hardware.bluetooth.audio@2.1", |
Josh Wu | 20bac52 | 2021-12-29 23:52:39 -0800 | [diff] [blame] | 60 | "libbase", |
| 61 | "libcutils", |
| 62 | "libbinder_ndk", |
| 63 | "libfmq", |
| 64 | "liblog", |
Josh Wu | 20bac52 | 2021-12-29 23:52:39 -0800 | [diff] [blame] | 65 | "libhidlbase", |
shihchienc | 8ed901a | 2022-09-06 08:44:44 +0000 | [diff] [blame] | 66 | "libxml2", |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 67 | "libflatbuffers-cpp", |
Limon Mia | b58cee4 | 2023-12-01 12:16:00 +0000 | [diff] [blame] | 68 | "server_configurable_flags", |
| 69 | ], |
| 70 | static_libs: [ |
| 71 | "btaudiohal_flags_c_lib", |
Jakub Pawlowski | 964f323 | 2021-02-02 15:11:39 +0100 | [diff] [blame] | 72 | ], |
Bao Do | 2fa1ab4 | 2024-01-29 17:50:34 +0800 | [diff] [blame] | 73 | generated_sources: [ |
| 74 | "le_audio_codec_capabilities", |
| 75 | "hfp_codec_capabilities", |
| 76 | ], |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 77 | generated_headers: [ |
| 78 | "le_audio_codec_capabilities", |
Bao Do | 2fa1ab4 | 2024-01-29 17:50:34 +0800 | [diff] [blame] | 79 | "hfp_codec_capabilities", |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 80 | "AIDLLeAudioSetConfigSchemas_h", |
| 81 | ], |
Bao Do | be99419 | 2023-11-15 03:34:00 +0000 | [diff] [blame] | 82 | required: [ |
| 83 | "aidl_audio_set_configurations_bfbs", |
Bao Do | f6ce19d | 2024-07-04 11:07:02 +0800 | [diff] [blame] | 84 | "aidl_default_audio_set_configurations_json", |
Bao Do | be99419 | 2023-11-15 03:34:00 +0000 | [diff] [blame] | 85 | "aidl_audio_set_scenarios_bfbs", |
Bao Do | f6ce19d | 2024-07-04 11:07:02 +0800 | [diff] [blame] | 86 | "aidl_default_audio_set_scenarios_json", |
Bao Do | 2fa1ab4 | 2024-01-29 17:50:34 +0800 | [diff] [blame] | 87 | "hfp_codec_capabilities_xml", |
Bao Do | be99419 | 2023-11-15 03:34:00 +0000 | [diff] [blame] | 88 | ], |
shihchienc | 8ed901a | 2022-09-06 08:44:44 +0000 | [diff] [blame] | 89 | } |
| 90 | |
shihchienc | d7f565a | 2022-10-14 13:45:37 +0000 | [diff] [blame] | 91 | cc_test { |
| 92 | name: "BluetoothLeAudioCodecsProviderTest", |
| 93 | srcs: [ |
| 94 | "aidl_session/BluetoothLeAudioCodecsProvider.cpp", |
| 95 | "aidl_session/BluetoothLeAudioCodecsProviderTest.cpp", |
| 96 | ], |
| 97 | header_libs: [ |
| 98 | "libxsdc-utils", |
| 99 | ], |
| 100 | shared_libs: [ |
| 101 | "libbase", |
| 102 | "libbinder_ndk", |
shihchienc | d7f565a | 2022-10-14 13:45:37 +0000 | [diff] [blame] | 103 | "libxml2", |
| 104 | ], |
| 105 | test_suites: [ |
| 106 | "general-tests", |
| 107 | ], |
| 108 | test_options: { |
| 109 | unit_test: false, |
| 110 | }, |
| 111 | generated_sources: ["le_audio_codec_capabilities"], |
| 112 | generated_headers: ["le_audio_codec_capabilities"], |
| 113 | } |
| 114 | |
Bao Do | e062de7 | 2024-02-20 15:45:24 +0800 | [diff] [blame] | 115 | cc_test { |
| 116 | name: "BluetoothHfpCodecsProviderTest", |
| 117 | defaults: [ |
| 118 | "latest_android_hardware_audio_common_ndk_static", |
| 119 | "latest_android_hardware_bluetooth_audio_ndk_static", |
| 120 | "latest_android_media_audio_common_types_ndk_static", |
| 121 | ], |
| 122 | srcs: [ |
| 123 | "aidl_session/BluetoothHfpCodecsProvider.cpp", |
| 124 | "aidl_session/BluetoothHfpCodecsProviderTest.cpp", |
| 125 | ], |
| 126 | header_libs: [ |
| 127 | "libxsdc-utils", |
| 128 | ], |
| 129 | shared_libs: [ |
| 130 | "libbase", |
| 131 | "libbinder_ndk", |
| 132 | "libxml2", |
| 133 | ], |
| 134 | test_suites: [ |
| 135 | "general-tests", |
| 136 | ], |
| 137 | test_options: { |
| 138 | unit_test: false, |
| 139 | }, |
| 140 | generated_sources: ["hfp_codec_capabilities"], |
| 141 | generated_headers: ["hfp_codec_capabilities"], |
| 142 | } |
| 143 | |
shihchienc | 8ed901a | 2022-09-06 08:44:44 +0000 | [diff] [blame] | 144 | xsd_config { |
| 145 | name: "le_audio_codec_capabilities", |
| 146 | srcs: ["le_audio_codec_capabilities/le_audio_codec_capabilities.xsd"], |
| 147 | package_name: "aidl.android.hardware.bluetooth.audio.setting", |
| 148 | api_dir: "le_audio_codec_capabilities/schema", |
Jooyung Han | 16d5af6 | 2023-05-22 16:36:26 +0900 | [diff] [blame] | 149 | root_elements: ["leAudioOffloadSetting"], |
Jakub Pawlowski | 964f323 | 2021-02-02 15:11:39 +0100 | [diff] [blame] | 150 | } |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 151 | |
Bao Do | 2fa1ab4 | 2024-01-29 17:50:34 +0800 | [diff] [blame] | 152 | xsd_config { |
| 153 | name: "hfp_codec_capabilities", |
| 154 | srcs: ["hfp_codec_capabilities/hfp_codec_capabilities.xsd"], |
| 155 | package_name: "aidl.android.hardware.bluetooth.audio.hfp.setting", |
| 156 | api_dir: "hfp_codec_capabilities/schema", |
| 157 | root_elements: ["hfpOffloadSetting"], |
| 158 | } |
| 159 | |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 160 | genrule { |
| 161 | name: "AIDLLeAudioSetConfigSchemas_h", |
| 162 | tools: [ |
| 163 | "flatc", |
| 164 | ], |
| 165 | cmd: "$(location flatc) -I hardware/interfaces/bluetooth/audio/utils/ -o $(genDir) --cpp $(in) ", |
| 166 | srcs: [ |
| 167 | "le_audio_configuration_set/audio_set_configurations.fbs", |
| 168 | "le_audio_configuration_set/audio_set_scenarios.fbs", |
| 169 | ], |
| 170 | out: [ |
| 171 | "audio_set_configurations_generated.h", |
| 172 | "audio_set_scenarios_generated.h", |
| 173 | ], |
| 174 | } |
| 175 | |
| 176 | // Binary generation |
| 177 | genrule { |
| 178 | name: "AIDLLeAudioSetScenariosSchema_bfbs", |
| 179 | tools: [ |
| 180 | "flatc", |
| 181 | ], |
| 182 | cmd: "$(location flatc) -I hardware/interfaces/bluetooth/audio/utils/ -b --schema -o $(genDir) $(in) ", |
| 183 | srcs: [ |
| 184 | "le_audio_configuration_set/audio_set_scenarios.fbs", |
| 185 | ], |
| 186 | out: [ |
| 187 | "audio_set_scenarios.bfbs", |
| 188 | ], |
| 189 | } |
| 190 | |
| 191 | genrule { |
| 192 | name: "AIDLLeAudioSetConfigsSchema_bfbs", |
| 193 | tools: [ |
| 194 | "flatc", |
| 195 | ], |
| 196 | cmd: "$(location flatc) -I hardware/interfaces/bluetooth/audio/utils/ -b --schema -o $(genDir) $(in) ", |
| 197 | srcs: [ |
| 198 | "le_audio_configuration_set/audio_set_configurations.fbs", |
| 199 | ], |
| 200 | out: [ |
| 201 | "audio_set_configurations.bfbs", |
| 202 | ], |
| 203 | } |
| 204 | |
| 205 | // Add to prebuilt etc |
| 206 | prebuilt_etc { |
| 207 | name: "aidl_audio_set_scenarios_bfbs", |
| 208 | src: ":AIDLLeAudioSetScenariosSchema_bfbs", |
| 209 | filename: "aidl_audio_set_scenarios.bfbs", |
| 210 | sub_dir: "aidl/le_audio", |
Bao Do | be99419 | 2023-11-15 03:34:00 +0000 | [diff] [blame] | 211 | vendor: true, |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 212 | } |
| 213 | |
| 214 | prebuilt_etc { |
Bao Do | f6ce19d | 2024-07-04 11:07:02 +0800 | [diff] [blame] | 215 | name: "aidl_default_audio_set_scenarios_json", |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 216 | src: "le_audio_configuration_set/audio_set_scenarios.json", |
Bao Do | f6ce19d | 2024-07-04 11:07:02 +0800 | [diff] [blame] | 217 | filename: "aidl_default_audio_set_scenarios.json", |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 218 | sub_dir: "aidl/le_audio", |
Bao Do | be99419 | 2023-11-15 03:34:00 +0000 | [diff] [blame] | 219 | vendor: true, |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 220 | } |
| 221 | |
| 222 | prebuilt_etc { |
Bao Do | 2fa1ab4 | 2024-01-29 17:50:34 +0800 | [diff] [blame] | 223 | name: "hfp_codec_capabilities_xml", |
| 224 | src: "hfp_codec_capabilities/hfp_codec_capabilities.xml", |
| 225 | filename: "hfp_codec_capabilities.xml", |
| 226 | sub_dir: "aidl/hfp", |
| 227 | vendor: true, |
| 228 | } |
| 229 | |
| 230 | prebuilt_etc { |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 231 | name: "aidl_audio_set_configurations_bfbs", |
| 232 | src: ":AIDLLeAudioSetConfigsSchema_bfbs", |
| 233 | filename: "aidl_audio_set_configurations.bfbs", |
| 234 | sub_dir: "aidl/le_audio", |
Bao Do | be99419 | 2023-11-15 03:34:00 +0000 | [diff] [blame] | 235 | vendor: true, |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 236 | } |
| 237 | |
| 238 | prebuilt_etc { |
Bao Do | f6ce19d | 2024-07-04 11:07:02 +0800 | [diff] [blame] | 239 | name: "aidl_default_audio_set_configurations_json", |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 240 | src: "le_audio_configuration_set/audio_set_configurations.json", |
Bao Do | f6ce19d | 2024-07-04 11:07:02 +0800 | [diff] [blame] | 241 | filename: "aidl_default_audio_set_configurations.json", |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 242 | sub_dir: "aidl/le_audio", |
Bao Do | be99419 | 2023-11-15 03:34:00 +0000 | [diff] [blame] | 243 | vendor: true, |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 244 | } |