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=3
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
74# Modem loging file
75PRODUCT_COPY_FILES += \
76    device/google/sunfish/init.logging.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_PLATFORM).logging.rc
77
78# Pixelstats broken mic detection
79PRODUCT_PROPERTY_OVERRIDES += vendor.audio.mic_break=true
80
81PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.use_color_management=true
82PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.has_wide_color_display=true
83PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.has_HDR_display=true
84PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.protected_contents=true
85
86# Must align with HAL types Dataspace
87# The data space of wide color gamut composition preference is Dataspace::DISPLAY_P3
88PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.wcg_composition_dataspace=143261696
89
90# MIDI feature
91PRODUCT_COPY_FILES += \
92    frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml
93
94# Set thermal warm reset
95PRODUCT_PRODUCT_PROPERTIES += \
96    ro.thermal_warmreset = true \
97
98# Audio low latency feature
99PRODUCT_COPY_FILES += \
100    frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml
101
102# Pro audio feature
103PRODUCT_COPY_FILES += \
104    frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml
105
106PRODUCT_PACKAGES += \
107    dmabuf_dump
108
109# Set the default property of tcpdump_logger on userdebug/eng ROM.
110ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
111    PRODUCT_PROPERTY_OVERRIDES += \
112        persist.vendor.tcpdump.log.alwayson=false \
113        persist.vendor.tcpdump.log.br_num=5
114endif
115
116# Disable Rescue Party on userdebug & eng build
117ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
118PRODUCT_PRODUCT_PROPERTIES += \
119    persist.sys.disable_rescue=true
120endif
121
122# Enable Incremental on the device via kernel module
123PRODUCT_PROPERTY_OVERRIDES += \
124        ro.incremental.enable=module:/vendor/lib/modules/incrementalfs.ko
125
126