1# 2# Copyright 2016 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 17PRODUCT_HARDWARE := barbet 18 19USES_QCT_MODEM := true 20 21ifeq ($(TARGET_PREBUILT_KERNEL),) 22 ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 23 LOCAL_KERNEL := device/google/redbull-kernel/Image.lz4 24 else 25 LOCAL_KERNEL := device/google/redbull-kernel/vintf/Image.lz4 26 endif 27else 28 LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL) 29endif 30 31PRODUCT_VENDOR_KERNEL_HEADERS := device/google/redbull-kernel/sm7250/kernel-headers 32 33DEVICE_PACKAGE_OVERLAYS += device/google/barbet/barbet/overlay 34 35PRODUCT_DEVICE_SVN_OVERRIDE := true 36 37include device/google/redbull/device-common.mk 38 39$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/launch_with_vendor_ramdisk.mk) 40 41# Increment the SVN for any official public releases 42PRODUCT_PROPERTY_OVERRIDES += \ 43 ro.vendor.build.svn=62 44 45# Enable watchdog timeout loop breaker. 46PRODUCT_PROPERTY_OVERRIDES += \ 47 framework_watchdog.fatal_window.second=600 \ 48 framework_watchdog.fatal_count=3 49 50# Enable zygote critical window. 51PRODUCT_PROPERTY_OVERRIDES += \ 52 zygote.critical_window.minute=10 53 54# LOCAL_PATH is device/google/redbull before this 55LOCAL_PATH := device/google/barbet 56 57PRODUCT_SOONG_NAMESPACES += \ 58 device/google/barbet \ 59 hardware/qcom/wlan/legacy 60 61PRODUCT_PACKAGES += \ 62 libtasspkrprot 63 64# Audio XMLs for barbet 65PRODUCT_COPY_FILES += \ 66 $(LOCAL_PATH)/audio/mixer_paths_bolero_snd.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_bolero_snd.xml \ 67 $(LOCAL_PATH)/audio/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \ 68 $(LOCAL_PATH)/audio/audio_platform_info_bolero_snd.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_bolero_snd.xml \ 69 $(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ 70 $(LOCAL_PATH)/audio/audio_policy_configuration_a2dp_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_a2dp_offload_disabled.xml \ 71 $(LOCAL_PATH)/audio/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \ 72 $(LOCAL_PATH)/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ 73 $(LOCAL_PATH)/audio/tas2562/tas25xx_TI_0.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/tas25xx_TI_0.bin \ 74 frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration_7_0.xml \ 75 frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration_7_0.xml \ 76 frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml \ 77 frameworks/av/services/audiopolicy/config/hearing_aid_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/hearing_aid_audio_policy_configuration_7_0.xml \ 78 frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \ 79 frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \ 80 frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml 81 82# Audio ACDB data 83ifeq ($(wildcard vendor/google_cei/factory/prebuilt/ftm.mk),) 84PRODUCT_COPY_FILES += \ 85 $(LOCAL_PATH)/audio/acdbdata/Bluetooth_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Bluetooth_cal.acdb \ 86 $(LOCAL_PATH)/audio/acdbdata/General_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/General_cal.acdb \ 87 $(LOCAL_PATH)/audio/acdbdata/Global_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Global_cal.acdb \ 88 $(LOCAL_PATH)/audio/acdbdata/Handset_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Handset_cal.acdb \ 89 $(LOCAL_PATH)/audio/acdbdata/Hdmi_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Hdmi_cal.acdb \ 90 $(LOCAL_PATH)/audio/acdbdata/Headset_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Headset_cal.acdb \ 91 $(LOCAL_PATH)/audio/acdbdata/Speaker_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Speaker_cal.acdb \ 92 $(LOCAL_PATH)/audio/acdbdata/adsp_avs_config.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/adsp_avs_config.acdb 93 94# Audio ACDB workspace files for QACT 95ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 96PRODUCT_COPY_FILES += \ 97 $(LOCAL_PATH)/audio/acdbdata/workspaceFile.qwsp:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/workspaceFile.qwsp 98endif 99endif 100 101# Calibration Tools for factory 102ifneq ($(wildcard vendor/google_cei/factory/prebuilt/ftm.mk),) 103PRODUCT_COPY_FILES += \ 104 $(LOCAL_PATH)/audio/tas2562/calib.config:$(TARGET_COPY_OUT_VENDOR)/etc/calib.config \ 105 $(LOCAL_PATH)/audio/tas2562/PinkNoise_m22db_RmsPow.wav:$(TARGET_COPY_OUT_VENDOR)/etc/PinkNoise_m22db_RmsPow.wav \ 106 $(LOCAL_PATH)/audio/tas2562/Silence.wav:$(TARGET_COPY_OUT_VENDOR)/etc/Silence.wav \ 107 $(LOCAL_PATH)/audio/tas2562/TAS_FactoryApp:$(TARGET_COPY_OUT_VENDOR)/bin/TAS_FactoryApp 108endif 109 110ifeq ($(wildcard vendor/google_devices/barbet/proprietary/device-vendor-barbet.mk),) 111 BUILD_WITHOUT_VENDOR := true 112endif 113 114# USB HAL 115PRODUCT_PACKAGES += \ 116 android.hardware.usb-service.barbet 117PRODUCT_PACKAGES += \ 118 android.hardware.usb.gadget-service.barbet 119 120# Vibrator HAL 121PRODUCT_PACKAGES += \ 122 android.hardware.vibrator-service.barbet 123 124# DRV2624 Haptics Waveform 125PRODUCT_COPY_FILES += \ 126 device/google/barbet/vibrator/drv2624/drv2624.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/drv2624.bin 127 128# Vibrator HAL 129PRODUCT_PRODUCT_PROPERTIES +=\ 130 ro.vendor.vibrator.hal.config.dynamic=1 \ 131 ro.vendor.vibrator.hal.click.duration=7 \ 132 ro.vendor.vibrator.hal.tick.duration=7 \ 133 ro.vendor.vibrator.hal.heavyclick.duration=7 \ 134 ro.vendor.vibrator.hal.short.voltage=161 \ 135 ro.vendor.vibrator.hal.long.voltage=161 \ 136 ro.vendor.vibrator.hal.long.frequency.shift=10 \ 137 ro.vendor.vibrator.hal.steady.shape=1 \ 138 ro.vendor.vibrator.hal.lptrigger=0 139 140 141# Quick Start device-specific settings 142PRODUCT_PRODUCT_PROPERTIES += \ 143 ro.quick_start.oem_id=00e0 \ 144 ro.quick_start.device_id=barbet 145 146# Dumpstate HAL 147PRODUCT_PACKAGES += \ 148 android.hardware.dumpstate@1.1-service.barbet 149 150#per device 151PRODUCT_COPY_FILES += \ 152 $(LOCAL_PATH)/barbet/init.barbet.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.barbet.rc 153 154# insmod files 155PRODUCT_COPY_FILES += \ 156 $(LOCAL_PATH)/init.insmod.barbet.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.barbet.cfg 157 158# Recovery 159PRODUCT_COPY_FILES += \ 160 $(LOCAL_PATH)/init.recovery.device.rc:recovery/root/init.recovery.barbet.rc 161 162PRODUCT_PACKAGES += \ 163 sensors.$(PRODUCT_HARDWARE) \ 164 165PRODUCT_COPY_FILES += \ 166 $(LOCAL_PATH)/powerhint_$(PRODUCT_HARDWARE).json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint_$(PRODUCT_HARDWARE).json 167 168# Thermal HAL config 169PRODUCT_COPY_FILES += \ 170 $(LOCAL_PATH)/thermal_info_config_$(PRODUCT_HARDWARE)_evt.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_$(PRODUCT_HARDWARE)_evt.json \ 171 $(LOCAL_PATH)/thermal_info_config_$(PRODUCT_HARDWARE).json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_$(PRODUCT_HARDWARE).json 172 173# Support to disable thermal protection at run time 174ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 175 PRODUCT_COPY_FILES += \ 176 $(LOCAL_PATH)/init.hardware.chamber.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(PRODUCT_HARDWARE).chamber.rc 177endif 178 179# Audio effects 180PRODUCT_PACKAGES += \ 181 libqcomvoiceprocessingdescriptors 182 183# Fingerprint HIDL 184include device/google/barbet/fingerprint.mk 185 186# SurfaceFlinger configurations 187PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_display_power_timer_ms=1000 188PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_idle_timer_ms=0 189PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_touch_timer_ms=200 190PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.use_content_detection_for_refresh_rate=true 191 192# NFC 193PRODUCT_COPY_FILES += \ 194 device/google/barbet/nfc/libnfc-hal-st-G4S1M.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-hal-st-G4S1M.conf 195 196# Bluetooth Tx power caps for barbet 197PRODUCT_COPY_FILES += \ 198 $(LOCAL_PATH)/bluetooth_power_limits_barbet_ROW.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits.csv \ 199 $(LOCAL_PATH)/bluetooth_power_limits_barbet_us.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_US.csv \ 200 $(LOCAL_PATH)/bluetooth_power_limits_barbet_eu.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_EU.csv \ 201 $(LOCAL_PATH)/bluetooth_power_limits_barbet_jp.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_JP.csv 202 203# Keyboard bottom padding in dp for portrait mode 204PRODUCT_PRODUCT_PROPERTIES += ro.com.google.ime.kb_pad_port_b=14.4 205 206# SKU specific RROs 207PRODUCT_PACKAGES += \ 208 SettingsOverlayG025H \ 209 SettingsOverlayG4S1M \ 210 SettingsOverlayG1F8F 211 212# Set support hide display cutout feature 213PRODUCT_PRODUCT_PROPERTIES += \ 214 ro.support_hide_display_cutout=true 215 216PRODUCT_PACKAGES += \ 217 NoCutoutOverlay \ 218 AvoidAppsInCutoutOverlay 219 220PRODUCT_COPY_FILES += \ 221 device/google/barbet/default-permissions.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/default-permissions/default-permissions.xml 222 223# Workaround for Qualcomm neural network HAL 224PRODUCT_PACKAGES += \ 225 libprotobuf-cpp-full-3.9.1-vendorcompat 226 227PRODUCT_PACKAGES += \ 228 NfcOverlayBarbet 229 230# Gyotaku 231include device/google/gs-common/gyotaku_app/gyotaku.mk 232# Better Bug 233include device/google/gs-common/betterbug/betterbug.mk 234 235# Set soong config variable to control module build 236$(call soong_config_set,ctpm,enable_nr_dual_connectivity_qcril,true) 237