1#
2# Copyright 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
17PRODUCT_AAPT_CONFIG := normal
18PRODUCT_AAPT_PREF_CONFIG := 560dpi
19PRODUCT_AAPT_PREBUILT_DPI := xxxhdpi xxhdpi xhdpi hdpi
20
21PRODUCT_HARDWARE := taimen
22
23# To build taimen specific modules e.g. librecovery_ui_taimen.
24PRODUCT_SOONG_NAMESPACES += device/google/taimen
25
26# DEVICE_PACKAGE_OVERLAYS for the device should be before
27# including common overlays since the one listed first
28# takes precedence.
29ifdef DEVICE_PACKAGE_OVERLAYS
30$(warning Overlays defined in '$(DEVICE_PACKAGE_OVERLAYS)' will override '$(PRODUCT_HARDWARE)' overlays)
31endif
32DEVICE_PACKAGE_OVERLAYS += device/google/taimen/overlay
33
34# Audio
35PRODUCT_COPY_FILES += \
36    device/google/taimen/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
37    device/google/taimen/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml
38
39include device/google/wahoo/device.mk
40
41PRODUCT_COPY_FILES += \
42    device/google/taimen/init-taimen.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init-$(PRODUCT_HARDWARE).rc \
43    device/google/taimen/init.taimen.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_HARDWARE).usb.rc
44
45PRODUCT_PROPERTY_OVERRIDES += \
46    ro.sf.lcd_density=560 \
47
48# Kernel Modules Config
49PRODUCT_COPY_FILES += \
50    device/google/taimen/init.insmod.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod.cfg \
51    device/google/taimen/init.insmod_charger.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/init.insmod_charger.cfg
52
53# Logging
54PRODUCT_COPY_FILES += \
55    device/google/taimen/init.logging.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(PRODUCT_HARDWARE).logging.rc
56
57
58PRODUCT_COPY_FILES += \
59    device/google/taimen/nfc/libnfc-nxp.taimen.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-nxp.conf
60
61PRODUCT_COPY_FILES += \
62    device/google/taimen/powerhint.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json
63
64PRODUCT_COPY_FILES += \
65    device/google/taimen/thermal-engine.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine.conf \
66    device/google/taimen/thermal-engine-vr.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine-vr.conf
67
68# Thermal HAL
69PRODUCT_COPY_FILES += \
70    device/google/taimen/thermal_info_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \
71    device/google/taimen/thermal_info_config_evt.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_evt.json
72
73# Audio
74PRODUCT_COPY_FILES += \
75    device/google/taimen/mixer_paths_tavil.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths_tavil_taimen.xml \
76    device/google/taimen/audio_platform_info_tavil.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info_tavil_taimen.xml
77
78# Bug 62375603
79PRODUCT_PROPERTY_OVERRIDES += audio.adm.buffering.ms=3
80PRODUCT_PROPERTY_OVERRIDES += vendor.audio.adm.buffering.ms=3
81PRODUCT_PROPERTY_OVERRIDES += audio_hal.period_multiplier=2
82PRODUCT_PROPERTY_OVERRIDES += af.fast_track_multiplier=1
83
84# Whether by default, the eSIM system UI, including that in SUW and Settings, will be shown.
85PRODUCT_SYSTEM_DEFAULT_PROPERTIES += esim.enable_esim_system_ui_by_default=false
86
87# Pro audio feature
88PRODUCT_COPY_FILES += \
89    frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml
90
91# Enable AAudio MMAP/NOIRQ data path.
92# 1 is AAUDIO_POLICY_NEVER  means only use Legacy path.
93# 2 is AAUDIO_POLICY_AUTO   means try MMAP then fallback to Legacy path.
94# 3 is AAUDIO_POLICY_ALWAYS means only use MMAP path.
95PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_policy=2
96# 1 is AAUDIO_POLICY_NEVER  means only use SHARED mode
97# 2 is AAUDIO_POLICY_AUTO   means try EXCLUSIVE then fallback to SHARED mode.
98# 3 is AAUDIO_POLICY_ALWAYS means only use EXCLUSIVE mode.
99PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_exclusive_policy=2
100
101# Increase the apparent size of a hardware burst from 1 msec to 2 msec.
102# A "burst" is the number of frames processed at one time.
103# That is an increase from 48 to 96 frames at 48000 Hz.
104# The DSP will still be bursting at 48 frames but AAudio will think the burst is 96 frames.
105# A low number, like 48, might increase power consumption or stress the system.
106PRODUCT_PROPERTY_OVERRIDES += aaudio.hw_burst_min_usec=2000
107
108# Wifi configuration file
109PRODUCT_COPY_FILES += \
110    device/google/taimen/WCNSS_qcom_cfg.ini:$(TARGET_COPY_OUT_VENDOR)/firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini
111
112# touchscreen configuration
113PRODUCT_COPY_FILES += \
114    device/google/taimen/touchscreen.idc:$(TARGET_COPY_OUT_VENDOR)/usr/idc/touchscreen.idc
115
116# Keymaster configuration
117PRODUCT_COPY_FILES += \
118    frameworks/native/data/etc/android.software.device_id_attestation.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_id_attestation.xml
119
120# Enable modem logging
121ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
122PRODUCT_PROPERTY_OVERRIDES += \
123    persist.sys.modem.diag.qdb=0\
124    persist.sys.modem.diag.mdlog=true \
125    persist.sys.modem.diag.mdlog_br_num=5 \
126    ro.radio.log_loc="/data/vendor/modem_dump" \
127    ro.radio.log_prefix="modem_log_"
128endif
129
130#IMU calibration
131PRODUCT_PROPERTY_OVERRIDES += \
132  persist.config.calibration_fac=/persist/sensors/calibration/calibration.xml
133
134# Vibrator HAL
135PRODUCT_PROPERTY_OVERRIDES += \
136  ro.vibrator.hal.click.duration=10 \
137  ro.vibrator.hal.tick.duration=4 \
138  ro.vibrator.hal.heavyclick.duration=12
139
140# Enable Perfetto traced
141PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
142    persist.traced.enable=1
143