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 | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 45 | "aidl_session/BluetoothLeAudioAseConfigurationSettingProvider.cpp", |
Josh Wu | 20bac52 | 2021-12-29 23:52:39 -0800 | [diff] [blame] | 46 | ], |
| 47 | export_include_dirs: ["aidl_session/"], |
shihchienc | 8ed901a | 2022-09-06 08:44:44 +0000 | [diff] [blame] | 48 | header_libs: [ |
| 49 | "libhardware_headers", |
| 50 | "libxsdc-utils", |
| 51 | ], |
Shunkai Yao | 195d3d6 | 2023-10-10 19:26:07 +0000 | [diff] [blame] | 52 | defaults: [ |
| 53 | "latest_android_hardware_bluetooth_audio_ndk_shared", |
| 54 | ], |
Josh Wu | 20bac52 | 2021-12-29 23:52:39 -0800 | [diff] [blame] | 55 | shared_libs: [ |
| 56 | "android.hardware.bluetooth.audio@2.0", |
| 57 | "android.hardware.bluetooth.audio@2.1", |
Josh Wu | 20bac52 | 2021-12-29 23:52:39 -0800 | [diff] [blame] | 58 | "libbase", |
| 59 | "libcutils", |
| 60 | "libbinder_ndk", |
| 61 | "libfmq", |
| 62 | "liblog", |
Josh Wu | 20bac52 | 2021-12-29 23:52:39 -0800 | [diff] [blame] | 63 | "libhidlbase", |
shihchienc | 8ed901a | 2022-09-06 08:44:44 +0000 | [diff] [blame] | 64 | "libxml2", |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 65 | "libflatbuffers-cpp", |
Limon Mia | b58cee4 | 2023-12-01 12:16:00 +0000 | [diff] [blame] | 66 | "server_configurable_flags", |
| 67 | ], |
| 68 | static_libs: [ |
| 69 | "btaudiohal_flags_c_lib", |
Jakub Pawlowski | 964f323 | 2021-02-02 15:11:39 +0100 | [diff] [blame] | 70 | ], |
shihchienc | 8ed901a | 2022-09-06 08:44:44 +0000 | [diff] [blame] | 71 | generated_sources: ["le_audio_codec_capabilities"], |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 72 | generated_headers: [ |
| 73 | "le_audio_codec_capabilities", |
| 74 | "AIDLLeAudioSetConfigSchemas_h", |
| 75 | ], |
Bao Do | be99419 | 2023-11-15 03:34:00 +0000 | [diff] [blame] | 76 | required: [ |
| 77 | "aidl_audio_set_configurations_bfbs", |
| 78 | "aidl_audio_set_configurations_json", |
| 79 | "aidl_audio_set_scenarios_bfbs", |
| 80 | "aidl_audio_set_scenarios_json", |
| 81 | ], |
shihchienc | 8ed901a | 2022-09-06 08:44:44 +0000 | [diff] [blame] | 82 | } |
| 83 | |
shihchienc | d7f565a | 2022-10-14 13:45:37 +0000 | [diff] [blame] | 84 | cc_test { |
| 85 | name: "BluetoothLeAudioCodecsProviderTest", |
| 86 | srcs: [ |
| 87 | "aidl_session/BluetoothLeAudioCodecsProvider.cpp", |
| 88 | "aidl_session/BluetoothLeAudioCodecsProviderTest.cpp", |
| 89 | ], |
| 90 | header_libs: [ |
| 91 | "libxsdc-utils", |
| 92 | ], |
| 93 | shared_libs: [ |
| 94 | "libbase", |
| 95 | "libbinder_ndk", |
Jakub Rotkiewicz | e70014d | 2023-08-07 12:49:46 +0000 | [diff] [blame] | 96 | "android.hardware.bluetooth.audio-V4-ndk", |
shihchienc | d7f565a | 2022-10-14 13:45:37 +0000 | [diff] [blame] | 97 | "libxml2", |
| 98 | ], |
| 99 | test_suites: [ |
| 100 | "general-tests", |
| 101 | ], |
| 102 | test_options: { |
| 103 | unit_test: false, |
| 104 | }, |
| 105 | generated_sources: ["le_audio_codec_capabilities"], |
| 106 | generated_headers: ["le_audio_codec_capabilities"], |
| 107 | } |
| 108 | |
shihchienc | 8ed901a | 2022-09-06 08:44:44 +0000 | [diff] [blame] | 109 | xsd_config { |
| 110 | name: "le_audio_codec_capabilities", |
| 111 | srcs: ["le_audio_codec_capabilities/le_audio_codec_capabilities.xsd"], |
| 112 | package_name: "aidl.android.hardware.bluetooth.audio.setting", |
| 113 | api_dir: "le_audio_codec_capabilities/schema", |
Jooyung Han | 16d5af6 | 2023-05-22 16:36:26 +0900 | [diff] [blame] | 114 | root_elements: ["leAudioOffloadSetting"], |
Jakub Pawlowski | 964f323 | 2021-02-02 15:11:39 +0100 | [diff] [blame] | 115 | } |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 116 | |
| 117 | genrule { |
| 118 | name: "AIDLLeAudioSetConfigSchemas_h", |
| 119 | tools: [ |
| 120 | "flatc", |
| 121 | ], |
| 122 | cmd: "$(location flatc) -I hardware/interfaces/bluetooth/audio/utils/ -o $(genDir) --cpp $(in) ", |
| 123 | srcs: [ |
| 124 | "le_audio_configuration_set/audio_set_configurations.fbs", |
| 125 | "le_audio_configuration_set/audio_set_scenarios.fbs", |
| 126 | ], |
| 127 | out: [ |
| 128 | "audio_set_configurations_generated.h", |
| 129 | "audio_set_scenarios_generated.h", |
| 130 | ], |
| 131 | } |
| 132 | |
| 133 | // Binary generation |
| 134 | genrule { |
| 135 | name: "AIDLLeAudioSetScenariosSchema_bfbs", |
| 136 | tools: [ |
| 137 | "flatc", |
| 138 | ], |
| 139 | cmd: "$(location flatc) -I hardware/interfaces/bluetooth/audio/utils/ -b --schema -o $(genDir) $(in) ", |
| 140 | srcs: [ |
| 141 | "le_audio_configuration_set/audio_set_scenarios.fbs", |
| 142 | ], |
| 143 | out: [ |
| 144 | "audio_set_scenarios.bfbs", |
| 145 | ], |
| 146 | } |
| 147 | |
| 148 | genrule { |
| 149 | name: "AIDLLeAudioSetConfigsSchema_bfbs", |
| 150 | tools: [ |
| 151 | "flatc", |
| 152 | ], |
| 153 | cmd: "$(location flatc) -I hardware/interfaces/bluetooth/audio/utils/ -b --schema -o $(genDir) $(in) ", |
| 154 | srcs: [ |
| 155 | "le_audio_configuration_set/audio_set_configurations.fbs", |
| 156 | ], |
| 157 | out: [ |
| 158 | "audio_set_configurations.bfbs", |
| 159 | ], |
| 160 | } |
| 161 | |
| 162 | // Add to prebuilt etc |
| 163 | prebuilt_etc { |
| 164 | name: "aidl_audio_set_scenarios_bfbs", |
| 165 | src: ":AIDLLeAudioSetScenariosSchema_bfbs", |
| 166 | filename: "aidl_audio_set_scenarios.bfbs", |
| 167 | sub_dir: "aidl/le_audio", |
Bao Do | be99419 | 2023-11-15 03:34:00 +0000 | [diff] [blame] | 168 | vendor: true, |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 169 | } |
| 170 | |
| 171 | prebuilt_etc { |
| 172 | name: "aidl_audio_set_scenarios_json", |
| 173 | src: "le_audio_configuration_set/audio_set_scenarios.json", |
| 174 | filename: "aidl_audio_set_scenarios.json", |
| 175 | sub_dir: "aidl/le_audio", |
Bao Do | be99419 | 2023-11-15 03:34:00 +0000 | [diff] [blame] | 176 | vendor: true, |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 177 | } |
| 178 | |
| 179 | prebuilt_etc { |
| 180 | name: "aidl_audio_set_configurations_bfbs", |
| 181 | src: ":AIDLLeAudioSetConfigsSchema_bfbs", |
| 182 | filename: "aidl_audio_set_configurations.bfbs", |
| 183 | sub_dir: "aidl/le_audio", |
Bao Do | be99419 | 2023-11-15 03:34:00 +0000 | [diff] [blame] | 184 | vendor: true, |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 185 | } |
| 186 | |
| 187 | prebuilt_etc { |
| 188 | name: "aidl_audio_set_configurations_json", |
| 189 | src: "le_audio_configuration_set/audio_set_configurations.json", |
| 190 | filename: "aidl_audio_set_configurations.json", |
| 191 | sub_dir: "aidl/le_audio", |
Bao Do | be99419 | 2023-11-15 03:34:00 +0000 | [diff] [blame] | 192 | vendor: true, |
Bao Do | fbc99e0 | 2023-11-15 03:21:03 +0000 | [diff] [blame] | 193 | } |