[pulseaudio-discuss] [PATCH v7 07/13] bluetooth: Set correct endianity for SBC codec

Pali Rohár pali.rohar at gmail.com
Sat Feb 23 09:45:38 UTC 2019


In A2DP is SBC always in little endian. But libsbc library uses by default
host endianity, so it was broken on big endian systems.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=91359
---
 src/modules/bluetooth/a2dp-codec-sbc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/modules/bluetooth/a2dp-codec-sbc.c b/src/modules/bluetooth/a2dp-codec-sbc.c
index 034d57a69..283d04b16 100644
--- a/src/modules/bluetooth/a2dp-codec-sbc.c
+++ b/src/modules/bluetooth/a2dp-codec-sbc.c
@@ -314,6 +314,7 @@ static void set_params(struct sbc_info *sbc_info) {
     sbc_info->sbc.mode = sbc_info->mode;
     sbc_info->sbc.allocation = sbc_info->allocation;
     sbc_info->sbc.bitpool = sbc_info->bitpool;
+    sbc_info->sbc.endian = SBC_LE;
 
     sbc_info->codesize = sbc_get_codesize(&sbc_info->sbc);
     sbc_info->frame_length = sbc_get_frame_length(&sbc_info->sbc);
-- 
2.11.0



More information about the pulseaudio-discuss mailing list