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 81# Pixelstats broken mic detection 82PRODUCT_PROPERTY_OVERRIDES += vendor.audio.mic_break=true 83 84# Enable APK Verity, which depends on fs-verity support in kernel. 85PRODUCT_PROPERTY_OVERRIDES += ro.apk_verity.mode=2 86 87PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.use_color_management=true 88PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.has_wide_color_display=true 89PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.has_HDR_display=true 90PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.protected_contents=true 91 92# Must align with HAL types Dataspace 93# The data space of wide color gamut composition preference is Dataspace::DISPLAY_P3 94PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.wcg_composition_dataspace=143261696 95 96# MIDI feature 97PRODUCT_COPY_FILES += \ 98 frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml 99 100# Set thermal warm reset 101PRODUCT_PRODUCT_PROPERTIES += \ 102 ro.thermal_warmreset = true \ 103 104# Audio low latency feature 105PRODUCT_COPY_FILES += \ 106 frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml 107 108# Pro audio feature 109PRODUCT_COPY_FILES += \ 110 frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml 111 112# Set the default property of tcpdump_logger on userdebug/eng ROM. 113ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 114 PRODUCT_PROPERTY_OVERRIDES += \ 115 persist.vendor.tcpdump.log.alwayson=false \ 116 persist.vendor.tcpdump.log.br_num=5 117endif 118 119# Disable Rescue Party on userdebug & eng build 120ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) 121PRODUCT_PRODUCT_PROPERTIES += \ 122 persist.sys.disable_rescue=true 123endif 124 125# Enable Incremental on the device via kernel module 126PRODUCT_PROPERTY_OVERRIDES += \ 127 ro.incremental.enable=module:/vendor/lib/modules/incrementalfs.ko 128 129# Enable watchdog timeout loop breaker. 130PRODUCT_PROPERTY_OVERRIDES += \ 131 framework_watchdog.fatal_window.second=600 \ 132 framework_watchdog.fatal_count=3 133 134