xref: /aosp_15_r20/system/media/audio_utils/benchmarks/Android.bp (revision b9df5ad1c9ac98a7fefaac271a55f7ae3db05414)
1// Build the benchmarks for audio_utils
2
3package {
4    default_team: "trendy_team_android_media_audio_framework",
5    // http://go/android-license-faq
6    // A large-scale-change added 'default_applicable_licenses' to import
7    // the below license kinds from "system_media_license":
8    //   SPDX-license-identifier-Apache-2.0
9    default_applicable_licenses: ["system_media_license"],
10}
11
12cc_benchmark {
13    name: "audio_mutex_benchmark",
14
15    srcs: ["audio_mutex_benchmark.cpp"],
16    cflags: [
17        "-Wall",
18        "-Werror",
19    ],
20
21    shared_libs: [
22        "libaudioutils",
23        "libbase",
24        "liblog",
25        "libutils",
26    ],
27}
28
29cc_benchmark {
30    name: "audio_power_benchmark",
31    host_supported: true,
32
33    srcs: ["audio_power_benchmark.cpp"],
34    cflags: [
35        "-Wall",
36        "-Werror",
37        "-Wextra",
38    ],
39    shared_libs: [
40        "libbase",
41        "liblog",
42    ],
43    static_libs: [
44        "libaudioutils",
45    ],
46}
47
48cc_benchmark {
49    name: "biquad_filter_benchmark",
50    host_supported: true,
51
52    srcs: ["biquad_filter_benchmark.cpp"],
53    cflags: [
54        "-Wall",
55        "-Werror",
56        "-ffast-math",
57        "-fhonor-infinities",
58        "-fhonor-nans",
59        //  "-fno-vectorize",      // (test only)
60        //  "-fno-slp-vectorize",  // (test only)
61    ],
62    static_libs: [
63        "libaudioutils",
64    ],
65}
66
67cc_benchmark {
68    name: "channelmix_benchmark",
69    host_supported: true,
70
71    srcs: ["channelmix_benchmark.cpp"],
72    cflags: [
73        "-Wall",
74        "-Werror",
75        "-Wextra",
76    ],
77    static_libs: [
78        "libaudioutils",
79    ],
80}
81
82cc_benchmark {
83    name: "intrinsic_benchmark",
84    // No need to enable for host, as this is used to compare NEON which isn't supported by the host
85    host_supported: false,
86
87    srcs: ["intrinsic_benchmark.cpp"],
88    cflags: [
89        "-Wall",
90        "-Werror",
91        "-ffast-math",
92        "-fhonor-infinities",
93        "-fhonor-nans",
94        //  "-fno-vectorize",      // (test only)
95        //  "-fno-slp-vectorize",  // (test only)
96    ],
97    static_libs: [
98        "libaudioutils",
99    ],
100}
101
102cc_benchmark {
103    name: "primitives_benchmark",
104    host_supported: true,
105    target: {
106        darwin: {
107            enabled: false,
108        },
109    },
110
111    srcs: ["primitives_benchmark.cpp"],
112    cflags: [
113        "-Wall",
114        "-Werror",
115    ],
116    static_libs: [
117        "libaudioutils",
118    ],
119}
120
121cc_benchmark {
122    name: "statistics_benchmark",
123    host_supported: true,
124
125    srcs: ["statistics_benchmark.cpp"],
126    cflags: [
127        "-Wall",
128        "-Werror",
129    ],
130    static_libs: [
131        "libaudioutils",
132    ],
133}
134