AR9311 MIPS 24K SoC
OpenWRT Chaos Calmer 15.05
White noise when streaming audio over A2DP from bluetooth device to PA server running on big endian platforms.
method bt_transport_config_a2dp() in src/modules/bluetooth/module-bluez4-device.c
method transport_config() in src/modules/bluetooth/module-bluez5-device.c
The current code assumes that endianness of the data returned by SBC is always little endian and configure the transport in this way:
1707| u->sample_spec.format = PA_SAMPLE_S16LE;
1159| u->sample_spec.format = PA_SAMPLE_S16LE;
However an endianness in default settings returned by SBC is set according to endianness of target platform:
1025| sbc->blocks = SBC_BLK_16;
1026| sbc->bitpool = 32;
1027| #if __BYTE_ORDER == __LITTLE_ENDIAN
1028| sbc->endian = SBC_LE;
1029| #elif __BYTE_ORDER == __BIG_ENDIAN
1030| sbc->endian = SBC_BE;
1032| #error "Unknown byte order"
Thus on big endian platforms SBC returns data in big endian format but PA treats it as little endian, which results with white noise.
Explicitly set SBC configuration to produce little endian data by adding:
1714| sbc_info->sbc.endian = SBC_LE;
1167| sbc_info->sbc.endian = SBC_LE;
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/486.