Commit 35266d2c authored by Sooraj S's avatar Sooraj S 👽
Browse files

FP3: Fix Bluetooth

Bluetooth Audio is not working ATM

TODO Build vendor/qcom/opensource( bluetooth, bluetooth_ext, system/bt)
parent 8c0068a5
......@@ -29,6 +29,99 @@ ifeq ($(TARGET_DEVICE),FP3)
include $(call all-subdir-makefiles,$(LOCAL_PATH))
#A/B builds require us to create the mount points at compile time.
#Just creating it for all cases since it does not hurt.
FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/firmware_mnt
BT_FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/bt_firmware
DSP_MOUNT_POINT := $(TARGET_OUT_VENDOR)/dsp
FSG_MOUNT_POINT := $(TARGET_OUT_VENDOR)/fsg
ALL_DEFAULT_INSTALLED_MODULES += $(FIRMWARE_MOUNT_POINT) \
$(BT_FIRMWARE_MOUNT_POINT) \
$(DSP_MOUNT_POINT) \
$(FSG_MOUNT_POINT)
$(FIRMWARE_MOUNT_POINT):
@echo "Creating $(FIRMWARE_MOUNT_POINT)"
@mkdir -p $(TARGET_OUT_VENDOR)/firmware_mnt
ifneq ($(TARGET_MOUNT_POINTS_SYMLINKS),false)
@ln -sf /vendor/firmware_mnt $(TARGET_ROOT_OUT)/firmware
endif
$(BT_FIRMWARE_MOUNT_POINT):
@echo "Creating $(BT_FIRMWARE_MOUNT_POINT)"
@mkdir -p $(TARGET_OUT_VENDOR)/bt_firmware
ifneq ($(TARGET_MOUNT_POINTS_SYMLINKS),false)
@ln -sf /vendor/bt_firmware $(TARGET_ROOT_OUT)/bt_firmware
endif
$(DSP_MOUNT_POINT):
@echo "Creating $(DSP_MOUNT_POINT)"
@mkdir -p $(TARGET_OUT_VENDOR)/dsp
ifneq ($(TARGET_MOUNT_POINTS_SYMLINKS),false)
@ln -sf /vendor/dsp $(TARGET_ROOT_OUT)/dsp
endif
$(FSG_MOUNT_POINT):
@echo "Creating $(FSG_MOUNT_POINT)"
@mkdir -p $(TARGET_OUT_VENDOR)/fsg
DSP_SYMLINK := $(TARGET_OUT_VENDOR)/lib/dsp
$(DSP_SYMLINK): $(LOCAL_INSTALLED_MODULE)
@echo "Creating DSP folder symlink: $@"
@rm -rf $@
$(hide) ln -sf /vendor/dsp $@
ALL_DEFAULT_INSTALLED_MODULES += $(DSP_SYMLINK)
IMS_LIBS := libimscamera_jni.so libimsmedia_jni.so
IMS_SYMLINKS := $(addprefix $(TARGET_OUT_APPS_PRIVILEGED)/ims/lib/arm64/,$(notdir $(IMS_LIBS)))
$(IMS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "IMS lib link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /system/lib64/$(notdir $@) $@
ALL_DEFAULT_INSTALLED_MODULES += $(IMS_SYMLINKS)
RFS_MSM_ADSP_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/adsp/
$(RFS_MSM_ADSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MSM ADSP folder structure: $@"
@rm -rf $@/*
@mkdir -p $(dir $@)/readonly/vendor
$(hide) ln -sf /data/vendor/tombstones/rfs/lpass $@/ramdumps
$(hide) ln -sf /mnt/vendor/persist/rfs/msm/adsp $@/readwrite
$(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
$(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
$(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware
RFS_MSM_SLPI_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/slpi/
$(RFS_MSM_SLPI_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MSM SLPI folder structure: $@"
@rm -rf $@/*
@mkdir -p $(dir $@)/readonly/vendor
$(hide) ln -sf /data/vendor/tombstones/rfs/slpi $@/ramdumps
$(hide) ln -sf /mnt/vendor/persist/rfs/msm/slpi $@/readwrite
$(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
$(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
$(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware
RFS_MSM_MPSS_SYMLINKS := $(TARGET_OUT_VENDOR)/rfs/msm/mpss/
$(RFS_MSM_MPSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MSM MPSS folder structure: $@"
@rm -rf $@/*
@mkdir -p $(dir $@)/readonly/vendor
$(hide) ln -sf /data/vendor/tombstones/rfs/modem $@/ramdumps
$(hide) ln -sf /mnt/vendor/persist/rfs/msm/mpss $@/readwrite
$(hide) ln -sf /mnt/vendor/persist/rfs/shared $@/shared
$(hide) ln -sf /mnt/vendor/persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /vendor/firmware_mnt $@/readonly/firmware
$(hide) ln -sf /vendor/firmware $@/readonly/vendor/firmware
ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MSM_ADSP_SYMLINKS) $(RFS_MSM_MPSS_SYMLINKS) $(RFS_MSM_SLPI_SYMLINKS)
EGL_SYMLINK := $(TARGET_OUT_VENDOR)/lib/libGLESv2_adreno.so
$(EGL_SYMLINK): $(LOCAL_INSTALLED_MODULE)
@mkdir -p $(dir $@)
......@@ -36,4 +129,4 @@ $(EGL_SYMLINK): $(LOCAL_INSTALLED_MODULE)
ALL_DEFAULT_INSTALLED_MODULES += $(EGL_SYMLINK)
endif
\ No newline at end of file
endif
......@@ -73,7 +73,6 @@ BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200,n8 androidboot.console=ttyMSM0 an
BOARD_KERNEL_CMDLINE += ehci-hcd.park=3 lpm_levels.sleep_disabled=1 androidboot.bootdevice=7824900.sdhci earlycon=msm_serial_dm,0x78af000
BOARD_KERNEL_CMDLINE += firmware_class.path=/vendor/firmware_mnt/image androidboot.usbconfigfs=true loop.max_part=7
BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
#BOARD_KERNEL_SEPARATED_DT := true #TODO
BOARD_KERNEL_IMAGE_NAME := Image.gz-dtb
BOARD_KERNEL_SEPARATED_DTBO := true
TARGET_KERNEL_VERSION := 4.9
......@@ -120,7 +119,6 @@ BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_QCOM := true
QCOM_BT_USE_BTNV := true
# Graphics
MAX_EGL_CACHE_KEY_SIZE := 12*1024
MAX_EGL_CACHE_SIZE := 2048*1024
......
......@@ -21,31 +21,12 @@
#ifndef _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H
#pragma push_macro("PROPERTY_VALUE_MAX")
#include <cutils/properties.h>
#include <string.h>
static inline const char* BtmGetDefaultName()
{
char product_device[PROPERTY_VALUE_MAX];
property_get("ro.product.device", product_device, "");
if (strstr(product_device, "FP3"))
return "Fairphone 3";
return "Unknown";
}
#define BTM_DEF_LOCAL_NAME BtmGetDefaultName()
#define BLE_VND_INCLUDED TRUE
#define BTIF_HF_WBS_PREFERRED TRUE
#define BTM_WBS_INCLUDED TRUE
#define BTM_DEF_LOCAL_NAME "Fairphone 3"
#define MAX_ACL_CONNECTIONS 16
#define MAX_L2CAP_CHANNELS 16
#define BLE_VND_INCLUDED TRUE
#define BT_CLEAN_TURN_ON_DISABLED 1
#pragma pop_macro("PROPERTY_VALUE_MAX")
/* Increasing SEPs to 12 from 6 to support SHO/MCast i.e. two streams per codec */
#define AVDT_NUM_SEPS 12
#endif
......@@ -663,22 +663,4 @@
<instance>default</instance>
</interface>
</hal> -->
<!-- <hal format="hidl">
<name>motorola.hardware.health</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IMotHealth</name>
<instance>default</instance>
</interface>
</hal>
<hal format="hidl">
<name>motorola.hardware.audio.adspd</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IADSP</name>
<instance>default</instance>
</interface>
</hal> -->
</manifest>
......@@ -34,17 +34,30 @@ vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti
vendor/bin/btnvtool
vendor/bin/hci_qcomm_init
vendor/bin/wcnss_filter
vendor/lib64/hw/android.hardware.bluetooth@1.0-impl-qti.so
-vendor/lib64/hw/android.hardware.bluetooth@1.0-impl-qti.so
vendor/lib64/libbt-hidlclient.so
vendor/lib64/libbtnv.so
vendor/lib/hw/android.hardware.bluetooth@1.0-impl-qti.so
-vendor/lib/hw/android.hardware.bluetooth@1.0-impl-qti.so
vendor/lib/libbtnv.so
vendor/lib/libbt-hidlclient.so
vendor/etc/init/android.hardware.bluetooth@1.0-service-qti.rc
# Bluetooth (shared dependencies)
vendor/lib64/com.qualcomm.qti.ant@1.0.so
# -lib/com.qualcomm.qti.bluetooth_audio@1.0.so
# -lib64/com.qualcomm.qti.bluetooth_audio@1.0.so
# vendor/lib/com.qualcomm.qti.bluetooth_audio@1.0.so
vendor/lib/com.qualcomm.qti.ant@1.0.so
vendor/lib64/com.qualcomm.qti.ant@1.0.so
# BT- qcom opensource( bluetooth, bluetooth_ext, system/bt, hardware/qcom/bt)
# TODO This also requires vendor/qcom/proprietary/bluetooth/ and vendor/qcom/proprietary/interfaces/bluetooth_audio
# disable this for now
# lib/libbluetooth_qti.so
# lib64/libbluetooth_qti.so
# vendor/lib/libbthost_if.so
# vendor/lib64/libbthost_if.so
# etc/bluetooth/bt_profile.conf
# etc/bluetooth/interop_database.conf
# # Camera
# vendor/lib/hw/camera.msm8953.so
......@@ -766,6 +779,8 @@ vendor/lib/libqmi_client_qmux.so
vendor/lib/libqmi_csi.so
vendor/lib/libqmi_encdec.so
vendor/lib/libquipc_os_api.so
vendor/lib/libmdmdetect.so
-vendor/lib/libqmiservices.so
vendor/lib64/libdiag.so
-vendor/lib64/libdsi_netctrl.so
vendor/lib64/libdsutils.so
......@@ -782,6 +797,8 @@ vendor/lib64/libqmi_client_qmux.so
vendor/lib64/libqmi_csi.so
vendor/lib64/libqmi_encdec.so
vendor/lib64/libquipc_os_api.so
vendor/lib64/libmdmdetect.so
-vendor/lib64/libqmiservices.so
# Radio
# -vendor/app/datastatusnotification/datastatusnotification.apk|f73d163acf4a9748e27a666fabb382d341150e8e not found
......@@ -804,10 +821,8 @@ vendor/lib64/libquipc_os_api.so
# vendor/etc/data/dsi_config.xml
# vendor/etc/data/netmgr_config.xml
# vendor/etc/init/qcrild.rc
# vendor/lib/libmdmdetect.so
# vendor/lib/libpdmapper.so
# vendor/lib/libpdnotifier.so
# -vendor/lib/libqmiservices.so
# vendor/lib/com.qualcomm.qti.uceservice@2.0.so
# vendor/lib/vendor.qti.hardware.data.connection@1.0.so
# vendor/lib/vendor.qti.hardware.radio.am@1.0.so
......@@ -830,7 +845,6 @@ vendor/lib64/libquipc_os_api.so
# vendor/lib/libconfigdb.so
# vendor/lib64/liblqe.so
# vendor/lib/liblqe.so
# vendor/lib64/libmdmdetect.so
# vendor/lib64/libnetmgr.so
# vendor/lib/libnetmgr.so
# vendor/lib64/libnlnetmgr.so
......@@ -839,7 +853,6 @@ vendor/lib64/libquipc_os_api.so
# vendor/lib64/libnetmgr_rmnet_ext.so
# vendor/lib64/libpdmapper.so
# vendor/lib64/libpdnotifier.so
# -vendor/lib64/libqmiservices.so
# vendor/lib64/libril-qc-ltedirectdisc.so
# vendor/lib64/libril-qc-qmi-1.so
# vendor/lib/libril-qc-qmi-1.so
......
......@@ -50,4 +50,15 @@ PRODUCT_PROPERTY_OVERRIDES += \
#MM_GRAPHICS
PRODUCT_PROPERTY_OVERRIDES += \
ro.hardware.vulkan=adreno \
ro.hardware.egl=adreno
\ No newline at end of file
ro.hardware.egl=adreno
# Bluetooth
PRODUCT_PROPERTY_OVERRIDES += \
persist.vendor.btstack.enable.splita2dp=false \
bluetooth.hfp.client=1 \
persist.bluetooth.avrcpversion=avrcp16 \
bt.pts.certification=true \
vendor.bt.pts.pbap=true \
ro.qualcomm.bluetooth.ftp=false
# This requires com.qualcomm.qti.bluetooth_audio@1.0
# ro.bluetooth.library_name=libbluetooth_qti.so \
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment