Support for higher quality bluetooth A2DP audio codecs in sailfishos

Look what I found… GitHub - sailfishos/pulseaudio at sailfishos/15.x

Looks like early stages, but still.

4 Likes

generally pulseaudio shouldn’t be considered anymore as the new replacement is pipewire.
For the BT quality, no Flac won’t make it better.

2 Likes

Thanks for the feedback. Curious to see what’s coming with 4.5.

If 4.5 is ported to my device, I will certainly write.

Happy New Year!

1 Like

My NuraTrue Pro buds support “Qualcomm aptX™ Lossless” which really is the end game here.

As I uunderstand it, using this codec FLAC is sent that’s what the earbuds will receive If alt-extreme MP3 is sent than they get that. AptX Adaptive, AAC, SBC also supported

NuraTrue Pro.

My NuraPhone headset supports SBC, AAC, Qualcomm aptX™ and Qualcomm aptX HD™

Both of these work on SFOS.

Edit: It seems Qualcomm aptX™ Lossless requires Snapdragon chip support, so that won’t be coming any time soon to SFOS.

https://www.pocket-lint.com/headphones/news/qualcomm/158248-what-is-qualcomm-aptx-lossless-wireless-audio-codec-explained/

Anyway, Qualcomm aptX HD™ support would be better than nothing :slight_smile:

Recompiled for 4.5.0 aarch64 (although it shoudn’t have changed from 4.4.0, but since the link to download is dead, had to do it anyway)

to put and replace in /usr/lib64/pulse-14.2/modules/

Checked on my 10mk3 and Sony WH1000-XM4, get the same higher 452kbps bitrate as expected.

Thanks!!

PS Are there any comparisons on quality between this sbc-xq and AAC?

Maybe there’s a sense in porting AAC support from GitHub - EHfive/pulseaudio-modules-bt: [Deprecated, see https://github.com/EHfive/pulseaudio-modules-bt/issues/154] Adds Sony LDAC, aptX, aptX HD, AAC codecs (A2DP Audio) support to PulseAudio on Linux ?

PPS I guess for LDAC support we’ll also have to port libldac?

4 Likes

I have assumed LDAC is a closed proprietary format, but according to Wikipedia, it’s been released to AOSP in Android 8:

And here’s the source, it’s Apache 2 licensed:

https://android.googlesource.com/platform/external/libldac

So, there should be “only” techical issues on the way :stuck_out_tongue_winking_eye: And now that I think about it, I’ve been able to use LDAC on my Linux computers for a good while now. Whoops!

4 Likes

Thank you. Checked on my XZ2 Compact and Sony SP-700N. Unfortunatelyi can’t measure bitrate, but by ear sound quality very nice

1 Like

Looks great, can it be used in xa2 plus?

You need to compile it for armv7hl

It’s available for armv7hl since Feb’2022:
ldacBT-enc | OpenRepos.net — Community Repository System and maybe gstreamer1.0-plugins-bad > 1.20.0 found on openrepos lpr / lpr_next

aarch64:
https://download.opensuse.org/ports/aarch64/distribution/leap/15.4/repo/oss/aarch64/libldac2-2.0.2.3-1.1.aarch64.rpm
and maybe gstreamer plugin https://openrepos.net/sites/default/files/packages/7598/gstreamer1.0-plugins-bad-ldac-1.20.5-2.aarch64.rpm

Weird, I used your patch, and it did change the sound settings, but seemed to make the sound worse.
I went from default:

I: [pulseaudio] a2dp-codec-sbc.c: SBC parameters: allocation=Loudness, subbands=8, blocks=16, mode=JointStereo bitpool=53 codesize=512 frame_length=119
D: [bluetooth] a2dp-codec-sbc.c: Using SBC codec implementation: Generic C

To this with your patch:

I: [pulseaudio] a2dp-codec-sbc.c: SBC parameters: allocation=SNR, subbands=8, blocks=16, mode=DualChannel bitpool=38 codesize=512 frame_length=164

Frame length has increased, but bitpool decreased. Allocation and modes have changed too, weird.
Could someone help me with calculating the bitrate and if my ears are deceiving me?
Calculating by bitpool the new bitrate is lower, but by frame length is higher.

1 Like
1 Like

I used this site but I missed the switch from JointStereo to DualChannel. So the bitrate is higher, I wonder why it felt worse for me.

Did anyone manage to connect two devices at the same time? Should be doable with the newer versions…

I’m not an audio expert here, but I think it’s because it’s more efficient to store stereo audio as joint stereo (e.g. left in full + diff-to-right) than dual channel (i.e. left in full + right in full). That’s something that baffled me for the longest time, until I looked it up, and it does make (at least some) sense (to me)…

1 Like

Where are we on Pulseaudio 15? My BT headphones support A2DP/AAC, but not LDAC.

I’m on 32-bit.

I’ve read around a bit and Pipewire isn’t coming soon unless someone in the community wants to do it.

1 Like

In theory pipewire should be able to replace pulse and just work. At least thats how it is on the desktop. There is support until all toolkits get native output to pipewire.

But i suspect a phone does more than a desktop and doubt it will work out of the box.

1 Like

The link to the new libbluez5-util.so is dead, i want to participate.

see my post from Feb’23, the link is there

1 Like