From 68bebd1e109dbb217bdd16b46edc1f26bd35e185 Mon Sep 17 00:00:00 2001 From: Tim Zimmermann Date: Wed, 27 Jul 2022 12:35:49 +0200 Subject: [PATCH] sm7125: bluetooth: Set eSCO transport unit size to 16 The original patch in system_bt https://review.lineageos.org/c/LineageOS/android_system_bt/+/319781 ended up not getting merged Change-Id: Icc0c3364abe2e9501226f0df07b66f61c6fe451d --- bluetooth/include/bdroid_buildcfg.h | 2 -- bluetooth/src/esco_parameters.cc | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/bluetooth/include/bdroid_buildcfg.h b/bluetooth/include/bdroid_buildcfg.h index 6a99bce..30d64ea 100644 --- a/bluetooth/include/bdroid_buildcfg.h +++ b/bluetooth/include/bdroid_buildcfg.h @@ -32,6 +32,4 @@ #define AVDT_NUM_SEPS 35 -#define BTM_ESCO_TRANSPORT_UNIT_SIZE_PCM16 - #endif diff --git a/bluetooth/src/esco_parameters.cc b/bluetooth/src/esco_parameters.cc index e2a6eec..722502b 100644 --- a/bluetooth/src/esco_parameters.cc +++ b/bluetooth/src/esco_parameters.cc @@ -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 = 16, + .output_transport_unit_size = 16, .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 = 16, + .output_transport_unit_size = 16, .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 = 16, + .output_transport_unit_size = 16, .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 = 16, + .output_transport_unit_size = 16, .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 = 16, + .output_transport_unit_size = 16, .max_latency_ms = 13, .packet_types = (ESCO_PKT_TYPES_MASK_EV3 | ESCO_PKT_TYPES_MASK_NO_3_EV3 |