1//
2// Copyright (C) 2011 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16package {
17    default_applicable_licenses: ["device_generic_goldfish_audio_license"],
18}
19
20// Added automatically by a large-scale-change
21// See: http://go/android-license-faq
22license {
23    name: "device_generic_goldfish_audio_license",
24    visibility: [":__subpackages__"],
25    license_kinds: [
26        "SPDX-license-identifier-Apache-2.0",
27    ],
28    license_text: [
29        "NOTICE",
30    ],
31}
32
33cc_defaults {
34    name: "android.hardware.audio@7.x-impl.ranchu_default",
35    vendor: true,
36    relative_install_path: "hw",
37    defaults: ["hidl_defaults"],
38    srcs: [
39        "entry.cpp",
40        "device_factory.cpp",
41        "primary_device.cpp",
42        "stream_common.cpp",
43        "stream_in.cpp",
44        "stream_out.cpp",
45        "io_thread.cpp",
46        "device_port_source.cpp",
47        "device_port_sink.cpp",
48        "talsa.cpp",
49        "ring_buffer.cpp",
50        "audio_ops.cpp",
51        "util.cpp",
52    ],
53    shared_libs: [
54        "android.hardware.audio@7.0",
55        "android.hardware.audio@7.0-util",
56        "android.hardware.audio.common@7.0",
57        "android.hardware.audio.common@7.0-util",
58        "libaudioutils",
59        "libbase",
60        "libcutils",
61        "libhidlbase",
62        "liblog",
63        "libtinyalsav2",
64        "libutils",
65        "libfmq",
66        "libprocessgroup",
67    ],
68    header_libs: [
69        "android.hardware.audio.common.util@all-versions",
70        "libaudio_system_headers",
71        "libdebug.ranchu",
72    ],
73    cflags: [
74        "-include common/all-versions/VersionMacro.h",
75    ],
76}
77
78cc_library_shared {
79    name: "android.hardware.audio.legacy@7.1-impl.ranchu",
80    defaults: ["android.hardware.audio@7.1-impl_default"],
81    relative_install_path: "hw",
82    vendor: true,
83}
84
85cc_library_shared {
86    name: "android.hardware.audio@7.1-impl.ranchu",
87    defaults: ["android.hardware.audio@7.x-impl.ranchu_default"],
88    vintf_fragments: ["android.hardware.audio@7.1-impl.ranchu.xml"],
89    shared_libs: [
90        "android.hardware.audio@7.1",
91        "android.hardware.audio.common@7.1-enums",
92    ],
93    cflags: [
94        "-DLOG_TAG=\"android.hardware.audio@7.1-impl.ranchu\"",
95        "-DMAJOR_VERSION=7",
96        "-DMINOR_VERSION=1",
97        "-DCOMMON_TYPES_MINOR_VERSION=0",
98        "-DCORE_TYPES_MINOR_VERSION=0",
99    ],
100    // a.h.audio@X.Y-impl.ranchu (see above) loads a.h.audio.legacy@X.Y-impl
101    // which loads:
102    //  - audio.r_submix.default which provides the r_submix device (b/161485545)
103    //  - audio.bluetooth.default which provides the bluetooth device (b/228804498)
104    // This should be retired once we don't need to load the
105    // deprecated libhardware modules listed above.
106    //
107    required: [
108        "android.hardware.audio.legacy@7.1-impl.ranchu",
109        "audio.r_submix.default",
110        "audio.bluetooth.default",
111    ],
112}
113