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 19ifeq ($(TARGET_PREBUILT_KERNEL),) 20 ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 21 LOCAL_KERNEL := device/google/barbet-kernel/Image.lz4 22 else 23 LOCAL_KERNEL := device/google/barbet-kernel/vintf/Image.lz4 24 endif 25else 26 LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL) 27endif 28 29PRODUCT_VENDOR_KERNEL_HEADERS := device/google/barbet-kernel/sm7250/kernel-headers 30 31DEVICE_PACKAGE_OVERLAYS += device/google/barbet/barbet/overlay 32 33PRODUCT_DEVICE_SVN_OVERRIDE := true 34 35include build/make/target/product/iorap_large_memory_config.mk 36include device/google/redbull/device-common.mk 37 38# Increment the SVN for any official public releases 39PRODUCT_PROPERTY_OVERRIDES += \ 40 ro.vendor.build.svn=6 41 42# Enable watchdog timeout loop breaker. 43PRODUCT_PROPERTY_OVERRIDES += \ 44 framework_watchdog.fatal_window.second=600 \ 45 framework_watchdog.fatal_count=3 46 47# Enable zygote critical window. 48PRODUCT_PROPERTY_OVERRIDES += \ 49 zygote.critical_window.minute=10 50 51# LOCAL_PATH is device/google/redbull before this 52LOCAL_PATH := device/google/barbet 53 54PRODUCT_SOONG_NAMESPACES += \ 55 device/google/barbet 56 57PRODUCT_PACKAGES += \ 58 libtasspkrprot 59 60# Audio XMLs for barbet 61PRODUCT_COPY_FILES += \ 62 $(LOCAL_PATH)/audio/mixer_paths_bolero_snd.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_bolero_snd.xml \ 63 $(LOCAL_PATH)/audio/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \ 64 $(LOCAL_PATH)/audio/audio_platform_info_bolero_snd.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_bolero_snd.xml \ 65 $(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ 66 $(LOCAL_PATH)/audio/audio_policy_configuration_a2dp_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_a2dp_offload_disabled.xml \ 67 $(LOCAL_PATH)/audio/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \ 68 $(LOCAL_PATH)/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ 69 $(LOCAL_PATH)/audio/tas2562/tas25xx_TI_0.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/tas25xx_TI_0.bin \ 70 frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \ 71 frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration.xml \ 72 frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.xml \ 73 frameworks/av/services/audiopolicy/config/hearing_aid_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/hearing_aid_audio_policy_configuration.xml \ 74 frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \ 75 frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \ 76 frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml 77 78# Audio ACDB data 79ifeq ($(wildcard vendor/google_cei/factory/prebuilt/ftm.mk),) 80PRODUCT_COPY_FILES += \ 81 $(LOCAL_PATH)/audio/acdbdata/Bluetooth_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Bluetooth_cal.acdb \ 82 $(LOCAL_PATH)/audio/acdbdata/General_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/General_cal.acdb \ 83 $(LOCAL_PATH)/audio/acdbdata/Global_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Global_cal.acdb \ 84 $(LOCAL_PATH)/audio/acdbdata/Handset_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Handset_cal.acdb \ 85 $(LOCAL_PATH)/audio/acdbdata/Hdmi_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Hdmi_cal.acdb \ 86 $(LOCAL_PATH)/audio/acdbdata/Headset_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Headset_cal.acdb \ 87 $(LOCAL_PATH)/audio/acdbdata/Speaker_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Speaker_cal.acdb \ 88 $(LOCAL_PATH)/audio/acdbdata/adsp_avs_config.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/adsp_avs_config.acdb 89 90# Audio ACDB workspace files for QACT 91ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 92PRODUCT_COPY_FILES += \ 93 $(LOCAL_PATH)/audio/acdbdata/workspaceFile.qwsp:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/workspaceFile.qwsp 94endif 95endif 96 97# Calibration Tools for factory 98ifneq ($(wildcard vendor/google_cei/factory/prebuilt/ftm.mk),) 99PRODUCT_COPY_FILES += \ 100 $(LOCAL_PATH)/audio/tas2562/calib.config:$(TARGET_COPY_OUT_VENDOR)/etc/calib.config \ 101 $(LOCAL_PATH)/audio/tas2562/PinkNoise_m22db_RmsPow.wav:$(TARGET_COPY_OUT_VENDOR)/etc/PinkNoise_m22db_RmsPow.wav \ 102 $(LOCAL_PATH)/audio/tas2562/Silence.wav:$(TARGET_COPY_OUT_VENDOR)/etc/Silence.wav \ 103 $(LOCAL_PATH)/audio/tas2562/TAS_FactoryApp:$(TARGET_COPY_OUT_VENDOR)/bin/TAS_FactoryApp 104endif 105 106ifeq ($(wildcard vendor/google_devices/barbet/proprietary/device-vendor-barbet.mk),) 107 BUILD_WITHOUT_VENDOR := true 108endif 109 110PRODUCT_PACKAGES += \ 111 android.hardware.usb@1.2-service.barbet 112 113# Vibrator HAL 114PRODUCT_PACKAGES += \ 115 android.hardware.vibrator-service.barbet 116 117# DRV2624 Haptics Waveform 118PRODUCT_COPY_FILES += \ 119 device/google/barbet/vibrator/drv2624/drv2624.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/drv2624.bin 120 121# Vibrator HAL 122PRODUCT_PRODUCT_PROPERTIES +=\ 123 ro.vendor.vibrator.hal.config.dynamic=1 \ 124 ro.vendor.vibrator.hal.click.duration=7 \ 125 ro.vendor.vibrator.hal.tick.duration=7 \ 126 ro.vendor.vibrator.hal.heavyclick.duration=7 \ 127 ro.vendor.vibrator.hal.short.voltage=161 \ 128 ro.vendor.vibrator.hal.long.voltage=161 \ 129 ro.vendor.vibrator.hal.long.frequency.shift=10 \ 130 ro.vendor.vibrator.hal.steady.shape=1 \ 131 ro.vendor.vibrator.hal.lptrigger=0 132 133 134# Dumpstate HAL 135PRODUCT_PACKAGES += \ 136 android.hardware.dumpstate@1.1-service.barbet 137 138#per device 139PRODUCT_COPY_FILES += \ 140 $(LOCAL_PATH)/barbet/init.barbet.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.barbet.rc 141 142# insmod files 143PRODUCT_COPY_FILES += \ 144 $(LOCAL_PATH)/init.insmod.barbet.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.barbet.cfg 145 146# Recovery 147PRODUCT_COPY_FILES += \ 148 $(LOCAL_PATH)/init.recovery.device.rc:recovery/root/init.recovery.barbet.rc 149 150PRODUCT_PACKAGES += \ 151 sensors.$(PRODUCT_HARDWARE) \ 152 153PRODUCT_COPY_FILES += \ 154 $(LOCAL_PATH)/powerhint_$(PRODUCT_HARDWARE).json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint_$(PRODUCT_HARDWARE).json 155 156# Thermal HAL config 157PRODUCT_COPY_FILES += \ 158 $(LOCAL_PATH)/thermal_info_config_$(PRODUCT_HARDWARE)_evt.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_$(PRODUCT_HARDWARE)_evt.json \ 159 $(LOCAL_PATH)/thermal_info_config_$(PRODUCT_HARDWARE).json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_$(PRODUCT_HARDWARE).json 160 161# Support to disable thermal protection at run time 162ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 163 PRODUCT_COPY_FILES += \ 164 $(LOCAL_PATH)/init.hardware.chamber.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(PRODUCT_HARDWARE).chamber.rc 165endif 166 167# Audio effects 168PRODUCT_PACKAGES += \ 169 libqcomvoiceprocessingdescriptors 170 171# Fingerprint HIDL 172include device/google/barbet/fingerprint.mk 173 174# NFC 175PRODUCT_COPY_FILES += \ 176 device/google/barbet/nfc/libnfc-hal-st-G4S1M.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-hal-st-G4S1M.conf 177 178# Bluetooth Tx power caps for barbet 179PRODUCT_COPY_FILES += \ 180 $(LOCAL_PATH)/bluetooth_power_limits_barbet_ROW.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits.csv \ 181 $(LOCAL_PATH)/bluetooth_power_limits_barbet_us.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_US.csv \ 182 $(LOCAL_PATH)/bluetooth_power_limits_barbet_eu.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_EU.csv \ 183 $(LOCAL_PATH)/bluetooth_power_limits_barbet_jp.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_JP.csv 184 185# Keyboard bottom padding in dp for portrait mode 186PRODUCT_PRODUCT_PROPERTIES += ro.com.google.ime.kb_pad_port_b=14.4 187 188# SKU specific RROs 189PRODUCT_PACKAGES += \ 190 SettingsOverlayG025H \ 191 SettingsOverlayG4S1M \ 192 SettingsOverlayG1F8F 193 194PRODUCT_COPY_FILES += \ 195 device/google/barbet/default-permissions.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/default-permissions/default-permissions.xml 196