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 "system_bt_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7    default_applicable_licenses: ["system_bt_license"],
8}
9
10cc_library_static {
11    name: "libbt-audio-asrc",
12    defaults: [],
13    srcs: [
14        "asrc/asrc_resampler.cc",
15        "asrc/asrc_tables.cc",
16    ],
17    include_dirs: [
18        "packages/modules/Bluetooth/system",
19        "packages/modules/Bluetooth/system/bta/include",
20        "packages/modules/Bluetooth/system/btif/avrcp",
21        "packages/modules/Bluetooth/system/gd",
22        "packages/modules/Bluetooth/system/stack/btm",
23        "packages/modules/Bluetooth/system/stack/include",
24        "packages/modules/Bluetooth/system/udrv/include",
25    ],
26    header_libs: [
27        "libbluetooth_headers",
28    ],
29    shared_libs: [
30        "libaconfig_storage_read_api_cc",
31        "libchrome",
32        "liblog",
33        "server_configurable_flags",
34    ],
35    static_libs: [
36        "bluetooth_flags_c_lib",
37        "libbase",
38        "libbluetooth_hci_pdl",
39        "libbluetooth_log",
40        "libflatbuffers-cpp",
41    ],
42    host_supported: true,
43    min_sdk_version: "33",
44    apex_available: [
45        "com.android.btservices",
46    ],
47}
48
49cc_library_host_shared {
50    name: "libasrc_resampler_test",
51    defaults: ["bluetooth_cflags"],
52    srcs: [
53        ":TestMockMainShimEntry",
54        "asrc/asrc_resampler_test.cc",
55        "asrc/asrc_tables.cc",
56    ],
57    include_dirs: [
58        "packages/modules/Bluetooth/system",
59        "packages/modules/Bluetooth/system/bta/include",
60        "packages/modules/Bluetooth/system/btif/avrcp",
61        "packages/modules/Bluetooth/system/gd",
62        "packages/modules/Bluetooth/system/stack/btm",
63        "packages/modules/Bluetooth/system/stack/include",
64        "packages/modules/Bluetooth/system/udrv/include",
65    ],
66    header_libs: [
67        "libbluetooth_headers",
68    ],
69    shared_libs: [
70        "libaconfig_storage_read_api_cc",
71        "server_configurable_flags",
72    ],
73    static_libs: [
74        "bluetooth_flags_c_lib",
75        "libbase",
76        "libbluetooth_hci_pdl",
77        "libbluetooth_log",
78        "libbt-common",
79        "libchrome",
80        "libevent",
81        "libflatbuffers-cpp",
82        "libgmock",
83        "liblog",
84    ],
85    stl: "libc++_static",
86}
87
88python_test_host {
89    name: "asrc_resampler_test",
90    main: "asrc/asrc_resampler_test.py",
91    srcs: ["asrc/asrc_resampler_test.py"],
92    libs: ["mobly"],
93    data: [":libasrc_resampler_test"],
94    test_config: "asrc/asrc_resampler_test.config",
95    test_suites: ["general-tests"],
96    test_options: {
97        unit_test: false,
98    },
99}
100