1#
2# Copyright (C) 2021 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# Restrict the visibility of Android.bp files to improve build analysis time
18$(call inherit-product-if-exists, vendor/google/products/sources_pixel.mk)
19
20TARGET_LINUX_KERNEL_VERSION := $(RELEASE_KERNEL_RIPCURRENT_VERSION)
21TARGET_KERNEL_DIR ?= $(RELEASE_KERNEL_RIPCURRENT_DIR)
22TARGET_BOARD_KERNEL_HEADERS ?= $(RELEASE_KERNEL_RIPCURRENT_DIR)/kernel-headers
23
24ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
25    USE_UWBFIELDTESTQM := true
26endif
27ifeq ($(filter factory_ripcurrent, $(TARGET_PRODUCT)),)
28    include device/google/shusky/uwb/uwb_calibration.mk
29endif
30
31
32$(call inherit-product-if-exists, vendor/google_devices/shusky/prebuilts/device-vendor-ripcurrent.mk)
33$(call inherit-product-if-exists, vendor/google_devices/zuma/prebuilts/device-vendor.mk)
34$(call inherit-product-if-exists, vendor/google_devices/zuma/proprietary/device-vendor.mk)
35$(call inherit-product-if-exists, vendor/google_devices/shusky/proprietary/ripcurrent/device-vendor-ripcurrent.mk)
36$(call inherit-product-if-exists, vendor/qorvo/uwb/qm35-hal/Device.mk)
37
38CAMERA_PRODUCT ?= ripcurrent
39
40include device/google/shusky/audio/ripcurrent/audio-tables.mk
41include device/google/shusky/camera/camera.mk
42include device/google/zuma/device-shipping-common.mk
43include hardware/google/pixel/vibrator/cs40l26/device-stereo.mk
44include device/google/gs-common/bcmbt/bluetooth.mk
45include device/google/gs-common/gps/brcm/cbd_gps.mk
46include device/google/gs-common/touch/stm/stm20.mk
47
48# display
49DEVICE_PACKAGE_OVERLAYS += device/google/shusky/ripcurrent/overlay
50
51# Init files
52PRODUCT_COPY_FILES += \
53	device/google/shusky/conf/init.ripcurrent.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.ripcurrent.rc
54
55# Recovery files
56PRODUCT_COPY_FILES += \
57        device/google/shusky/conf/init.recovery.device.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.ripcurrent.rc
58
59# NFC
60PRODUCT_COPY_FILES += \
61	frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \
62	frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \
63	frameworks/native/data/etc/android.hardware.nfc.hcef.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hcef.xml \
64	frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml \
65	frameworks/native/data/etc/android.hardware.nfc.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.ese.xml \
66	device/google/shusky/nfc/libnfc-hal-st-disable.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-hal-st.conf \
67	device/google/shusky/nfc/libnfc-hal-st.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-hal-st-enable.conf \
68	device/google/shusky/nfc/libnfc-nci.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf
69
70PRODUCT_PACKAGES += \
71	$(RELEASE_PACKAGE_NFC_STACK) \
72	Tag \
73	android.hardware.nfc-service.st
74
75# SecureElement
76PRODUCT_PACKAGES += \
77	android.hardware.secure_element-service.thales
78
79PRODUCT_COPY_FILES += \
80	frameworks/native/data/etc/android.hardware.se.omapi.ese.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.ese.xml \
81	frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml \
82	device/google/shusky/nfc/libse-gto-hal-disable.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal.conf
83
84
85# Bluetooth HAL
86PRODUCT_COPY_FILES += \
87	device/google/shusky/bluetooth/bt_vendor_overlay_ripcurrent.conf:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth/bt_vendor_overlay.conf
88PRODUCT_PROPERTY_OVERRIDES += \
89    ro.bluetooth.a2dp_offload.supported=true \
90    persist.bluetooth.a2dp_offload.disabled=false \
91    persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac-opus
92
93# Spatial Audio
94PRODUCT_PACKAGES += \
95	libspatialaudio
96
97# declare use of spatial audio
98PRODUCT_PROPERTY_OVERRIDES += \
99       ro.audio.spatializer_enabled=true
100
101# DCK properties based on target
102PRODUCT_PROPERTY_OVERRIDES += \
103    ro.gms.dck.eligible_wcc=3 \
104    ro.gms.dck.se_capability=1
105
106# Bluetooth hci_inject test tool
107PRODUCT_PACKAGES_DEBUG += \
108    hci_inject
109
110# Bluetooth OPUS codec
111PRODUCT_PRODUCT_PROPERTIES += \
112    persist.bluetooth.opus.enabled=true
113
114# Bluetooth SAR test tool
115PRODUCT_PACKAGES_DEBUG += \
116    sar_test
117
118# Bluetooth EWP test tool
119PRODUCT_PACKAGES_DEBUG += \
120    ewp_tool
121
122# Bluetooth AAC VBR
123PRODUCT_PRODUCT_PROPERTIES += \
124    persist.bluetooth.a2dp_aac.vbr_supported=true
125
126# Override BQR mask to enable LE Audio Choppy report, remove BTRT logging
127ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
128PRODUCT_PRODUCT_PROPERTIES += \
129    persist.bluetooth.bqr.event_mask=295006 \
130    persist.bluetooth.bqr.vnd_quality_mask=29 \
131    persist.bluetooth.bqr.vnd_trace_mask=0
132else
133PRODUCT_PRODUCT_PROPERTIES += \
134    persist.bluetooth.bqr.event_mask=295006 \
135    persist.bluetooth.bqr.vnd_quality_mask=16 \
136    persist.bluetooth.bqr.vnd_trace_mask=0
137endif
138
139# default BDADDR for EVB only
140PRODUCT_PROPERTY_OVERRIDES += \
141	ro.vendor.bluetooth.evb_bdaddr="22:22:22:33:44:55"
142
143# Spatial Audio
144PRODUCT_PACKAGES += \
145	libspatialaudio \
146	librondo
147
148# Bluetooth Super Wide Band
149PRODUCT_PRODUCT_PROPERTIES += \
150	bluetooth.hfp.swb.supported=true
151
152# Bluetooth LE Audio
153PRODUCT_PRODUCT_PROPERTIES += \
154	ro.bluetooth.leaudio_switcher.supported=true \
155	bluetooth.profile.bap.unicast.client.enabled=true \
156	bluetooth.profile.csip.set_coordinator.enabled=true \
157	bluetooth.profile.hap.client.enabled=true \
158	bluetooth.profile.mcp.server.enabled=true \
159	bluetooth.profile.ccp.server.enabled=true \
160	bluetooth.profile.vcp.controller.enabled=true
161
162ifeq ($(RELEASE_PIXEL_BROADCAST_ENABLED), true)
163PRODUCT_PRODUCT_PROPERTIES += \
164	bluetooth.profile.bap.broadcast.assist.enabled=true \
165	bluetooth.profile.bap.broadcast.source.enabled=true
166endif
167
168# Bluetooth LE Audio enable hardware offloading
169PRODUCT_PRODUCT_PROPERTIES += \
170	ro.bluetooth.leaudio_offload.supported=true \
171	persist.bluetooth.leaudio_offload.disabled=false
172
173# Bluetooth LE Auido offload capabilities setting
174PRODUCT_COPY_FILES += \
175	device/google/shusky/bluetooth/le_audio_codec_capabilities.xml:$(TARGET_COPY_OUT_VENDOR)/etc/le_audio_codec_capabilities.xml
176
177# Bluetooth LE Audio CIS handover to SCO
178# Set the property only for the controller couldn't support CIS/SCO simultaneously. More detailed in b/242908683.
179PRODUCT_PRODUCT_PROPERTIES += \
180	persist.bluetooth.leaudio.notify.idle.during.call=true
181
182# Support LE Audio dual mic SWB call
183PRODUCT_PRODUCT_PROPERTIES += \
184    bluetooth.leaudio.dual_bidirection_swb.supported=true
185
186# Support LE & Classic concurrent encryption (b/330704060)
187PRODUCT_PRODUCT_PROPERTIES += \
188    bluetooth.ble.allow_enc_with_bredr=true
189
190# Keymaster HAL
191#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service
192
193# Gatekeeper HAL
194#LOCAL_GATEKEEPER_PRODUCT_PACKAGE ?= android.hardware.gatekeeper@1.0-service.software
195
196
197# Gatekeeper
198# PRODUCT_PACKAGES += \
199# 	android.hardware.gatekeeper@1.0-service.software
200
201# Keymint replaces Keymaster
202# PRODUCT_PACKAGES += \
203# 	android.hardware.security.keymint-service
204
205# Keymaster
206#PRODUCT_PACKAGES += \
207#	android.hardware.keymaster@4.0-impl \
208#	android.hardware.keymaster@4.0-service
209
210#PRODUCT_PACKAGES += android.hardware.keymaster@4.0-service.remote
211#PRODUCT_PACKAGES += android.hardware.keymaster@4.1-service.remote
212#LOCAL_KEYMASTER_PRODUCT_PACKAGE := android.hardware.keymaster@4.1-service
213#LOCAL_KEYMASTER_PRODUCT_PACKAGE ?= android.hardware.keymaster@4.1-service
214
215# PRODUCT_PROPERTY_OVERRIDES += \
216# 	ro.hardware.keystore_desede=true \
217# 	ro.hardware.keystore=software \
218# 	ro.hardware.gatekeeper=software
219
220# PowerStats HAL
221PRODUCT_SOONG_NAMESPACES += \
222    device/google/shusky/powerstats/ripcurrent
223
224# WiFi Overlay
225PRODUCT_PACKAGES += \
226    WifiOverlay2023
227
228# Trusty liboemcrypto.so
229PRODUCT_SOONG_NAMESPACES += vendor/google_devices/shusky/prebuilts
230
231# UWB
232PRODUCT_SOONG_NAMESPACES += \
233    device/google/shusky/uwb
234
235# Location
236# SDK build system
237include device/google/gs-common/gps/brcm/device.mk
238
239PRODUCT_COPY_FILES += \
240       device/google/shusky/location/gps.cer:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.cer
241
242ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
243        PRODUCT_COPY_FILES += \
244            device/google/shusky/location/lhd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \
245            device/google/shusky/location/scd.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf \
246            device/google/shusky/location/gps.xml:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml
247else
248        PRODUCT_COPY_FILES += \
249            device/google/shusky/location/lhd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/lhd.conf \
250            device/google/shusky/location/scd_user.conf:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/scd.conf \
251            device/google/shusky/location/gps_user.xml:$(TARGET_COPY_OUT_VENDOR)/etc/gnss/gps.xml
252endif
253
254# Set zram size
255PRODUCT_VENDOR_PROPERTIES += \
256	vendor.zram.size=50p \
257	persist.device_config.configuration.disable_rescue_party=true
258
259PRODUCT_VENDOR_PROPERTIES += \
260    persist.vendor.udfps.als_feed_forward_supported=true \
261    persist.vendor.udfps.lhbm_controlled_in_hal_supported=true
262
263# Camera Vendor property
264PRODUCT_VENDOR_PROPERTIES += \
265    persist.vendor.camera.front_720P_always_binning=true
266
267# Vibrator HAL
268$(call soong_config_set,haptics,kernel_ver,v$(subst .,_,$(TARGET_LINUX_KERNEL_VERSION)))
269ACTUATOR_MODEL := luxshare_ict_081545
270PRODUCT_VENDOR_PROPERTIES += \
271    persist.vendor.vibrator.hal.chirp.enabled=0 \
272    ro.vendor.vibrator.hal.device.mass=0.222 \
273    ro.vendor.vibrator.hal.loc.coeff=2.8
274
275# PKVM Memory Reclaim
276PRODUCT_VENDOR_PROPERTIES += \
277    hypervisor.memory_reclaim.supported=1
278