1package {
2    default_team: "trendy_team_android_media_audio_framework",
3    // See: http://go/android-license-faq
4    // A large-scale-change added 'default_applicable_licenses' to import
5    // all of the 'license_kinds' from "hardware_interfaces_license"
6    // to get the below license kinds:
7    //   SPDX-license-identifier-Apache-2.0
8    default_applicable_licenses: ["hardware_interfaces_license"],
9}
10
11soong_config_module_type {
12    name: "android_hardware_audio_config_default",
13    module_type: "cc_defaults",
14    config_namespace: "android_hardware_audio",
15    bool_variables: [
16        "run_64bit",
17    ],
18    properties: ["compile_multilib"],
19}
20
21android_hardware_audio_config_default {
22    name: "android_hardware_audio_config_defaults",
23
24    soong_config_variables: {
25        run_64bit: {
26            conditions_default: {
27                // Prefer 32 bit as the binary must always be installed at the same
28                // location for init to start it and the build system does not support
29                // having two binaries installable to the same location even if they are
30                // not installed in the same build.
31                compile_multilib: "prefer32",
32            },
33            compile_multilib: "64",
34        },
35    },
36}
37
38cc_binary {
39    name: "android.hardware.audio.service",
40
41    init_rc: ["android.hardware.audio.service.rc"],
42    relative_install_path: "hw",
43    vendor: true,
44
45    defaults: [
46        "android_hardware_audio_config_defaults",
47    ],
48
49    srcs: ["service.cpp"],
50
51    cflags: [
52        "-Wall",
53        "-Wextra",
54        "-Werror",
55    ],
56
57    shared_libs: [
58        "libcutils",
59        "libbinder",
60        "libbinder_ndk",
61        "libhidlbase",
62        "liblog",
63        "libutils",
64        "libhardware",
65    ],
66}
67
68// Legacy service name, use android.hardware.audio.service instead
69phony {
70    name: "android.hardware.audio@2.0-service",
71    required: ["android.hardware.audio.service"],
72}
73