1// 2// Copyright (C) 2017 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 16// Derived from device/generic/goldfish/audio/Android.mk 17 18package { 19 // See: http://go/android-license-faq 20 // A large-scale-change added 'default_applicable_licenses' to import 21 // all of the 'license_kinds' from "device_generic_car_license" 22 // to get the below license kinds: 23 // SPDX-license-identifier-Apache-2.0 24 default_applicable_licenses: ["device_generic_car_license"], 25} 26 27soong_config_module_type { 28 name: "audio_extn_cc_defaults", 29 module_type: "cc_defaults", 30 config_namespace: "audio_extn_config", 31 bool_variables: ["isHFPEnabled"], 32 properties: ["srcs", "cflags"], 33} 34 35audio_extn_cc_defaults { 36 name: "audio_extn_hfp", 37 soong_config_variables: { 38 isHFPEnabled: { 39 cflags: ["-DHFP_ENABLED"], 40 srcs: ["audio_extn/hfp.c"], 41 }, 42 }, 43} 44 45cc_library_shared { 46 47 vendor: true, 48 vintf_fragments: ["android.hardware.audio@6.0-impl.xml"], 49 name: "audio.primary.caremu", 50 relative_install_path: "hw", 51 defaults: ["audio_extn_hfp"], 52 srcs: [ 53 "audio_hw.c", 54 "audio_vbuffer.c", 55 "ext_pcm.c", 56 ], 57 58 include_dirs: ["external/tinyalsa/include"], 59 local_include_dirs: ["audio_extn"], 60 export_include_dirs: [ 61 "include" 62 ], 63 shared_libs: [ 64 "libcutils", 65 "liblog", 66 "libdl", 67 "libtinyalsa", 68 ], 69 70 cflags: ["-Wno-unused-parameter"], 71 header_libs: [ 72 "libhardware_headers", 73 "libcutils_headers", 74 ], 75 76} 77