mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-21 21:55:19 -05:00
51 lines
1.7 KiB
Diff
51 lines
1.7 KiB
Diff
From 0d87e15abda69a93df1cd4d854088e2ccac01033 Mon Sep 17 00:00:00 2001
|
|
From: ValdikSS <iam@valdikss.org.ru>
|
|
Date: Fri, 21 Sep 2018 13:53:11 +0300
|
|
Subject: [PATCH] Increase maximum Bluetooth SBC codec bitrate for SBC HD
|
|
|
|
This commit increases maximum possible bitrate to 452 kbit/s for 44.1 kHz,
|
|
492 kbit/s for 48 kHz, which is optimal for both
|
|
EDR 2 mbit/s (4 audio frames, 11.7 ms, 6 wasted bytes) and
|
|
EDR 3 mbit/s (6 audio frames, 17.5 ms, 20 wasted bytes).
|
|
|
|
It does not increase bitpool value and won't introduce higher bitrates for
|
|
modes other than SBC Dual Channel.
|
|
|
|
Test: manual, with various headphones, receivers, and speakers
|
|
Change-Id: I5c9dec8848a8017da5b1fc6a5edfbbea5bdcb7eb
|
|
---
|
|
btif/src/btif_media_task.c | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/btif/src/btif_media_task.c b/btif/src/btif_media_task.c
|
|
index 977d2668d..cac0c2211 100644
|
|
--- a/btif/src/btif_media_task.c
|
|
+++ b/btif/src/btif_media_task.c
|
|
@@ -208,13 +208,13 @@ enum {
|
|
#endif
|
|
|
|
#ifdef BTA_AV_SPLIT_A2DP_DEF_FREQ_48KHZ
|
|
-#define BTIF_A2DP_DEFAULT_BITRATE 345
|
|
+#define BTIF_A2DP_DEFAULT_BITRATE 496
|
|
|
|
#ifndef BTIF_A2DP_NON_EDR_MAX_RATE
|
|
#define BTIF_A2DP_NON_EDR_MAX_RATE 237
|
|
#endif
|
|
#else
|
|
-#define BTIF_A2DP_DEFAULT_BITRATE 328
|
|
+#define BTIF_A2DP_DEFAULT_BITRATE 455
|
|
|
|
#ifndef BTIF_A2DP_NON_EDR_MAX_RATE
|
|
#define BTIF_A2DP_NON_EDR_MAX_RATE 229
|
|
@@ -227,8 +227,8 @@ enum {
|
|
#else
|
|
#define A2DP_HDR_SIZE 1
|
|
#endif
|
|
-#define MAX_SBC_HQ_FRAME_SIZE_44_1 119
|
|
-#define MAX_SBC_HQ_FRAME_SIZE_48 115
|
|
+#define MAX_SBC_HQ_FRAME_SIZE_44_1 165
|
|
+#define MAX_SBC_HQ_FRAME_SIZE_48 165
|
|
|
|
/* 2DH5 payload size of 679 bytes - (4 bytes L2CAP Header + 12 bytes AVDTP Header) */
|
|
#define MAX_2MBPS_AVDTP_MTU 663
|