From 0fb3fbc1ee41c9123d876ce6dba98f84f8b58ecd Mon Sep 17 00:00:00 2001 From: SagarMakhar Date: Thu, 6 Oct 2022 14:21:13 +0000 Subject: [PATCH] sm7125-common: switch to AOSP Bluetooth implementation Signed-off-by: debdeep199x --- BoardConfigCommon.mk | 3 +- audio/vendor/audio_policy_configuration.xml | 25 ++--------- ...uetooth_qti_audio_policy_configuration.xml | 44 ------------------- bluetooth/include/bdroid_buildcfg.h | 7 +-- common.mk | 4 +- system.prop | 20 +-------- vendor.prop | 10 ++--- 7 files changed, 16 insertions(+), 97 deletions(-) delete mode 100644 audio/vendor/bluetooth_qti_audio_policy_configuration.xml diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index d145b3a..afd370a 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -54,7 +54,8 @@ USE_XML_AUDIO_POLICY_CONF := 1 # Bluetooth BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(COMMON_PATH)/bluetooth/include -TARGET_USE_QTI_BT_STACK := true +#TARGET_USE_QTI_BT_STACK := true +BOARD_HAVE_BLUETOOTH_QCOM := true # Bootloader TARGET_NO_BOOTLOADER := true diff --git a/audio/vendor/audio_policy_configuration.xml b/audio/vendor/audio_policy_configuration.xml index 692c061..1923f6f 100644 --- a/audio/vendor/audio_policy_configuration.xml +++ b/audio/vendor/audio_policy_configuration.xml @@ -271,21 +271,6 @@ - - - - - - - - - @@ -402,12 +387,6 @@ sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic"/> - - - @@ -505,6 +484,10 @@ + + + + diff --git a/audio/vendor/bluetooth_qti_audio_policy_configuration.xml b/audio/vendor/bluetooth_qti_audio_policy_configuration.xml deleted file mode 100644 index f0b2506..0000000 --- a/audio/vendor/bluetooth_qti_audio_policy_configuration.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bluetooth/include/bdroid_buildcfg.h b/bluetooth/include/bdroid_buildcfg.h index 2c71801..cbb54ab 100644 --- a/bluetooth/include/bdroid_buildcfg.h +++ b/bluetooth/include/bdroid_buildcfg.h @@ -64,11 +64,8 @@ static inline const char *BtmGetDefaultName() #define BTM_DEF_LOCAL_NAME BtmGetDefaultName() // Disables read remote device feature #define MAX_ACL_CONNECTIONS 16 -#define MAX_L2CAP_CHANNELS 32 +#define MAX_L2CAP_CHANNELS 16 #define BLE_VND_INCLUDED TRUE -#define GATT_MAX_PHY_CHANNEL 10 -// Skips conn update at conn completion -#define BT_CLEAN_TURN_ON_DISABLED 1 -#define AVDT_NUM_SEPS 35 +#define AVDT_NUM_SEPS 12 #endif diff --git a/common.mk b/common.mk index 866269b..30fcf16 100644 --- a/common.mk +++ b/common.mk @@ -50,7 +50,9 @@ PRODUCT_COPY_FILES += \ frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:/$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ frameworks/av/services/audiopolicy/config/default_volume_tables.xml:/$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \ frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:/$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \ - frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:/$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml + frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:/$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \ + frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:/$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.xml + PRODUCT_COPY_FILES += \ $(call find-copy-subdir-files,*,$(LOCAL_PATH)/audio/odm/,$(TARGET_COPY_OUT_ODM)/etc) \ diff --git a/system.prop b/system.prop index acc544b..461997c 100644 --- a/system.prop +++ b/system.prop @@ -12,25 +12,7 @@ ro.qc.sdk.audio.fluencetype=none # Bluetooth vendor.bluetooth.soc=cherokee -persist.vendor.bt.a2dp.aac_whitelist=false -persist.vendor.btstack.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aptxadaptive-aac-ldac -persist.vendor.btstack.enable.splita2dp=true -persist.vendor.btstack.enable.twsplus=true -persist.vendor.btstack.enable.twsplussho=true -ro.bluetooth.library_name=libbluetooth_qti.so -persist.bluetooth.bqr.event_mask=0x8000000E -persist.bluetooth.bqr.min_interval_ms=60000 -persist.bluetooth.bqr.choppy_threshold=9,6 -persist.bluetooth.disableabsvol=false -persist.vendor.service.bt.iot.enablelogging=true -persist.vendor.bluetooth.a2dp.hal.implementation=true -persist.vendor.bt.a2dp.hal.implementation=true -persist.bluetooth.disableinbandringing=false -persist.bluetooth.specificatcmdsenable=true -persist.vendor.bluetooth.modem_nv_support=true -persist.vendor.service.bdroid.soc.alwayson=true -persist.vendor.service.bt.iotinfo.report.enable=true -persist.vendor.btstack.aac_frm_ctl.enabled=true +ro.bluetooth.library_name=libbluetooth.so # Camera ro.camera.hfr.enable=1 diff --git a/vendor.prop b/vendor.prop index 014c7a9..6647183 100644 --- a/vendor.prop +++ b/vendor.prop @@ -38,7 +38,7 @@ aaudio.mmap_exclusive_policy=2 aaudio.hw_burst_min_usec=2000 vendor.audio.enable.mirrorlink=false persist.vendor.audio.voicecall.speaker.stereo=true -vendor.audio.feature.a2dp_offload.enable=true +vendor.audio.feature.a2dp_offload.enable=false vendor.audio.feature.afe_proxy.enable=true vendor.audio.feature.anc_headset.enable=true vendor.audio.feature.battery_listener.enable=true @@ -86,16 +86,14 @@ vendor.audio.feature.snd_mon.enable=true # Bluetooth persist.bluetooth.a2dp_offload.cap=sbc-aac-aptx-aptxhd-ldac -persist.bluetooth.a2dp_offload.disabled=false -persist.vendor.bt.aac_frm_ctl.enabled=true +persist.bluetooth.a2dp_offload.disabled=true persist.vendor.qcom.bluetooth.a2dp_offload_cap=sbc-aptx-aptxtws-aptxhd-aac-ldac-aptxadaptive -persist.vendor.qcom.bluetooth.aac_frm_ctl.enabled=true persist.vendor.qcom.bluetooth.aac_vbr_ctl.enabled=false -persist.vendor.qcom.bluetooth.enable.splita2dp=true +persist.vendor.qcom.bluetooth.enable.splita2dp=false persist.vendor.qcom.bluetooth.scram.enabled=true persist.vendor.qcom.bluetooth.soc=cherokee persist.vendor.qcom.bluetooth.twsp_state.enabled=false -ro.bluetooth.a2dp_offload.supported=true +ro.bluetooth.a2dp_offload.supported=false ro.vendor.bluetooth.wipower=false vendor.qcom.bluetooth.soc=cherokee