summaryrefslogtreecommitdiff
path: root/system/audio_hal_interface/Android.bp
blob: 57a524ddbb898a5932d0e222f896e63359ef4757 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
// Bluetooth Audio library for target
package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "system_bt_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["system_bt_license"],
}

cc_library_static {
    name: "libbt-audio-hal-interface",
    defaults: ["fluoride_defaults"],
    include_dirs: [
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/gd",
        "packages/modules/Bluetooth/system/bta/include",
        "packages/modules/Bluetooth/system/bta/sys",
        "packages/modules/Bluetooth/system/btif/include",
        "packages/modules/Bluetooth/system/stack/include",
        "packages/modules/Bluetooth/system/gd/rust/shim",
    ],
    shared_libs: [
        "android.hardware.bluetooth.audio@2.0",
        "android.hardware.bluetooth.audio@2.1",
        "libhidlbase",
    ],
    static_libs: [
        "libosi",
        "libbt-common",
    ],
    target: {
        android: {
            shared_libs: [
                "libfmq",
                "libbinder_ndk",
                "android.hardware.bluetooth.audio-V2-ndk",
            ],
            srcs: [
                "aidl/a2dp_encoding_aidl.cc",
                "aidl/bluetooth_audio_port_impl.cc",
                "aidl/client_interface_aidl.cc",
                "aidl/codec_status_aidl.cc",
                "aidl/hearing_aid_software_encoding_aidl.cc",
                "aidl/le_audio_software_aidl.cc",
                "hidl/a2dp_encoding_hidl.cc",
                "hidl/client_interface_hidl.cc",
                "hidl/codec_status_hidl.cc",
                "hidl/hearing_aid_software_encoding_hidl.cc",
                "hidl/le_audio_software_hidl.cc",
                "a2dp_encoding.cc",
                "hearing_aid_software_encoding.cc",
                "le_audio_software.cc",
                "hal_version_manager.cc",
            ],
        },
        host: {
            srcs: [
                "a2dp_encoding_host.cc",
                "hearing_aid_software_encoding_host.cc",
                "le_audio_software_host.cc",
                "hal_version_manager_host.cc",
            ],
        },
    },
    host_supported: true,
    cflags: [
        "-DBUILDCFG",
    ],
    min_sdk_version: "Tiramisu"
}

// Bluetooth Audio client interface library unit tests for target and host
cc_test {
    name: "bluetooth-test-audio-hal-interface",
    defaults: ["fluoride_defaults"],
    include_dirs: [
        "packages/modules/Bluetooth/system",
        "packages/modules/Bluetooth/system/gd",
        "packages/modules/Bluetooth/system/stack/include",
    ],
    srcs: [
        "hidl/client_interface_hidl_unittest.cc",
    ],
    shared_libs: [
        "android.hardware.bluetooth.audio@2.0",
        "android.hardware.bluetooth.audio@2.1",
        "android.hardware.bluetooth.audio-V2-ndk",
        "libbinder_ndk",
        "libcutils",
        "libfmq",
        "libhidlbase",
        "liblog",
        "libutils",
    ],
    static_libs: [
        "libbt-audio-hal-interface",
        "libbt-common",
    ],
    cflags: [
        "-DBUILDCFG",
    ],
}