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 := redfin 18 19ifeq ($(TARGET_PREBUILT_KERNEL),) 20 ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 21 LOCAL_KERNEL := device/google/redbull-kernel/Image.lz4 22 else 23 LOCAL_KERNEL := device/google/redbull-kernel/vintf/Image.lz4 24 endif 25else 26 LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL) 27endif 28 29PRODUCT_VENDOR_KERNEL_HEADERS := device/google/redbull-kernel/sm7250/kernel-headers 30 31include device/google/redbull/device-common.mk 32 33$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/compression_with_xor.mk) 34 35# LOCAL_PATH is device/google/redbull before this 36LOCAL_PATH := device/google/redfin 37 38PRODUCT_SOONG_NAMESPACES += \ 39 device/google/redfin \ 40 hardware/qcom/wlan/legacy 41 42DEVICE_PACKAGE_OVERLAYS += device/google/redfin/redfin/overlay 43 44# Audio XMLs for redfin 45ifeq ($(wildcard vendor/google_fih/redfin/factory/prebuilt/ftm.mk),) 46PRODUCT_COPY_FILES += \ 47 $(call find-copy-subdir-files,audio_platform_info*.xml,$(LOCAL_PATH)/audio,$(TARGET_COPY_OUT_VENDOR)/etc) 48endif 49 50PRODUCT_COPY_FILES += \ 51 $(call find-copy-subdir-files,mixer_paths*.xml,$(LOCAL_PATH)/audio,$(TARGET_COPY_OUT_VENDOR)/etc) \ 52 $(LOCAL_PATH)/audio/sound_trigger_mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sound_trigger_mixer_paths.xml \ 53 $(LOCAL_PATH)/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ 54 $(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ 55 $(LOCAL_PATH)/audio/audio_policy_configuration_a2dp_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_a2dp_offload_disabled.xml \ 56 $(LOCAL_PATH)/audio/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \ 57 frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \ 58 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 \ 59 frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml \ 60 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 \ 61 frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \ 62 frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \ 63 frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml 64 65# Audio ACDB data 66ifeq ($(wildcard vendor/google_fih/redfin/factory/prebuilt/ftm.mk),) 67PRODUCT_COPY_FILES += \ 68 $(LOCAL_PATH)/audio/acdbdata/Bluetooth_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Bluetooth_cal.acdb \ 69 $(LOCAL_PATH)/audio/acdbdata/General_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/General_cal.acdb \ 70 $(LOCAL_PATH)/audio/acdbdata/Global_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Global_cal.acdb \ 71 $(LOCAL_PATH)/audio/acdbdata/Handset_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Handset_cal.acdb \ 72 $(LOCAL_PATH)/audio/acdbdata/Hdmi_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Hdmi_cal.acdb \ 73 $(LOCAL_PATH)/audio/acdbdata/Headset_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Headset_cal.acdb \ 74 $(LOCAL_PATH)/audio/acdbdata/Speaker_cal.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/Speaker_cal.acdb \ 75 $(LOCAL_PATH)/audio/acdbdata/adsp_avs_config.acdb:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/adsp_avs_config.acdb 76 77# Audio ACDB workspace files for QACT 78ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 79PRODUCT_COPY_FILES += \ 80 $(LOCAL_PATH)/audio/acdbdata/workspaceFile.qwsp:$(TARGET_COPY_OUT_VENDOR)/etc/acdbdata/workspaceFile.qwsp 81endif 82endif 83 84# CS35L41 B0 SPEAKER AMP 85PRODUCT_COPY_FILES += \ 86 $(LOCAL_PATH)/audio/cs35l41/cs35l41-dsp1-spk-cali.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/cs35l41-dsp1-spk-cali.bin \ 87 $(LOCAL_PATH)/audio/cs35l41/cs35l41-dsp1-spk-cali.wmfw:$(TARGET_COPY_OUT_VENDOR)/firmware/cs35l41-dsp1-spk-cali.wmfw \ 88 $(LOCAL_PATH)/audio/cs35l41/R-cs35l41-dsp1-spk-cali.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/R-cs35l41-dsp1-spk-cali.bin \ 89 $(LOCAL_PATH)/audio/cs35l41/cs35l41-dsp1-spk-prot.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/cs35l41-dsp1-spk-prot.bin \ 90 $(LOCAL_PATH)/audio/cs35l41/cs35l41-dsp1-spk-prot.wmfw:$(TARGET_COPY_OUT_VENDOR)/firmware/cs35l41-dsp1-spk-prot.wmfw \ 91 $(LOCAL_PATH)/audio/cs35l41/R-cs35l41-dsp1-spk-prot.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/R-cs35l41-dsp1-spk-prot.bin 92 93# CS35L41 B0 SPEAKER AMP 94PRODUCT_COPY_FILES += \ 95 $(LOCAL_PATH)/audio/cs35l41/B0/cs35l41-revB0-dsp1-spk-cali.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/cs35l41-revB0-dsp1-spk-cali.bin \ 96 $(LOCAL_PATH)/audio/cs35l41/B0/cs35l41-revB0-dsp1-spk-cali.wmfw:$(TARGET_COPY_OUT_VENDOR)/firmware/cs35l41-revB0-dsp1-spk-cali.wmfw \ 97 $(LOCAL_PATH)/audio/cs35l41/B0/R-cs35l41-revB0-dsp1-spk-cali.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/R-cs35l41-revB0-dsp1-spk-cali.bin \ 98 $(LOCAL_PATH)/audio/cs35l41/B0/cs35l41-revB0-dsp1-spk-prot.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/cs35l41-revB0-dsp1-spk-prot.bin \ 99 $(LOCAL_PATH)/audio/cs35l41/B0/cs35l41-revB0-dsp1-spk-prot.wmfw:$(TARGET_COPY_OUT_VENDOR)/firmware/cs35l41-revB0-dsp1-spk-prot.wmfw \ 100 $(LOCAL_PATH)/audio/cs35l41/B0/R-cs35l41-revB0-dsp1-spk-prot.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/R-cs35l41-revB0-dsp1-spk-prot.bin 101 102# CS35L41 B2 SPEAKER AMP 103PRODUCT_COPY_FILES += \ 104 $(LOCAL_PATH)/audio/cs35l41/B2/cs35l41-revB2-dsp1-spk-cali.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/cs35l41-revB2-dsp1-spk-cali.bin \ 105 $(LOCAL_PATH)/audio/cs35l41/B2/cs35l41-revB2-dsp1-spk-cali.wmfw:$(TARGET_COPY_OUT_VENDOR)/firmware/cs35l41-revB2-dsp1-spk-cali.wmfw \ 106 $(LOCAL_PATH)/audio/cs35l41/B2/R-cs35l41-revB2-dsp1-spk-cali.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/R-cs35l41-revB2-dsp1-spk-cali.bin \ 107 $(LOCAL_PATH)/audio/cs35l41/B2/cs35l41-revB2-dsp1-spk-prot.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/cs35l41-revB2-dsp1-spk-prot.bin \ 108 $(LOCAL_PATH)/audio/cs35l41/B2/cs35l41-revB2-dsp1-spk-prot.wmfw:$(TARGET_COPY_OUT_VENDOR)/firmware/cs35l41-revB2-dsp1-spk-prot.wmfw \ 109 $(LOCAL_PATH)/audio/cs35l41/B2/R-cs35l41-revB2-dsp1-spk-prot.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/R-cs35l41-revB2-dsp1-spk-prot.bin 110 111# Audio CS35L41 speaker calibration tool 112PRODUCT_PACKAGES_DEBUG += \ 113 crus_sp_cal 114 115# Audio audiozoom config data 116PRODUCT_COPY_FILES += \ 117 $(LOCAL_PATH)/audio/audiozoom.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audiozoom.xml 118 119PRODUCT_PROPERTY_OVERRIDES += \ 120 vendor.audio.feature.devicestate_listener.enable=true 121 122# Audio Thermal Listener configuration 123PRODUCT_COPY_FILES += \ 124 $(LOCAL_PATH)/audio/audio_thermal_listener.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_thermal_listener.xml 125 126# Audio Features 127PRODUCT_PROPERTY_OVERRIDES += \ 128 vendor.audio.feature.thermal_listener.enable=true \ 129 130ifeq ($(wildcard vendor/google_devices/redfin/proprietary/device-vendor-redfin.mk),) 131 BUILD_WITHOUT_VENDOR := true 132endif 133 134# USB HAL 135PRODUCT_PACKAGES += \ 136 android.hardware.usb-service.redfin 137PRODUCT_PACKAGES += \ 138 android.hardware.usb.gadget-service.redfin 139 140# Vibrator HAL 141PRODUCT_PACKAGES += \ 142 android.hardware.vibrator-service.redfin 143 144# DRV2624 Haptics Waveform 145PRODUCT_COPY_FILES += \ 146 device/google/redfin/vibrator/drv2624/drv2624.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/drv2624.bin 147 148# Vibrator HAL 149PRODUCT_PRODUCT_PROPERTIES +=\ 150 ro.vendor.vibrator.hal.config.dynamic=1 \ 151 ro.vendor.vibrator.hal.click.duration=6 \ 152 ro.vendor.vibrator.hal.tick.duration=6 \ 153 ro.vendor.vibrator.hal.heavyclick.duration=6 \ 154 ro.vendor.vibrator.hal.short.voltage=161 \ 155 ro.vendor.vibrator.hal.long.voltage=161 \ 156 ro.vendor.vibrator.hal.long.frequency.shift=10 \ 157 ro.vendor.vibrator.hal.steady.shape=1 \ 158 ro.vendor.vibrator.hal.lptrigger=0 159 160# Dumpstate HAL 161PRODUCT_PACKAGES += \ 162 android.hardware.dumpstate@1.1-service.redfin 163 164#per device 165PRODUCT_COPY_FILES += \ 166 $(LOCAL_PATH)/redfin/init.redfin.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.redfin.rc 167 168# insmod files 169PRODUCT_COPY_FILES += \ 170 $(LOCAL_PATH)/init.insmod.redfin.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.redfin.cfg 171 172# Recovery 173PRODUCT_COPY_FILES += \ 174 $(LOCAL_PATH)/init.recovery.device.rc:recovery/root/init.recovery.redfin.rc 175 176PRODUCT_PACKAGES += \ 177 sensors.$(PRODUCT_HARDWARE) \ 178 179# Thermal HAL config 180PRODUCT_COPY_FILES += \ 181 $(LOCAL_PATH)/thermal_info_config_$(PRODUCT_HARDWARE).json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json 182 183# Support to disable thermal protection at run time 184ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 185 PRODUCT_COPY_FILES += \ 186 $(LOCAL_PATH)/init.hardware.wlc.rc.userdebug:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(PRODUCT_PLATFORM).wlc.rc 187endif 188 189# GPS ANTENNA_INFO configuration file 190#PRODUCT_COPY_FILES += \ 191# $(LOCAL_PATH)/gnss_antenna_info.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss_antenna_info.conf 192 193# Display configuration 194PRODUCT_COPY_FILES += \ 195 device/google/redfin/displayconfig/display_id_4630946523002478721.xml:$(TARGET_COPY_OUT_VENDOR)/etc/displayconfig/display_id_4630946523002478721.xml 196 197 198# Audio effects 199PRODUCT_PACKAGES += \ 200 libqcomvoiceprocessingdescriptors 201 202# SKU specific RROs 203PRODUCT_PACKAGES += \ 204 SettingsOverlayG5NZ6 \ 205 SettingsOverlayGD1YQ \ 206 SettingsOverlayGTT9Q 207 208# Fingerprint HIDL 209include device/google/redfin/fingerprint.mk 210 211# SurfaceFlinger configurations 212PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_idle_timer_ms=80 213PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_touch_timer_ms=200 214PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_display_power_timer_ms=1000 215PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.support_kernel_idle_timer=true 216PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.use_content_detection_for_refresh_rate=true 217 218PRODUCT_PROPERTY_OVERRIDES += \ 219 vendor.display.defer_fps_frame_count=2 220 221# Keyboard height ratio and bottom padding in dp for portrait mode 222PRODUCT_PRODUCT_PROPERTIES += \ 223 ro.com.google.ime.height_ratio=1.2 \ 224 ro.com.google.ime.kb_pad_port_b=10 225 226# Bluetooth Tx power caps for redfin 227PRODUCT_COPY_FILES += \ 228 $(LOCAL_PATH)/bluetooth_power_limits_redfin_ROW.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits.csv \ 229 $(LOCAL_PATH)/bluetooth_power_limits_redfin_us.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_US.csv \ 230 $(LOCAL_PATH)/bluetooth_power_limits_redfin_eu.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_EU.csv \ 231 $(LOCAL_PATH)/bluetooth_power_limits_redfin_jp.csv:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_power_limits_JP.csv 232 233# Set support hide display cutout feature 234PRODUCT_PRODUCT_PROPERTIES += \ 235 ro.support_hide_display_cutout=true 236 237PRODUCT_PACKAGES += \ 238 NoCutoutOverlay \ 239 AvoidAppsInCutoutOverlay 240 241# Include the redfin product FCM. 242# Vendor Freeze system-only builds use a different FCM. 243ifneq ($(PRODUCT_VENDOR_FREEZE_SYSTEM_BUILD),true) 244PRODUCT_PACKAGES += redfin_product_compatibility_matrix.xml 245endif 246 247# Workaround for prebuilt Qualcomm neural network HAL 248PRODUCT_PACKAGES += \ 249 libprotobuf-cpp-full-3.9.1-vendorcompat 250 251PRODUCT_PACKAGES += \ 252 NfcOverlayRedfin 253 254# Set soong config variable to control module build 255$(call soong_config_set,ctpm,enable_nr_dual_connectivity_qcril,true) 256