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 "AudioUtil.cpp", 45 "BusOutputStream.cpp", 46 "BusStreamProvider.cpp", 47 "DeviceImpl.cpp", 48 "DevicesFactoryImpl.cpp", 49 "DummyBusOutputStream.cpp", 50 "RemoteBusOutputStream.cpp", 51 "StreamOutImpl.cpp", 52 "WriteThread.cpp", 53 "main.cpp", 54 ], 55 56 shared_libs: [ 57 "device.google.atv.audio_proxy-aidl-V3-ndk", 58 "libbase", 59 "libbinder_ndk", 60 "libhidlbase", 61 "libcutils", 62 "libfmq", 63 "libutils", 64 ], 65 66 static_libs: [ 67 "audio_proxy_service_util", 68 ], 69 70 header_libs: [ 71 "libaudio_system_headers", 72 ], 73 74 cflags: [ 75 "-include ../common/AudioProxyVersionMacro.h", 76 "-Werror", 77 "-Wthread-safety", 78 "-Wno-unused-parameter", 79 ], 80} 81 82cc_binary { 83 name: "device.google.atv.audio_proxy@5.1-service", 84 85 defaults: [ 86 "audio_proxy_service_defaults" 87 ], 88 89 init_rc: [ 90 "device.google.atv.audio_proxy@5.1-service.rc", 91 ], 92 93 vintf_fragments: [ "manifest_audio_proxy_5_0.xml" ], 94 95 shared_libs: [ 96 "android.hardware.audio@5.0", 97 "android.hardware.audio.common@5.0", 98 ], 99 100 cflags: [ 101 "-DMAJOR_VERSION=5", 102 "-DMINOR_VERSION=0", 103 ], 104} 105 106cc_binary { 107 name: "device.google.atv.audio_proxy@6.0-service", 108 109 defaults: [ 110 "audio_proxy_service_defaults" 111 ], 112 113 init_rc: [ 114 "device.google.atv.audio_proxy@6.0-service.rc", 115 ], 116 117 vintf_fragments: [ "manifest_audio_proxy_6_0.xml" ], 118 119 shared_libs: [ 120 "android.hardware.audio@6.0", 121 "android.hardware.audio.common@6.0", 122 ], 123 124 cflags: [ 125 "-DMAJOR_VERSION=6", 126 "-DMINOR_VERSION=0", 127 ], 128} 129 130cc_binary { 131 name: "device.google.atv.audio_proxy@7.0-service", 132 133 defaults: [ 134 "audio_proxy_service_defaults" 135 ], 136 137 init_rc: [ 138 "device.google.atv.audio_proxy@7.0-service.rc", 139 ], 140 141 vintf_fragments: [ "manifest_audio_proxy_7_0.xml" ], 142 143 shared_libs: [ 144 "android.hardware.audio@7.0", 145 "android.hardware.audio.common@7.0", 146 ], 147 148 cflags: [ 149 "-DMAJOR_VERSION=7", 150 "-DMINOR_VERSION=0", 151 ], 152} 153 154cc_binary { 155 name: "device.google.atv.audio_proxy@7.1-service", 156 157 defaults: [ 158 "audio_proxy_service_defaults" 159 ], 160 161 init_rc: [ 162 "device.google.atv.audio_proxy@7.1-service.rc", 163 ], 164 165 vintf_fragments: [ "manifest_audio_proxy_7_1.xml" ], 166 167 shared_libs: [ 168 "android.hardware.audio@7.1", 169 "android.hardware.audio@7.0", 170 "android.hardware.audio.common@7.0", 171 ], 172 173 cflags: [ 174 "-DMAJOR_VERSION=7", 175 "-DMINOR_VERSION=1", 176 ], 177} 178 179cc_test { 180 name: "audio_proxy_service_util_test", 181 host_supported: true, 182 183 srcs: [ 184 "RingBufferUtilTest.cpp", 185 "ServiceConfigTest.cpp", 186 ], 187 static_libs: [ 188 "audio_proxy_service_util", 189 "libbase", 190 "libgtest", 191 ], 192 193 cflags: [ 194 // Suppress the warning to make ServiceConfigTest easier. 195 "-Wno-writable-strings", 196 ], 197} 198