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