Support for higher quality bluetooth A2DP audio codecs in sailfishos

@jusa / @tomin anything you can share about this?
Is the uplift stalled because of some specific problem, or just due to time?
(I.e. is it in a place where community help would make sense, or just add noise?)

Unfortunately this link seems to be gone as well, any chance you could upload it again somewhere? Would be very appreciated!

https://wdho.ru/7n6c
reupload

3 Likes

Great, thanks a lot!

4.6.0 update modified the file, I’ll recompile later

134488 Mar 19 08:49 /usr/lib64/pulse-14.2/modules/libbluez5-util.so
2 Likes

I wonder if there is any prospect of PA 15 arriving for this?

they have a PA 17 pull request from over a year ago, but still didn’t pull it yet.

There is always an open pull requests topic during the community meeting. You can raise it there.

3 Likes

No reason for that. They will do it when they want. My questioning won’t help.

So now that we have the new Jolla phone coming and now that I read through this thread i’m still not entirely sure whether other codecs are available?

3 Likes

I just installed the latest version (LTS, not beta). I still not functional.

I’ll just leave this here.

9 Likes

With SFOS 5.1 now PA 17.0 has landed. With ‘pactl list’ it appears that (for example with the Sony WH-1000XM4) ‘sbc’ is used. Same after I re-paired the device. Should Sailfish now automaticaly change to higher quality codecs, if available? Or can we manually allow other Codecs for a Sink to be used if connection quality allows for it?

4 Likes

As far as I can tell, PulseAudio does not do any automatic codec selection. Normally you’d choose the codec in your mixer. The 15.0 release notes say:

Switching the codec can be done on the command line with pactl send-message /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez switch-codec '"CODEC"' (note the double quotes inside single quotes, this is needed because the server expects the double quotes and without the single quotes the shell would remove the double quotes before the string gets sent to the server). Replace XX_XX_XX_XX_XX_XX with the device address, which can be found for example with LANG=C pactl list cards | grep Name. Replace CODEC with one of the available codec names: aptx, aptx_hd, ldac_hq (“High Quality”), ldac_sq (“Standard Quality”), ldac_mq (“Mobile Quality”), sbc, sbc_xq_453, sbc_xq_512, sbc_xq_552. A list of codecs supported by the device can be obtained with pactl send-message /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez list-codecs and the currently active codec can be queried with pactl send-message /card/bluez_card.XX_XX_XX_XX_XX_XX/bluez get-codec. A simplified way of switching codecs is already implemented in pavucontrol and will be provided with the next pavucontrol release.

I’m guessing the reason for this is that every codec comes with a tradeoff, so it’s not as simple as choosing the best one and then just downgrading as necessary. What a glorious day it will be when Bluetooth finally grows a bandwidth increase of ~20% and we can just send uncompressed audio.

4 Likes

So someone with some qt-experience can bake a simple codec-selector-app? (Fish-Selector or some name like that :laughing:)

4 Likes

I wonder if a re-factored Audio Output Chooser — SailfishOS:Chum, a Sailfish OS software repository by the community audio output selector might do it?

3 Likes