mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-22 20:15:32 -04:00
universal7885: Drop bt call patch
No longer required as of R9.5
This commit is contained in:
parent
9c844c2fae
commit
06f0ba16cc
2 changed files with 0 additions and 112 deletions
|
|
@ -1,105 +0,0 @@
|
||||||
From 50bffe91bbb6fec8405e4bd6229c414f68bfb804 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alberto Ponces <ponces26@gmail.com>
|
|
||||||
Date: Tue, 15 Jun 2021 15:21:27 +0530
|
|
||||||
Subject: [PATCH] Add option to change eSCO Transport Unit Size to 16
|
|
||||||
|
|
||||||
* Fixes bluetooth calls on samsung {m20lte, m30lte, a30, a40}
|
|
||||||
|
|
||||||
[SamarV-121: Make it conditional and apply it for mSBC T1, CVSD codec as well]
|
|
||||||
|
|
||||||
Change-Id: Id1a64b97a105f16c29343a489a1b9560736b8647
|
|
||||||
Signed-off-by: SamarV-121 <samarvispute121@gmail.com>
|
|
||||||
---
|
|
||||||
device/src/esco_parameters.cc | 22 +++++++++++-----------
|
|
||||||
internal_include/bt_target.h | 10 ++++++++++
|
|
||||||
2 files changed, 21 insertions(+), 11 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/device/src/esco_parameters.cc b/device/src/esco_parameters.cc
|
|
||||||
index e2a6eeccef..84a235ed72 100644
|
|
||||||
--- a/device/src/esco_parameters.cc
|
|
||||||
+++ b/device/src/esco_parameters.cc
|
|
||||||
@@ -17,7 +17,7 @@
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
#include "base/logging.h"
|
|
||||||
-
|
|
||||||
+#include "bt_target.h"
|
|
||||||
#include "device/include/esco_parameters.h"
|
|
||||||
|
|
||||||
static const enh_esco_params_t default_esco_parameters[ESCO_NUM_CODECS] = {
|
|
||||||
@@ -49,8 +49,8 @@ static const enh_esco_params_t default_esco_parameters[ESCO_NUM_CODECS] = {
|
|
||||||
.output_pcm_payload_msb_position = 0,
|
|
||||||
.input_data_path = ESCO_DATA_PATH_PCM,
|
|
||||||
.output_data_path = ESCO_DATA_PATH_PCM,
|
|
||||||
- .input_transport_unit_size = 0x00,
|
|
||||||
- .output_transport_unit_size = 0x00,
|
|
||||||
+ .input_transport_unit_size = ESCO_TRANSPORT_UNIT_SIZE,
|
|
||||||
+ .output_transport_unit_size = ESCO_TRANSPORT_UNIT_SIZE,
|
|
||||||
.max_latency_ms = 0xFFFF, // Don't care
|
|
||||||
.packet_types = (ESCO_PKT_TYPES_MASK_HV1 | ESCO_PKT_TYPES_MASK_HV2 |
|
|
||||||
ESCO_PKT_TYPES_MASK_HV3),
|
|
||||||
@@ -84,8 +84,8 @@ static const enh_esco_params_t default_esco_parameters[ESCO_NUM_CODECS] = {
|
|
||||||
.output_pcm_payload_msb_position = 0,
|
|
||||||
.input_data_path = ESCO_DATA_PATH_PCM,
|
|
||||||
.output_data_path = ESCO_DATA_PATH_PCM,
|
|
||||||
- .input_transport_unit_size = 0x00,
|
|
||||||
- .output_transport_unit_size = 0x00,
|
|
||||||
+ .input_transport_unit_size = ESCO_TRANSPORT_UNIT_SIZE,
|
|
||||||
+ .output_transport_unit_size = ESCO_TRANSPORT_UNIT_SIZE,
|
|
||||||
.max_latency_ms = 10,
|
|
||||||
.packet_types =
|
|
||||||
(ESCO_PKT_TYPES_MASK_HV1 | ESCO_PKT_TYPES_MASK_HV2 |
|
|
||||||
@@ -123,8 +123,8 @@ static const enh_esco_params_t default_esco_parameters[ESCO_NUM_CODECS] = {
|
|
||||||
.output_pcm_payload_msb_position = 0,
|
|
||||||
.input_data_path = ESCO_DATA_PATH_PCM,
|
|
||||||
.output_data_path = ESCO_DATA_PATH_PCM,
|
|
||||||
- .input_transport_unit_size = 0x00,
|
|
||||||
- .output_transport_unit_size = 0x00,
|
|
||||||
+ .input_transport_unit_size = ESCO_TRANSPORT_UNIT_SIZE,
|
|
||||||
+ .output_transport_unit_size = ESCO_TRANSPORT_UNIT_SIZE,
|
|
||||||
.max_latency_ms = 12,
|
|
||||||
.packet_types =
|
|
||||||
(ESCO_PKT_TYPES_MASK_HV1 | ESCO_PKT_TYPES_MASK_HV2 |
|
|
||||||
@@ -162,8 +162,8 @@ static const enh_esco_params_t default_esco_parameters[ESCO_NUM_CODECS] = {
|
|
||||||
.output_pcm_payload_msb_position = 0,
|
|
||||||
.input_data_path = ESCO_DATA_PATH_PCM,
|
|
||||||
.output_data_path = ESCO_DATA_PATH_PCM,
|
|
||||||
- .input_transport_unit_size = 0x00,
|
|
||||||
- .output_transport_unit_size = 0x00,
|
|
||||||
+ .input_transport_unit_size = ESCO_TRANSPORT_UNIT_SIZE,
|
|
||||||
+ .output_transport_unit_size = ESCO_TRANSPORT_UNIT_SIZE,
|
|
||||||
.max_latency_ms = 8,
|
|
||||||
.packet_types =
|
|
||||||
(ESCO_PKT_TYPES_MASK_EV3 | ESCO_PKT_TYPES_MASK_NO_3_EV3 |
|
|
||||||
@@ -199,8 +199,8 @@ static const enh_esco_params_t default_esco_parameters[ESCO_NUM_CODECS] = {
|
|
||||||
.output_pcm_payload_msb_position = 0,
|
|
||||||
.input_data_path = ESCO_DATA_PATH_PCM,
|
|
||||||
.output_data_path = ESCO_DATA_PATH_PCM,
|
|
||||||
- .input_transport_unit_size = 0x00,
|
|
||||||
- .output_transport_unit_size = 0x00,
|
|
||||||
+ .input_transport_unit_size = ESCO_TRANSPORT_UNIT_SIZE,
|
|
||||||
+ .output_transport_unit_size = ESCO_TRANSPORT_UNIT_SIZE,
|
|
||||||
.max_latency_ms = 13,
|
|
||||||
.packet_types =
|
|
||||||
(ESCO_PKT_TYPES_MASK_EV3 | ESCO_PKT_TYPES_MASK_NO_3_EV3 |
|
|
||||||
diff --git a/internal_include/bt_target.h b/internal_include/bt_target.h
|
|
||||||
index dd8c74eba0..18353cde84 100644
|
|
||||||
--- a/internal_include/bt_target.h
|
|
||||||
+++ b/internal_include/bt_target.h
|
|
||||||
@@ -263,6 +263,16 @@
|
|
||||||
#define BTM_DISC_DURING_RS TRUE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+/* This is used to work around an uncompliant AOSP implementation regarding
|
|
||||||
+ * eSCO Transport Unit Size parameter defined as 0x00 (HCI) which is not
|
|
||||||
+ * suitable for all devices. This sets this parameter to 16 bits (PCM)
|
|
||||||
+ */
|
|
||||||
+#ifdef BTM_ESCO_TRANSPORT_UNIT_SIZE_PCM16
|
|
||||||
+#define ESCO_TRANSPORT_UNIT_SIZE 16
|
|
||||||
+#else
|
|
||||||
+#define ESCO_TRANSPORT_UNIT_SIZE 0x00
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/**************************
|
|
||||||
* Initial SCO TX credit
|
|
||||||
************************/
|
|
||||||
|
|
@ -29,13 +29,6 @@ echo "Generating A30 Makefiles"
|
||||||
echo "Generating A40 Makefiles"
|
echo "Generating A40 Makefiles"
|
||||||
./device/samsung/a40/setup.sh
|
./device/samsung/a40/setup.sh
|
||||||
|
|
||||||
# BT Call patch
|
|
||||||
if ! grep -q ESCO_TRANSPORT_UNIT_SIZE system/bt/device/src/esco_parameters.cc; then
|
|
||||||
echo "Applying BT call patch";
|
|
||||||
cd system/bt;
|
|
||||||
git apply ../../device/samsung/universal7885-common/.patch/BTCalls-On-Samsung.patch;
|
|
||||||
cd -
|
|
||||||
fi
|
|
||||||
# For FM Radio
|
# For FM Radio
|
||||||
if grep -q isAudioServerUid\(callingUid\) frameworks/av/services/audioflinger/AudioFlinger.cpp; then
|
if grep -q isAudioServerUid\(callingUid\) frameworks/av/services/audioflinger/AudioFlinger.cpp; then
|
||||||
echo "Applying FM routing patch"
|
echo "Applying FM routing patch"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue