101 lines
3.7 KiB
Makefile
101 lines
3.7 KiB
Makefile
#
|
|
# Copyright 2022 Rockchip Limited
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
|
|
ifeq ($(BOARD_BLUETOOTH_SUPPORT),true)
|
|
# Bluetooth HAL
|
|
PRODUCT_PACKAGES += \
|
|
libbt-vendor \
|
|
android.hardware.bluetooth@1.0-impl \
|
|
android.hardware.bluetooth@1.0-service \
|
|
android.hardware.bluetooth@1.0-service.rc \
|
|
libbluetooth_audio_session \
|
|
libbluetooth_audio_session_aidl \
|
|
android.hardware.bluetooth.audio-impl \
|
|
audio.bluetooth.default
|
|
|
|
|
|
# Set supported Bluetooth profiles to enabled
|
|
PRODUCT_PRODUCT_PROPERTIES += \
|
|
bluetooth.profile.asha.central.enabled?=true \
|
|
bluetooth.profile.a2dp.source.enabled?=true \
|
|
bluetooth.profile.avrcp.target.enabled?=true \
|
|
bluetooth.profile.bas.client.enabled?=true \
|
|
bluetooth.profile.gatt.enabled?=true \
|
|
bluetooth.profile.hfp.ag.enabled?=true \
|
|
bluetooth.profile.hid.device.enabled?=true \
|
|
bluetooth.profile.hid.host.enabled?=true \
|
|
bluetooth.profile.map.server.enabled?=true \
|
|
bluetooth.profile.opp.enabled?=true \
|
|
bluetooth.profile.pan.nap.enabled?=true \
|
|
bluetooth.profile.pan.panu.enabled?=true \
|
|
bluetooth.profile.pbap.server.enabled?=true \
|
|
bluetooth.profile.sap.server.enabled?=true
|
|
|
|
ifneq ($(filter atv box, $(strip $(TARGET_BOARD_PLATFORM_PRODUCT))), )
|
|
override PRODUCT_PRODUCT_PROPERTIES += bluetooth.core.gap.le.privacy.enabled=false
|
|
override PRODUCT_PRODUCT_PROPERTIES += bluetooth.profile.hfp.ag.enabled=false
|
|
override PRODUCT_PRODUCT_PROPERTIES += bluetooth.profile.map.server.enabled=false
|
|
override PRODUCT_PRODUCT_PROPERTIES += bluetooth.profile.pbap.server.enabled=false
|
|
endif
|
|
|
|
ifeq ($(strip $(BOARD_HAVE_BLUETOOTH)),true)
|
|
PRODUCT_PROPERTY_OVERRIDES += ro.rk.bt_enable=true
|
|
else
|
|
PRODUCT_PROPERTY_OVERRIDES += ro.rk.bt_enable=false
|
|
endif
|
|
|
|
ifeq ($(strip $(MT6622_BT_SUPPORT)),true)
|
|
PRODUCT_PROPERTY_OVERRIDES += ro.rk.btchip=mt6622
|
|
endif
|
|
|
|
ifeq ($(strip $(BLUETOOTH_USE_BPLUS)),true)
|
|
PRODUCT_PROPERTY_OVERRIDES += ro.rk.btchip=broadcom.bplus
|
|
endif
|
|
|
|
ifeq ($(strip $(BOARD_HAVE_BLUETOOTH_RTK)), true)
|
|
include hardware/realtek/rtkbt/rtkbt.mk
|
|
endif
|
|
|
|
ifeq ($(strip $(BOARD_HAVE_BLUETOOTH_AIC)), true)
|
|
PRODUCT_PACKAGES += libbt-vendor-aic
|
|
endif
|
|
|
|
# A2DP audio policy
|
|
PRODUCT_COPY_FILES += \
|
|
frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration_7_0.xml
|
|
|
|
# bluetooth audio policy
|
|
PRODUCT_COPY_FILES += \
|
|
frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml
|
|
|
|
# bt config for ap bt
|
|
ifneq ($(filter dr4-rk3568 nano-rk3568, $(lastword $(subst /, ,$(strip $(PRODUCT_KERNEL_DTS))))), )
|
|
PRODUCT_COPY_FILES += \
|
|
$(TARGET_DEVICE_DIR)/bt_vendor_uart1.conf:/vendor/etc/bluetooth/bt_vendor.conf
|
|
else
|
|
PRODUCT_COPY_FILES += \
|
|
$(TARGET_DEVICE_DIR)/bt_vendor.conf:/vendor/etc/bluetooth/bt_vendor.conf
|
|
endif
|
|
|
|
# Feature
|
|
PRODUCT_COPY_FILES += \
|
|
frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml
|
|
ifeq ($(BOARD_BLUETOOTH_LE_SUPPORT),true)
|
|
PRODUCT_COPY_FILES += \
|
|
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml
|
|
endif
|
|
endif
|