1#
2# Copyright (C) 2018 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 := sm8150
19
20# Enable updating of APEXes
21$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
22
23include build/make/target/product/iorap_large_memory_config.mk
24include device/google/coral/device.mk
25
26# Set Vendor SPL to match platform
27VENDOR_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
28
29# Set boot SPL
30BOOT_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
31
32PRODUCT_PROPERTY_OVERRIDES += vendor.audio.adm.buffering.ms=3
33PRODUCT_PROPERTY_OVERRIDES += vendor.audio_hal.period_multiplier=2
34PRODUCT_PROPERTY_OVERRIDES += af.fast_track_multiplier=1
35PRODUCT_PROPERTY_OVERRIDES += vendor.audio.offload.buffer.size.kb=256
36
37# Enable AAudio MMAP/NOIRQ data path.
38# 1 is AAUDIO_POLICY_NEVER  means only use Legacy path.
39# 2 is AAUDIO_POLICY_AUTO   means try MMAP then fallback to Legacy path.
40# 3 is AAUDIO_POLICY_ALWAYS means only use MMAP path.
41PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_policy=2
42# 1 is AAUDIO_POLICY_NEVER  means only use SHARED mode
43# 2 is AAUDIO_POLICY_AUTO   means try EXCLUSIVE then fallback to SHARED mode.
44# 3 is AAUDIO_POLICY_ALWAYS means only use EXCLUSIVE mode.
45PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_exclusive_policy=2
46
47# Increase the apparent size of a hardware burst from 1 msec to 2 msec.
48# A "burst" is the number of frames processed at one time.
49# That is an increase from 48 to 96 frames at 48000 Hz.
50# The DSP will still be bursting at 48 frames but AAudio will think the burst is 96 frames.
51# A low number, like 48, might increase power consumption or stress the system.
52PRODUCT_PROPERTY_OVERRIDES += aaudio.hw_burst_min_usec=2000
53
54# A2DP offload enabled for compilation
55AUDIO_FEATURE_ENABLED_A2DP_OFFLOAD := true
56
57# A2DP offload supported
58PRODUCT_PROPERTY_OVERRIDES += \
59ro.bluetooth.a2dp_offload.supported=true
60
61# A2DP offload disabled (UI toggle property)
62PRODUCT_PROPERTY_OVERRIDES += \
63persist.bluetooth.a2dp_offload.disabled=false
64
65# A2DP offload DSP supported encoder list
66PRODUCT_PROPERTY_OVERRIDES += \
67persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac
68
69# Enable AAC frame ctl for A2DP sinks
70PRODUCT_PROPERTY_OVERRIDES += \
71persist.vendor.bt.aac_frm_ctl.enabled=true
72
73# Set lmkd options
74PRODUCT_PRODUCT_PROPERTIES += \
75	ro.config.low_ram = false \
76	ro.lmk.log_stats = true \
77
78# Modem logging file
79PRODUCT_COPY_FILES += \
80    device/google/coral/init.logging.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_PLATFORM).logging.rc
81
82# Pixelstats broken mic detection
83PRODUCT_PROPERTY_OVERRIDES += vendor.audio.mic_break=true
84
85# Enable APK Verity, which depends on fs-verity support in kernel.
86PRODUCT_PROPERTY_OVERRIDES += ro.apk_verity.mode=2
87
88PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.use_color_management=true
89PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.has_wide_color_display=true
90PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.has_HDR_display=true
91PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_idle_timer_ms=80
92PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_touch_timer_ms=200
93PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.set_display_power_timer_ms=1000
94PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.support_kernel_idle_timer=true
95PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.use_content_detection_for_refresh_rate=true
96PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.protected_contents=true
97
98# Must align with HAL types Dataspace
99# The data space of wide color gamut composition preference is Dataspace::DISPLAY_P3
100PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.wcg_composition_dataspace=143261696
101
102# MIDI feature
103PRODUCT_COPY_FILES += \
104    frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml
105
106# Audio low latency feature
107PRODUCT_COPY_FILES += \
108    frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml
109
110# Pro audio feature
111PRODUCT_COPY_FILES += \
112    frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml
113
114# Dmabuf dump tool for bug reports
115PRODUCT_PACKAGES += \
116    dmabuf_dump
117
118# Set thermal warm reset
119PRODUCT_PRODUCT_PROPERTIES += \
120    ro.thermal_warmreset = true \
121
122# Enable Incremental on the device via kernel module
123PRODUCT_PROPERTY_OVERRIDES += \
124    ro.incremental.enable=module:/vendor/lib/modules/incrementalfs.ko
125
126PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE := true
127