• 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/bonito
20
21# define hardware platform
22PRODUCT_PLATFORM := sdm670
23
24# Enable updating of APEXes
25$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
26
27include device/google/bonito/device-audio-mfg.mk
28include device/google/bonito/device.mk
29
30# Bug 77867216
31PRODUCT_PROPERTY_OVERRIDES += audio.adm.buffering.ms=3
32PRODUCT_PROPERTY_OVERRIDES += vendor.audio.adm.buffering.ms=3
33PRODUCT_PROPERTY_OVERRIDES += audio_hal.period_multiplier=2
34PRODUCT_PROPERTY_OVERRIDES += af.fast_track_multiplier=1
35
36# Set c2 codec in default
37PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.ccodec=4
38PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.omx_default_rank=512
39
40# Setting vendor SPL
41VENDOR_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
42
43# Set boot SPL
44BOOT_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH)
45
46# MIDI feature
47PRODUCT_COPY_FILES += \
48    frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml
49
50# Audio low latency feature
51PRODUCT_COPY_FILES += \
52    frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml
53
54# Pro audio feature
55PRODUCT_COPY_FILES += \
56    frameworks/native/data/etc/android.hardware.audio.pro.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.pro.xml
57
58# Enable AAudio MMAP/NOIRQ data path.
59# 1 is AAUDIO_POLICY_NEVER  means only use Legacy path.
60# 2 is AAUDIO_POLICY_AUTO   means try MMAP then fallback to Legacy path.
61# 3 is AAUDIO_POLICY_ALWAYS means only use MMAP path.
62PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_policy=2
63# 1 is AAUDIO_POLICY_NEVER  means only use SHARED mode
64# 2 is AAUDIO_POLICY_AUTO   means try EXCLUSIVE then fallback to SHARED mode.
65# 3 is AAUDIO_POLICY_ALWAYS means only use EXCLUSIVE mode.
66PRODUCT_PROPERTY_OVERRIDES += aaudio.mmap_exclusive_policy=2
67
68# Increase the apparent size of a hardware burst from 1 msec to 2 msec.
69# A "burst" is the number of frames processed at one time.
70# That is an increase from 48 to 96 frames at 48000 Hz.
71# The DSP will still be bursting at 48 frames but AAudio will think the burst is 96 frames.
72# A low number, like 48, might increase power consumption or stress the system.
73PRODUCT_PROPERTY_OVERRIDES += aaudio.hw_burst_min_usec=2000
74
75# Set lmkd options
76PRODUCT_PRODUCT_PROPERTIES += \
77    ro.config.low_ram = false \
78    ro.lmk.log_stats = true \
79
80# A2DP offload enabled for compilation
81AUDIO_FEATURE_ENABLED_A2DP_OFFLOAD := true
82
83# A2DP offload supported
84PRODUCT_PROPERTY_OVERRIDES += \
85ro.bluetooth.a2dp_offload.supported=true
86
87# A2DP offload disabled (UI toggle property)
88PRODUCT_PROPERTY_OVERRIDES += \
89persist.bluetooth.a2dp_offload.disabled=false
90
91# A2DP offload DSP supported encoder list
92PRODUCT_PROPERTY_OVERRIDES += \
93persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac
94
95# Modem loging file
96PRODUCT_COPY_FILES += \
97    device/google/bonito/init.logging.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.$(PRODUCT_PLATFORM).logging.rc
98
99# Dumpstate HAL
100PRODUCT_PACKAGES += \
101    android.hardware.dumpstate@1.0-service.bonito
102
103# Enable retrofit dynamic partitions for all bonito
104# and sargo targets
105PRODUCT_USE_DYNAMIC_PARTITIONS := true
106PRODUCT_RETROFIT_DYNAMIC_PARTITIONS := true
107PRODUCT_PACKAGES += \
108    android.hardware.boot@1.0-impl.recovery \
109    bootctrl.sdm710 \
110    bootctrl.sdm710.recovery \
111    check_dynamic_partitions \
112
113AB_OTA_POSTINSTALL_CONFIG += \
114    RUN_POSTINSTALL_product=true \
115    POSTINSTALL_PATH_product=bin/check_dynamic_partitions \
116    FILESYSTEM_TYPE_product=ext4 \
117    POSTINSTALL_OPTIONAL_product=false \
118
119PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.use_color_management=true
120PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.protected_contents=true
121
122# Set thermal warm reset
123PRODUCT_PRODUCT_PROPERTIES += \
124    ro.thermal_warmreset = true \
125