From e955593eabb5ea03236800f8ad2c549863e747ca Mon Sep 17 00:00:00 2001 From: dianlujitao Date: Mon, 5 Apr 2021 11:47:38 +0800 Subject: Revert "sdm660-common: Drop QTI bluetooth stack" This reverts commit d08d3a25d6a8a81dc59fb2d6d9503fe525b1d0af. Change-Id: I8e2ce16722b0e9727f6962530d4fcaba91606d7f --- BoardConfigCommon.mk | 1 + audio/audio_policy_configuration.xml | 24 +- ..._policy_configuration_a2dp_offload_disabled.xml | 369 +++++++++++++++++++++ ...icy_configuration_a2dp_offload_disabled_qti.xml | 369 +++++++++++++++++++++ audio/bluetooth_qti_audio_policy_configuration.xml | 44 +++ bluetooth/bdroid_buildcfg.h | 13 +- configs/component-overrides-qti.xml | 21 ++ configs/component-overrides.xml | 1 + properties.mk | 10 + proprietary-files.txt | 12 +- sdm660.mk | 12 +- 11 files changed, 861 insertions(+), 15 deletions(-) create mode 100644 audio/audio_policy_configuration_a2dp_offload_disabled.xml create mode 100644 audio/audio_policy_configuration_a2dp_offload_disabled_qti.xml create mode 100644 audio/bluetooth_qti_audio_policy_configuration.xml create mode 100644 configs/component-overrides-qti.xml diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index dba983f..7b27158 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -72,6 +72,7 @@ AUDIO_FEATURE_ENABLED_EXT_AMPLIFIER := false # Bluetooth BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(COMMON_PATH)/bluetooth +TARGET_USE_QTI_BT_STACK := true # Camera TARGET_USES_QTI_CAMERA_DEVICE := true diff --git a/audio/audio_policy_configuration.xml b/audio/audio_policy_configuration.xml index 544e2f7..a1fd6ed 100644 --- a/audio/audio_policy_configuration.xml +++ b/audio/audio_policy_configuration.xml @@ -238,6 +238,21 @@ + + + + + + + + + @@ -322,6 +337,12 @@ sources="Built-In Mic,Built-In Back Mic"/> + + + @@ -353,9 +374,6 @@ - - - diff --git a/audio/audio_policy_configuration_a2dp_offload_disabled.xml b/audio/audio_policy_configuration_a2dp_offload_disabled.xml new file mode 100644 index 0000000..544e2f7 --- /dev/null +++ b/audio/audio_policy_configuration_a2dp_offload_disabled.xml @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + + Earpiece + Speaker + Telephony Tx + Built-In Mic + Built-In Back Mic + FM Tuner + Telephony Rx + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/audio_policy_configuration_a2dp_offload_disabled_qti.xml b/audio/audio_policy_configuration_a2dp_offload_disabled_qti.xml new file mode 100644 index 0000000..f8eabbd --- /dev/null +++ b/audio/audio_policy_configuration_a2dp_offload_disabled_qti.xml @@ -0,0 +1,369 @@ + + + + + + + + + + + + + + + + + Earpiece + Speaker + Telephony Tx + Built-In Mic + Built-In Back Mic + FM Tuner + Telephony Rx + + Speaker + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/audio/bluetooth_qti_audio_policy_configuration.xml b/audio/bluetooth_qti_audio_policy_configuration.xml new file mode 100644 index 0000000..f0b2506 --- /dev/null +++ b/audio/bluetooth_qti_audio_policy_configuration.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bluetooth/bdroid_buildcfg.h b/bluetooth/bdroid_buildcfg.h index 217f59b..33a8ca9 100644 --- a/bluetooth/bdroid_buildcfg.h +++ b/bluetooth/bdroid_buildcfg.h @@ -1,8 +1,6 @@ /* - * * Copyright (c) 2013, The Linux Foundation. All rights reserved. - * Not a Contribution, Apache license notifications and license are retained - * for attribution purposes only. + * Not a Contribution. * * Copyright (C) 2012 The Android Open Source Project * @@ -23,8 +21,11 @@ #define _BDROID_BUILDCFG_H // Disables read remote device feature #define MAX_ACL_CONNECTIONS 16 -#define MAX_L2CAP_CHANNELS 16 +#define MAX_L2CAP_CHANNELS 32 #define BLE_VND_INCLUDED TRUE -/* Increasing SEPs to 12 from 6 to support SHO/MCast i.e. two streams per codec */ -#define AVDT_NUM_SEPS 12 +#define GATT_MAX_PHY_CHANNEL 10 +// skips conn update at conn completion +#define BT_CLEAN_TURN_ON_DISABLED 1 + +#define AVDT_NUM_SEPS 35 #endif diff --git a/configs/component-overrides-qti.xml b/configs/component-overrides-qti.xml new file mode 100644 index 0000000..4e257b0 --- /dev/null +++ b/configs/component-overrides-qti.xml @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/configs/component-overrides.xml b/configs/component-overrides.xml index 99c2115..2442587 100644 --- a/configs/component-overrides.xml +++ b/configs/component-overrides.xml @@ -16,6 +16,7 @@ + diff --git a/properties.mk b/properties.mk index 44ee495..ecdad15 100644 --- a/properties.mk +++ b/properties.mk @@ -32,6 +32,7 @@ PRODUCT_PROPERTY_OVERRIDES += \ persist.vendor.audio.hifi.int_codec=true \ ro.af.client_heap_size_kbyte=7168 \ vendor.audio.volume.headset.gain.depcal=true \ + persist.vendor.bt.aac_frm_ctl.enabled=true \ vendor.audio.spkr_prot.tx.sampling_rate=48000 PRODUCT_PROPERTY_OVERRIDES += \ @@ -82,11 +83,20 @@ PRODUCT_PROPERTY_OVERRIDES += \ ro.config.vc_call_vol_steps=7 \ vendor.audio.adm.buffering.ms=6 +PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ + persist.bluetooth.a2dp_offload.disabled=false \ + ro.bluetooth.a2dp_offload.supported=true \ + vendor.audio.feature.a2dp_offload.enable=true + # Bluetooth PRODUCT_PROPERTY_OVERRIDES += \ vendor.qcom.bluetooth.soc=cherokee PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ + persist.vendor.bt.a2dp.aac_whitelist=false \ + persist.vendor.qcom.bluetooth.enable.splita2dp=true \ + persist.vendor.qcom.bluetooth.a2dp_offload_cap=sbc-aptx-aptxhd-aac-ldac \ + ro.bluetooth.library_name=libbluetooth_qti.so \ vendor.bluetooth.soc=cherokee # Camera diff --git a/proprietary-files.txt b/proprietary-files.txt index 21cb3a0..285d3cb 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -68,6 +68,12 @@ vendor/lib/soundfx/libqcbassboost.so|73339450a42b598a3c13e67b3d4a2266d986fea2 vendor/lib/soundfx/libqcreverb.so|eb437cd5e264b1adb4546c6a5617c5da17be5839 vendor/lib/soundfx/libqcvirt.so|ee9eaa81bb24ac0379e06b44ef257967a4d32614 +# Audio (A2dp) - from jasmine +vendor/lib/btaudio_offload_if.so|d9a9795e173dffd4b5ee000acac66c1ad6f1648c +vendor/lib/hw/audio.bluetooth_qti.default.so|c64b101dd33042d2f702ab5059231ca9684fc1d0 +vendor/lib/hw/vendor.qti.hardware.bluetooth_audio@2.0-impl.so|947afef6bf7a05a9a2b45022edfed06bd7c00e64 +vendor/lib/libbluetooth_audio_session_qti.so|53fd0369c50fbaef12c22e25e3073a6fc9f05bb7 + # Bluetooth - from jasmine vendor/bin/hw/android.hardware.bluetooth@1.0-service-qti|57a0a575a2b1b96176fda1bcb84ea8371c4070d1 vendor/etc/init/android.hardware.bluetooth@1.0-service-qti.rc|a979981c55f3dcaf6cf2212e71b901ca4d58b959 @@ -78,9 +84,9 @@ vendor/lib64/libbtnv.so|08fc5c0a38eca63ebe6f0cd854f6525537141d44 vendor/lib64/vendor.qti.hardware.bluetooth_sar@1.0.so|9346946b110086a6b473c8226e072e9a0cdbb87e vendor/lib64/vendor.qti.hardware.fm@1.0.so|073cace3aa8d0ffa025d9df67c45f8a907109339 -# Bluetooth (aptX) - from crosshatch-user 10 QP1A.190711.020 5800535 release-keys -product/lib64/libaptX_encoder.so|df1c89d7af1bb35808d5fe3496b04ba066c10cbc -product/lib64/libaptXHD_encoder.so|e13fa70c97caaa24d061678bdee608eb8850a69e +# Bluetooth (aptX) - from jasmine +vendor/lib/rfsa/adsp/capi_v2_aptX_Classic.so|8305c614ebf13f84f15989631b8fdfdb9828d9be +vendor/lib/rfsa/adsp/capi_v2_aptX_HD.so|eb0e912d25b06f977d5a89345c72d142b7ffb8ae # Charger - from jasmine vendor/bin/hvdcp_opti|120837d6d44abfd86515731dd26183be9cdd5596 diff --git a/sdm660.mk b/sdm660.mk index f7c650e..be347bd 100644 --- a/sdm660.mk +++ b/sdm660.mk @@ -97,9 +97,11 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ android.hardware.bluetooth.audio@2.0-impl:32 \ - audio.bluetooth.default + audio.bluetooth.default \ + vendor.qti.hardware.bluetooth_audio@2.0.vendor PRODUCT_PACKAGES += \ + liba2dpoffload \ libhdmiedid \ libhfp \ libsndmonitor @@ -107,8 +109,11 @@ PRODUCT_PACKAGES += \ PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \ $(LOCAL_PATH)/audio/audio_output_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_output_policy.conf \ - $(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ + $(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/audio_policy_configuration.xml \ + $(LOCAL_PATH)/audio/audio_policy_configuration_a2dp_offload_disabled.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ + $(LOCAL_PATH)/audio/audio_policy_configuration_a2dp_offload_disabled_qti.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio/audio_policy_configuration_a2dp_offload_disabled.xml \ $(LOCAL_PATH)/audio/audio_tuning_mixer.txt:$(TARGET_COPY_OUT_VENDOR)/etc/audio_tuning_mixer.txt \ + $(LOCAL_PATH)/audio/bluetooth_qti_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_qti_audio_policy_configuration.xml \ $(LOCAL_PATH)/audio/graphite_ipc_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/graphite_ipc_platform_info.xml \ $(LOCAL_PATH)/audio/listen_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/listen_platform_info.xml @@ -157,7 +162,8 @@ PRODUCT_PACKAGES += \ # Component overrides PRODUCT_COPY_FILES += \ - $(LOCAL_PATH)/configs/component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/component-overrides.xml + $(LOCAL_PATH)/configs/component-overrides.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sysconfig/component-overrides.xml \ + $(LOCAL_PATH)/configs/component-overrides-qti.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/component-overrides.xml # Display PRODUCT_PACKAGES += \ -- cgit v1.2.3