Diff between 97801670b884f1b93d98e702c716eb6e7f3be47b and 61244c0c2f5694a344d76d5feb722e82327cd9cf

Changed Files

File Additions Deletions Status
android/hal-audio-sbc.c +3 -3 modified
profiles/audio/a2dp-codecs.h +15 -1 modified

Full Patch

diff --git a/android/hal-audio-sbc.c b/android/hal-audio-sbc.c
index 80e271e..b06cafb 100644
--- a/android/hal-audio-sbc.c
+++ b/android/hal-audio-sbc.c
@@ -92,7 +92,7 @@ static const a2dp_sbc_t sbc_presets[] = {
 		.block_length = SBC_BLOCK_LENGTH_4 | SBC_BLOCK_LENGTH_8 |
 				SBC_BLOCK_LENGTH_12 | SBC_BLOCK_LENGTH_16,
 		.min_bitpool = SBC_MIN_BITPOOL,
-		.max_bitpool = SBC_MAX_BITPOOL
+		.max_bitpool = SBC_BITPOOL_HQ_JOINT_STEREO_44100,
 	},
 	{
 		.frequency = SBC_SAMPLING_FREQ_44100,
@@ -101,7 +101,7 @@ static const a2dp_sbc_t sbc_presets[] = {
 		.allocation_method = SBC_ALLOCATION_LOUDNESS,
 		.block_length = SBC_BLOCK_LENGTH_16,
 		.min_bitpool = SBC_MIN_BITPOOL,
-		.max_bitpool = SBC_MAX_BITPOOL
+		.max_bitpool = SBC_BITPOOL_HQ_JOINT_STEREO_44100,
 	},
 	{
 		.frequency = SBC_SAMPLING_FREQ_48000,
@@ -110,7 +110,7 @@ static const a2dp_sbc_t sbc_presets[] = {
 		.allocation_method = SBC_ALLOCATION_LOUDNESS,
 		.block_length = SBC_BLOCK_LENGTH_16,
 		.min_bitpool = SBC_MIN_BITPOOL,
-		.max_bitpool = SBC_MAX_BITPOOL
+		.max_bitpool = SBC_BITPOOL_HQ_JOINT_STEREO_48000,
 	},
 };
 
diff --git a/profiles/audio/a2dp-codecs.h b/profiles/audio/a2dp-codecs.h
index 16088dc..93e9d35 100644
--- a/profiles/audio/a2dp-codecs.h
+++ b/profiles/audio/a2dp-codecs.h
@@ -53,8 +53,22 @@
 #define SBC_ALLOCATION_SNR		(1 << 1)
 #define SBC_ALLOCATION_LOUDNESS		1
 
-#define SBC_MAX_BITPOOL			64
 #define SBC_MIN_BITPOOL			2
+#define SBC_MAX_BITPOOL			250
+
+/* Other settings:
+ * Block length = 16
+ * Allocation method = Loudness
+ * Subbands = 8
+ */
+#define SBC_BITPOOL_MQ_MONO_44100		19
+#define SBC_BITPOOL_MQ_MONO_48000		18
+#define SBC_BITPOOL_MQ_JOINT_STEREO_44100	35
+#define SBC_BITPOOL_MQ_JOINT_STEREO_48000	33
+#define SBC_BITPOOL_HQ_MONO_44100		31
+#define SBC_BITPOOL_HQ_MONO_48000		29
+#define SBC_BITPOOL_HQ_JOINT_STEREO_44100	53
+#define SBC_BITPOOL_HQ_JOINT_STEREO_48000	51
 
 #define MPEG_CHANNEL_MODE_MONO		(1 << 3)
 #define MPEG_CHANNEL_MODE_DUAL_CHANNEL	(1 << 2)