1// The format of the name is audio.<type>.<hardware/etc>.so
2
3package {
4    // See: http://go/android-license-faq
5    // A large-scale-change added 'default_applicable_licenses' to import
6    // all of the 'license_kinds' from "system_bt_license"
7    // to get the below license kinds:
8    //   SPDX-license-identifier-Apache-2.0
9    default_applicable_licenses: ["system_bt_license"],
10}
11
12cc_defaults {
13    name: "audio_bluetooth_hw_defaults",
14    defaults: ["bluetooth_cflags"],
15    cflags: [
16        // suppress the warning in stream_apis.cc
17        "-Wno-sign-compare",
18    ],
19}
20
21cc_library_shared {
22    name: "audio.bluetooth.default",
23    defaults: [
24        "audio_bluetooth_hw_defaults",
25        "latest_android_hardware_audio_common_ndk_shared",
26        "latest_android_hardware_bluetooth_audio_ndk_shared",
27    ],
28    relative_install_path: "hw",
29    proprietary: true,
30    srcs: [
31        "audio_bluetooth_hw.cc",
32        "device_port_proxy.cc",
33        "device_port_proxy_hidl.cc",
34        "stream_apis.cc",
35        "utils.cc",
36    ],
37    header_libs: ["libhardware_headers"],
38    shared_libs: [
39        "libaudioutils",
40        "libbase",
41        "libbinder_ndk",
42        "libbluetooth_audio_session_aidl",
43        "libcutils",
44        "libfmq",
45        "liblog",
46        "libutils",
47        // HIDL dependencies
48        "android.hardware.bluetooth.audio@2.0",
49        "android.hardware.bluetooth.audio@2.1",
50        "libbluetooth_audio_session",
51        "libhidlbase",
52    ],
53    cflags: ["-Wno-unused-parameter"],
54    visibility: [
55        "//device/generic/goldfish/audio",
56    ],
57}
58
59cc_test {
60    name: "audio_bluetooth_hw_test",
61    defaults: ["audio_bluetooth_hw_defaults"],
62    srcs: [
63        "utils.cc",
64        "utils_unittest.cc",
65    ],
66    shared_libs: [
67        "libbase",
68        "libcutils",
69        "liblog",
70        "libutils",
71    ],
72}
73