1// 2// Copyright (C) 2021 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: ["Android-Apache-2.0"], 18} 19 20soong_config_module_type { 21 name: "haptics_feature_cc_defaults", 22 module_type: "cc_defaults", 23 config_namespace: "haptics", 24 variables: [ 25 "actuator_model", 26 ], 27 properties: ["cflags"], 28} 29 30soong_config_string_variable { 31 name: "actuator_model", 32 values: [ 33 "luxshare_ict_081545", 34 "luxshare_ict_lt_xlra1906d", 35 ], 36} 37 38haptics_feature_cc_defaults { 39 name: "haptics_feature_defaults", 40 soong_config_variables: { 41 actuator_model: { 42 luxshare_ict_081545: { 43 cflags: [ 44 "-DLUXSHARE_ICT_081545", 45 ], 46 }, 47 luxshare_ict_lt_xlra1906d: { 48 cflags: [ 49 "-DLUXSHARE_ICT_LT_XLRA1906D", 50 ], 51 }, 52 }, 53 }, 54} 55 56cc_defaults { 57 name: "android.hardware.vibrator-defaults.cs40l25", 58 cflags: [ 59 "-DATRACE_TAG=(ATRACE_TAG_VIBRATOR | ATRACE_TAG_HAL)", 60 ], 61 shared_libs: [ 62 "libbinder", 63 ], 64} 65 66cc_defaults { 67 name: "VibratorHalCs40l25BinaryDefaults", 68 defaults: [ 69 "PixelVibratorBinaryDefaults", 70 "android.hardware.vibrator-defaults.cs40l25", 71 ], 72} 73 74cc_defaults { 75 name: "VibratorHalCs40l25TestDefaults", 76 defaults: [ 77 "PixelVibratorTestDefaults", 78 "android.hardware.vibrator-defaults.cs40l25", 79 ], 80 shared_libs: ["android.hardware.vibrator-impl.cs40l25"], 81 include_dirs: [ 82 "external/tinyalsa/include", 83 ], 84} 85 86cc_library_shared { 87 name: "android.hardware.vibrator-impl.cs40l25", 88 defaults: [ 89 "VibratorHalCs40l25BinaryDefaults", 90 "haptics_feature_defaults", 91 ], 92 srcs: ["Vibrator.cpp"], 93 include_dirs: [ 94 "external/tinyalsa/include", 95 ], 96 shared_libs: [ 97 "libcutils", 98 "libtinyalsa", 99 ], 100 export_include_dirs: ["."], 101 vendor_available: true, 102 visibility: [":__subpackages__"], 103} 104 105cc_binary { 106 name: "android.hardware.vibrator-service.cs40l25", 107 defaults: ["VibratorHalCs40l25BinaryDefaults"], 108 init_rc: ["android.hardware.vibrator-service.cs40l25.rc"], 109 vintf_fragments: ["android.hardware.vibrator-service.cs40l25.xml"], 110 srcs: ["service.cpp"], 111 include_dirs: [ 112 "external/tinyalsa/include" 113 ], 114 shared_libs: [ 115 "android.hardware.vibrator-impl.cs40l25", 116 "libcutils", 117 "libtinyalsa", 118 ], 119 cflags: [ 120 "-DLOG_TAG=\"android.hardware.vibrator-cs40l25\"", 121 ], 122 proprietary: true, 123} 124 125cc_binary { 126 name: "android.hardware.vibrator-service.cs40l25-dual", 127 defaults: ["VibratorHalCs40l25BinaryDefaults"], 128 init_rc: ["android.hardware.vibrator-service.cs40l25-dual.rc"], 129 vintf_fragments: ["android.hardware.vibrator-service.cs40l25-dual.xml"], 130 srcs: ["service.cpp"], 131 include_dirs: [ 132 "external/tinyalsa/include" 133 ], 134 shared_libs: [ 135 "android.hardware.vibrator-impl.cs40l25", 136 "libcutils", 137 "libtinyalsa", 138 ], 139 cflags: [ 140 "-DVIBRATOR_NAME=\"dual\"", 141 "-DLOG_TAG=\"android.hardware.vibrator-cs40l25-dual\"", 142 ], 143 proprietary: true, 144} 145 146cc_binary { 147 name: "android.hardware.vibrator-service.cs40l25-specific-revision", 148 defaults: ["VibratorHalCs40l25BinaryDefaults"], 149 init_rc: ["android.hardware.vibrator-service.cs40l25-specific-revision.rc"], 150 vintf_fragments: ["android.hardware.vibrator-service.cs40l25.xml"], 151 srcs: ["service.cpp"], 152 include_dirs: [ 153 "external/tinyalsa/include" 154 ], 155 shared_libs: [ 156 "android.hardware.vibrator-impl.cs40l25", 157 "libcutils", 158 "libtinyalsa", 159 ], 160 cflags: [ 161 "-DLOG_TAG=\"android.hardware.vibrator-cs40l25\"", 162 ], 163 proprietary: true, 164} 165 166cc_binary { 167 name: "android.hardware.vibrator-service.cs40l25-specific-revision-dual", 168 defaults: ["VibratorHalCs40l25BinaryDefaults"], 169 init_rc: ["android.hardware.vibrator-service.cs40l25-specific-revision-dual.rc"], 170 vintf_fragments: ["android.hardware.vibrator-service.cs40l25-dual.xml"], 171 srcs: ["service.cpp"], 172 include_dirs: [ 173 "external/tinyalsa/include" 174 ], 175 shared_libs: [ 176 "android.hardware.vibrator-impl.cs40l25", 177 "libcutils", 178 "libtinyalsa", 179 ], 180 cflags: [ 181 "-DVIBRATOR_NAME=\"dual\"", 182 "-DLOG_TAG=\"android.hardware.vibrator-cs40l25-dual\"", 183 ], 184 proprietary: true, 185} 186