diff --git a/patches_treble_phh/platform_system_bt/0001-Make-BTM_BYPASS_EXTRA_ACL_SETUP-dynamic.patch b/patches_treble_phh/platform_system_bt/0001-Make-BTM_BYPASS_EXTRA_ACL_SETUP-dynamic.patch index 1060b4f..63d2eca 100644 --- a/patches_treble_phh/platform_system_bt/0001-Make-BTM_BYPASS_EXTRA_ACL_SETUP-dynamic.patch +++ b/patches_treble_phh/platform_system_bt/0001-Make-BTM_BYPASS_EXTRA_ACL_SETUP-dynamic.patch @@ -1,7 +1,7 @@ -From 5829017394d9c90cf4456f39401db5c57ae54d97 Mon Sep 17 00:00:00 2001 +From 1e10b099147fb65fe0c48168c003e647c5000801 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Tue, 20 Feb 2018 23:04:50 +0100 -Subject: [PATCH 1/4] Make BTM_BYPASS_EXTRA_ACL_SETUP dynamic +Subject: [PATCH 1/5] Make BTM_BYPASS_EXTRA_ACL_SETUP dynamic Change-Id: Icb0868566b29b053ed7e83c9fd32e225af3f2e46 --- diff --git a/patches_treble_phh/platform_system_bt/0002-Add-props-to-control-supported-features-and-states-1.patch b/patches_treble_phh/platform_system_bt/0002-Add-props-to-control-supported-features-and-states-1.patch index 9b47965..cf40a17 100644 --- a/patches_treble_phh/platform_system_bt/0002-Add-props-to-control-supported-features-and-states-1.patch +++ b/patches_treble_phh/platform_system_bt/0002-Add-props-to-control-supported-features-and-states-1.patch @@ -1,7 +1,7 @@ -From eeea95f0991885edec372341a77c440da9298706 Mon Sep 17 00:00:00 2001 +From 3306f103b490afb20cf47fa7468dc836e78d34b4 Mon Sep 17 00:00:00 2001 From: penn5 Date: Mon, 4 Mar 2019 22:21:07 +0000 -Subject: [PATCH 2/4] Add props to control supported features and states (#1) +Subject: [PATCH 2/5] Add props to control supported features and states (#1) * Add bitmask for supported fields Use persist.sys.bt.unsupport.states, defaults to 0, left-aligned. diff --git a/patches_treble_phh/platform_system_bt/0003-Add-persist.sys.phh.disable_a2dp_offload-property-to.patch b/patches_treble_phh/platform_system_bt/0003-Add-persist.sys.phh.disable_a2dp_offload-property-to.patch index 5821b23..8b9b3e1 100644 --- a/patches_treble_phh/platform_system_bt/0003-Add-persist.sys.phh.disable_a2dp_offload-property-to.patch +++ b/patches_treble_phh/platform_system_bt/0003-Add-persist.sys.phh.disable_a2dp_offload-property-to.patch @@ -1,7 +1,7 @@ -From edfc435eb11aeaf581084e55b4295cecb0a3fe47 Mon Sep 17 00:00:00 2001 +From 8d54929ab202c1d6423007f4f60d6ae1dc867649 Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 25 May 2020 21:25:12 +0200 -Subject: [PATCH 3/4] Add persist.sys.phh.disable_a2dp_offload property to +Subject: [PATCH 3/5] Add persist.sys.phh.disable_a2dp_offload property to force a2dp offload --- diff --git a/patches_treble_phh/platform_system_bt/0004-Add-a-property-to-disable-eSCO.patch b/patches_treble_phh/platform_system_bt/0004-Add-a-property-to-disable-eSCO.patch index e790b2f..4b6d682 100644 --- a/patches_treble_phh/platform_system_bt/0004-Add-a-property-to-disable-eSCO.patch +++ b/patches_treble_phh/platform_system_bt/0004-Add-a-property-to-disable-eSCO.patch @@ -1,7 +1,7 @@ -From 362b7dad26bf6bb77f82bed4f15ff14dc8b8d7cc Mon Sep 17 00:00:00 2001 +From b6d920abef0b98d9867063d0c6687b219651069f Mon Sep 17 00:00:00 2001 From: Pierre-Hugues Husson Date: Mon, 7 Jun 2021 17:09:13 -0400 -Subject: [PATCH 4/4] Add a property to disable eSCO +Subject: [PATCH 4/5] Add a property to disable eSCO eSCO is troublesome on some old devices. It is unknown whether it applies to any Treble device, but investigation diff --git a/patches_treble_phh/platform_system_bt/0005-Add-option-to-change-eSCO-Transport-Unit-Size.patch b/patches_treble_phh/platform_system_bt/0005-Add-option-to-change-eSCO-Transport-Unit-Size.patch new file mode 100644 index 0000000..dcce031 --- /dev/null +++ b/patches_treble_phh/platform_system_bt/0005-Add-option-to-change-eSCO-Transport-Unit-Size.patch @@ -0,0 +1,43 @@ +From b75f399f488872a994c803b31d69edd47283e1e7 Mon Sep 17 00:00:00 2001 +From: Alberto Ponces +Date: Thu, 17 Jun 2021 15:48:53 +0100 +Subject: [PATCH 5/5] Add option to change eSCO Transport Unit Size + +Fixes Bluetooth calls on some Samsung devices if set to 16. + +It's still unknown if other Treble devices need other values so it's preferred to leave this able to be configured with another integer. + +This applies to mSBC T2, T1 and CVSD codecs +--- + device/src/esco_parameters.cc | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/device/src/esco_parameters.cc b/device/src/esco_parameters.cc +index cf1fea211..ea28dfa68 100644 +--- a/device/src/esco_parameters.cc ++++ b/device/src/esco_parameters.cc +@@ -21,7 +21,9 @@ + #include "bt_target.h" + #include "device/include/esco_parameters.h" + +-static const enh_esco_params_t default_esco_parameters[ESCO_NUM_CODECS] = { ++#include ++ ++static enh_esco_params_t default_esco_parameters[ESCO_NUM_CODECS] = { + // CVSD + {.transmit_bandwidth = TXRX_64KBITS_RATE, + .receive_bandwidth = TXRX_64KBITS_RATE, +@@ -144,5 +146,10 @@ enh_esco_params_t esco_parameters_for_codec(esco_codec_t codec) { + CHECK(codec >= 0) << "codec index " << (int)codec << "< 0"; + CHECK(codec < ESCO_NUM_CODECS) << "codec index " << (int)codec << " > " + << ESCO_NUM_CODECS; ++ int escoTransportUnitSize = property_get_int32("persist.sys.bt.esco_transport_unit_size", 0); ++ if(escoTransportUnitSize) { ++ default_esco_parameters[codec].input_transport_unit_size = escoTransportUnitSize; ++ default_esco_parameters[codec].output_transport_unit_size = escoTransportUnitSize; ++ } + return default_esco_parameters[codec]; + } +-- +2.25.1 +