• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2020 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "device_google_atv_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["device_google_atv_license"],
22}
23
24cc_library_static {
25  name: "audio_proxy_service_util",
26  vendor_available: true,
27  host_supported: true,
28  srcs: [
29    "RingBufferUtil.cpp",
30    "ServiceConfig.cpp",
31  ],
32  shared_libs: [
33    "libbase",
34  ],
35}
36
37cc_defaults {
38  name: "audio_proxy_service_defaults",
39  vendor: true,
40  relative_install_path: "hw",
41
42  srcs: [
43    "AudioProxyImpl.cpp",
44    "BusOutputStream.cpp",
45    "BusStreamProvider.cpp",
46    "DeviceImpl.cpp",
47    "DevicesFactoryImpl.cpp",
48    "DummyBusOutputStream.cpp",
49    "RemoteBusOutputStream.cpp",
50    "StreamOutImpl.cpp",
51    "WriteThread.cpp",
52    "main.cpp",
53  ],
54
55  shared_libs: [
56    "device.google.atv.audio_proxy-aidl-V1-ndk",
57    "libbase",
58    "libbinder_ndk",
59    "libhidlbase",
60    "libcutils",
61    "libfmq",
62    "libutils",
63  ],
64
65  static_libs: [
66    "audio_proxy_service_util",
67  ],
68
69  header_libs: [
70    "libaudio_system_headers",
71  ],
72
73  cflags: [
74    "-include ../common/AudioProxyVersionMacro.h",
75    "-Werror",
76    "-Wthread-safety",
77    "-Wno-unused-parameter",
78  ],
79}
80
81cc_binary {
82  name: "device.google.atv.audio_proxy@5.1-service",
83
84  defaults: [
85    "audio_proxy_service_defaults"
86  ],
87
88  init_rc: [
89    "device.google.atv.audio_proxy@5.1-service.rc",
90  ],
91
92  vintf_fragments: [ "manifest_audio_proxy_5_0.xml" ],
93
94  shared_libs: [
95    "android.hardware.audio@5.0",
96    "android.hardware.audio.common@5.0",
97  ],
98
99  cflags: [
100    "-DMAJOR_VERSION=5",
101    "-DMINOR_VERSION=0",
102  ],
103}
104
105cc_binary {
106  name: "device.google.atv.audio_proxy@6.0-service",
107
108  defaults: [
109    "audio_proxy_service_defaults"
110  ],
111
112  init_rc: [
113    "device.google.atv.audio_proxy@6.0-service.rc",
114  ],
115
116  vintf_fragments: [ "manifest_audio_proxy_6_0.xml" ],
117
118  shared_libs: [
119    "android.hardware.audio@6.0",
120    "android.hardware.audio.common@6.0",
121  ],
122
123  cflags: [
124    "-DMAJOR_VERSION=6",
125    "-DMINOR_VERSION=0",
126  ],
127}
128
129cc_binary {
130  name: "device.google.atv.audio_proxy@7.0-service",
131
132  defaults: [
133    "audio_proxy_service_defaults"
134  ],
135
136  init_rc: [
137    "device.google.atv.audio_proxy@7.0-service.rc",
138  ],
139
140  vintf_fragments: [ "manifest_audio_proxy_7_0.xml" ],
141
142  shared_libs: [
143    "android.hardware.audio@7.0",
144    "android.hardware.audio.common@7.0",
145  ],
146
147  cflags: [
148    "-DMAJOR_VERSION=7",
149    "-DMINOR_VERSION=0",
150  ],
151}
152
153cc_binary {
154  name: "device.google.atv.audio_proxy@7.1-service",
155
156  defaults: [
157    "audio_proxy_service_defaults"
158  ],
159
160  init_rc: [
161    "device.google.atv.audio_proxy@7.1-service.rc",
162  ],
163
164  vintf_fragments: [ "manifest_audio_proxy_7_1.xml" ],
165
166  shared_libs: [
167    "android.hardware.audio@7.1",
168    "android.hardware.audio@7.0",
169    "android.hardware.audio.common@7.0",
170  ],
171
172  cflags: [
173    "-DMAJOR_VERSION=7",
174    "-DMINOR_VERSION=1",
175  ],
176}
177
178cc_test {
179  name: "audio_proxy_service_util_test",
180  host_supported: true,
181
182  srcs: [
183    "RingBufferUtilTest.cpp",
184    "ServiceConfigTest.cpp",
185  ],
186  static_libs: [
187    "audio_proxy_service_util",
188    "libbase",
189    "libgtest",
190  ],
191
192  cflags: [
193    // Suppress the warning to make ServiceConfigTest easier.
194    "-Wno-writable-strings",
195  ],
196}
197