• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2019 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
17# define hardware platform
18PRODUCT_PLATFORM := sm7150
19
20include device/google/sunfish/device.mk
21
22# Set Vendor SPL to match platform
23VENDOR_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
24
25PRODUCT_PROPERTY_OVERRIDES += vendor.audio.adm.buffering.ms=2
26PRODUCT_PROPERTY_OVERRIDES += vendor.audio_hal.period_multiplier=2
27PRODUCT_PROPERTY_OVERRIDES += af.fast_track_multiplier=1
28
29# Enable AAudio MMAP/NOIRQ data path.
30# 1 is AAUDIO_POLICY_NEVER  means only use Legacy path.
31# 2 is AAUDIO_POLICY_AUTO   means try MMAP then fallback to Legacy path.
32# 3 is AAUDIO_POLICY_ALWAYS means only use MMAP path.
33PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_policy=2
34# 1 is AAUDIO_POLICY_NEVER  means only use SHARED mode
35# 2 is AAUDIO_POLICY_AUTO   means try EXCLUSIVE then fallback to SHARED mode.
36# 3 is AAUDIO_POLICY_ALWAYS means only use EXCLUSIVE mode.
37PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_exclusive_policy=2
38
39# Increase the apparent size of a hardware burst from 1 msec to 2 msec.
40# A "burst" is the number of frames processed at one time.
41# That is an increase from 48 to 96 frames at 48000 Hz.
42# The DSP will still be bursting at 48 frames but AAudio will think the burst is 96 frames.
43# A low number, like 48, might increase power consumption or stress the system.
44PRODUCT_PROPERTY_OVERRIDES += aaudio.hw_burst_min_usec=2000
45
46# A2DP offload enabled for compilation
47AUDIO_FEATURE_ENABLED_A2DP_OFFLOAD := true
48
49# A2DP offload supported
50PRODUCT_PROPERTY_OVERRIDES += \
51ro.bluetooth.a2dp_offload.supported=true
52
53# A2DP offload disabled (UI toggle property)
54PRODUCT_PROPERTY_OVERRIDES += \
55persist.bluetooth.a2dp_offload.disabled=false
56
57# A2DP offload DSP supported encoder list
58PRODUCT_PROPERTY_OVERRIDES += \
59persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac
60
61# Enable AAC frame ctl for A2DP sinks
62PRODUCT_PROPERTY_OVERRIDES += \
63persist.vendor.bt.aac_frm_ctl.enabled=true
64
65# Set lmkd options
66PRODUCT_PRODUCT_PROPERTIES += \
67	ro.config.low_ram ?= false \
68	ro.lmk.log_stats = true \
69
70# charger
71PRODUCT_PRODUCT_PROPERTIES += \
72	ro.charger.enable_suspend=true
73
74PRODUCT_PRODUCT_PROPERTIES += \
75    persist.vendor.testing_battery_profile=2
76
77# Modem loging file
78PRODUCT_COPY_FILES += \
79    device/google/sunfish/init.logging.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_PLATFORM).logging.rc
80
81PRODUCT_COPY_FILES += \
82    device/google/sunfish/task_profiles.json:$(TARGET_COPY_OUT_VENDOR)/etc/task_profiles.json
83
84# Pixelstats broken mic detection
85PRODUCT_PROPERTY_OVERRIDES += vendor.audio.mic_break=true
86
87# Enable APK Verity, which depends on fs-verity support in kernel.
88PRODUCT_PROPERTY_OVERRIDES += ro.apk_verity.mode=2
89
90PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.use_color_management=true
91PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.has_wide_color_display=true
92PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.has_HDR_display=true
93PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.protected_contents=true
94
95# Must align with HAL types Dataspace
96# The data space of wide color gamut composition preference is Dataspace::DISPLAY_P3
97PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.wcg_composition_dataspace=143261696
98
99# MIDI feature
100PRODUCT_COPY_FILES += \
101    frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml
102
103# Set thermal warm reset
104PRODUCT_PRODUCT_PROPERTIES += \
105    ro.thermal_warmreset = true \
106
107# Audio low latency feature
108PRODUCT_COPY_FILES += \
109    frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml
110
111# Pro audio feature
112PRODUCT_COPY_FILES += \
113    frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml
114
115# Set the default property of tcpdump_logger on userdebug/eng ROM.
116ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
117    PRODUCT_PROPERTY_OVERRIDES += \
118        persist.vendor.tcpdump.log.alwayson=false \
119        persist.vendor.tcpdump.log.br_num=5
120endif
121
122# Disable Rescue Party on userdebug & eng build
123ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
124PRODUCT_PRODUCT_PROPERTIES += \
125    persist.sys.disable_rescue=true
126endif
127
128# Enable Incremental on the device via kernel module
129PRODUCT_PROPERTY_OVERRIDES += \
130        ro.incremental.enable=module:/vendor/lib/modules/incrementalfs.ko
131
132# Enable watchdog timeout loop breaker.
133PRODUCT_PROPERTY_OVERRIDES += \
134    framework_watchdog.fatal_window.second=600 \
135    framework_watchdog.fatal_count=3
136
137# Enable zygote critical window.
138PRODUCT_PROPERTY_OVERRIDES += \
139    zygote.critical_window.minute=10
140