[v7,07/13] bluetooth: Set correct endianity for SBC codec

Submitted by Pali Rohár on Feb. 23, 2019, 9:45 a.m.

Details

Message ID 20190223094544.14999-8-pali.rohar@gmail.com
State Superseded
Headers show
Series "New API for Bluetooth A2DP codecs" ( rev: 45 44 43 42 41 40 39 38 37 36 35 34 33 ) in PulseAudio

Not browsing as part of any series.

Commit Message

Pali Rohár Feb. 23, 2019, 9:45 a.m.
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(+)

Patch hide | download patch | download mbox

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);