• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 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
17TARGET_USERIMAGES_USE_F2FS := true
18
19LOCAL_PATH := device/google/crosshatch
20
21# define hardware platform
22PRODUCT_PLATFORM := sdm845
23
24# Enable updating of APEXes
25$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
26
27include device/google/crosshatch/device.mk
28
29# Audio fluence, ns, aec property, voice volume steps
30PRODUCT_PROPERTY_OVERRIDES += \
31    ro.qc.sdk.audio.fluencetype=fluencepro \
32    persist.audio.fluence.voicecall=true \
33    persist.audio.fluence.speaker=true \
34    persist.audio.fluence.voicecomm=true \
35    persist.audio.fluence.voicerec=false \
36    ro.config.vc_call_vol_steps=7
37
38# Bug 77867216
39PRODUCT_PROPERTY_OVERRIDES += audio.adm.buffering.ms=3
40PRODUCT_PROPERTY_OVERRIDES += vendor.audio.adm.buffering.ms=3
41PRODUCT_PROPERTY_OVERRIDES += audio_hal.period_multiplier=2
42PRODUCT_PROPERTY_OVERRIDES += af.fast_track_multiplier=1
43
44# Enable HW Codec 2.0 as default service
45# Set all codec components are available with their normal ranks
46# Set OMX components's default rank large than Codec 2.0 HW components's default rank (0x100)
47PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.ccodec=4
48PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.omx_default_rank=512
49
50# Pixelstats broken mic detection
51PRODUCT_PROPERTY_OVERRIDES += vendor.audio.mic_break=true
52
53# Setting vendor SPL
54VENDOR_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
55
56# Set boot SPL
57BOOT_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
58
59# MIDI feature
60PRODUCT_COPY_FILES += \
61    frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml
62
63# Audio low latency feature
64PRODUCT_COPY_FILES += \
65    frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml
66
67# Pro audio feature
68PRODUCT_COPY_FILES += \
69    frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml
70
71# Enable AAudio MMAP/NOIRQ data path.
72# 1 is AAUDIO_POLICY_NEVER  means only use Legacy path.
73# 2 is AAUDIO_POLICY_AUTO   means try MMAP then fallback to Legacy path.
74# 3 is AAUDIO_POLICY_ALWAYS means only use MMAP path.
75PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_policy=2
76# 1 is AAUDIO_POLICY_NEVER  means only use SHARED mode
77# 2 is AAUDIO_POLICY_AUTO   means try EXCLUSIVE then fallback to SHARED mode.
78# 3 is AAUDIO_POLICY_ALWAYS means only use EXCLUSIVE mode.
79PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_exclusive_policy=2
80
81# Increase the apparent size of a hardware burst from 1 msec to 2 msec.
82# A "burst" is the number of frames processed at one time.
83# That is an increase from 48 to 96 frames at 48000 Hz.
84# The DSP will still be bursting at 48 frames but AAudio will think the burst is 96 frames.
85# A low number, like 48, might increase power consumption or stress the system.
86PRODUCT_PROPERTY_OVERRIDES += aaudio.hw_burst_min_usec=2000
87
88# A2DP offload enabled for compilation
89AUDIO_FEATURE_ENABLED_A2DP_OFFLOAD := true
90
91# A2DP offload supported
92PRODUCT_PROPERTY_OVERRIDES += \
93ro.bluetooth.a2dp_offload.supported=true
94
95# A2DP offload disabled (UI toggle property)
96PRODUCT_PROPERTY_OVERRIDES += \
97persist.bluetooth.a2dp_offload.disabled=false
98
99# A2DP offload DSP supported encoder list
100PRODUCT_PROPERTY_OVERRIDES += \
101persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac
102
103# Modem loging file
104PRODUCT_COPY_FILES += \
105    device/google/crosshatch/init.logging.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_PLATFORM).logging.rc
106
107# Dumpstate HAL
108PRODUCT_PACKAGES += \
109    android.hardware.dumpstate@1.0-service.crosshatch
110
111# Dmabuf dump tool for bug reports
112PRODUCT_PACKAGES += \
113    dmabuf_dump
114
115# whitelisted app
116PRODUCT_COPY_FILES += \
117    device/google/crosshatch/qti_whitelist.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/sysconfig/qti_whitelist.xml
118
119PRODUCT_PACKAGES += \
120    llkd
121#PRODUCT_PROPERTY_OVERRIDES += \
122#    ro.khungtask.enable=false
123#
124
125# Enable retrofit dynamic partitions for all blueline
126# and crosshatch targets
127PRODUCT_USE_DYNAMIC_PARTITIONS := true
128PRODUCT_RETROFIT_DYNAMIC_PARTITIONS := true
129PRODUCT_PACKAGES += \
130    android.hardware.boot@1.0-impl.recovery \
131    bootctrl.sdm845 \
132    bootctrl.sdm845.recovery \
133    check_dynamic_partitions \
134
135AB_OTA_POSTINSTALL_CONFIG += \
136    RUN_POSTINSTALL_product=true \
137    POSTINSTALL_PATH_product=bin/check_dynamic_partitions \
138    FILESYSTEM_TYPE_product=ext4 \
139    POSTINSTALL_OPTIONAL_product=false \
140
141# Set thermal warm reset
142PRODUCT_PRODUCT_PROPERTIES += \
143    ro.thermal_warmreset = true \
144