LDAC support for better audio
Sony has been releasing LDAC codec to AOSP. Would it be possible to add support for this?
https://eischmann.wordpress.com/2019/02/11/better-bluetooth-sound-quality-on-linux/
We have moved to a new Sailfish OS Forum. Please start new discussions there.
Sony has been releasing LDAC codec to AOSP. Would it be possible to add support for this?
https://eischmann.wordpress.com/2019/02/11/better-bluetooth-sound-quality-on-linux/
Well spotted!
There might be some issues around the patent encumbered codecs being included in the same package, but lets see if I can get the required things packaged and built and go from there.
EDIT: Ok so the libldac library was rather easy, but I think the Pulse Audio module that adds the required glue might be a bit trickier due to their massive reworking of the BT module and relicensing... I hope they are planning on getting their work upstreamed into PA proper instead of continually maintaining a fork of the BT module
Update 2019/11: bluez 5.52 has been released recently, and it includes support for multiple bluetooth A2DP audio codecs, and switching between them. The related APIs have been declared as stable in bluez v5.52.
Pulseaudio patches to utilize the bluez support for multiple A2DP codecs is currently at the 13th revision, and is still being reviewed/discussed on pulseaudio-discuss mailinglist.
So.. support for multiple bluetooth A2DP audio codecs (including LDAC) is being worked upstream right now. It is partly done/merged, and some bits are still missing or work-in-progress currently (as of writing this, 2019-05-11). You can basicly "split" the required work in two main parts:
1) bluez support for multiple bluetooth A2DP audio codecs. Bluez needs to be able to discover/negotiate/parse different codecs, transport them, offer ability to choose/switch active codecs, remember last used codecs during BT reconnects, etc. Bluez does not need to actually encode/decode audio for these codecs, that's the job of bluez clients (like Pulseaudio), because bluez basicly just "transports" the encoded audio. This bluez work is mostly done and merged to upstream bluez git repository (in master branch, not yet in any released version). You can see the merged A2DP multiple audio codec patches here (commits after Dec 2018): https://git.kernel.org/pub/scm/bluetooth/bluez.git/log/?qt=grep&q=a2dp
2) Pulseaudio support for multiple bluetooth A2DP audio codecs, and ability to utilize the bluez provided support for handling multiple A2DP codecs. Pulseaudio is the client for bluez, so it's pulseaudio who must be able to encode/decode audio using various codecs, which means Pulseaudio needs to use various codec libraries to encode/decode audio using different codecs, and allow end-user to choose/configure which codec to use, etc. Currently the "groundwork" patches to support multiple A2DP audio codecs in Pulseaudio has been merged (during the last month or so), but the actual support for LDAC, AptX-HD, AptX, FastStream, and high-quality SBC codec is still a work-in-progress. More review and testing is needed to get the rest of the patches merged to upstream Pulseaudio. Currently the remaining pulseaudio patches are at 10th revision atm. You can find the patches for example here: https://lists.freedesktop.org/archives/pulseaudio-discuss/2019-May/031100.html (from: https://lists.freedesktop.org/archives/pulseaudio-discuss/2019-May/ ).
BT A2DP multiple audio codecs development work is mostly done by developers Pali and Luiz. You can find the discussions/reviews/patches on linux-bluetooth and pulseaudio mailing lists.
audio codec libraries used/required: - https://github.com/pali/libopenaptx - https://android.googlesource.com/platform/external/libldac / https://github.com/EHfive/ldacBT
no sense. LDAC and others, it's marketing. I'm sorry, it's in Russian, but with images https://habr.com/ru/post/433724/
Yup, the ideal would be plain stereo PCM (16 bits, sample rate at least above 40kHz) for connection that can sustain 1.2Mbps, FLAC for everything else (more channels or lower bandwidth), and OPUS for lossy (even lower bandwitdh). ( ^- OPUS currently beats everything at common bandwidth. Except for some very limited low bandwith where the open source Codec2 is the one beating the crap of everything else).
The problem is: no hardware manufacturer is even going to build it, every body is in the "license shitty commercial patent-encumbered codecs".
Your earphone are going to be stuck a AptX, LDAC, etc. So you're stuck with needing to implement those on your smartphone.
DrYak ( 2019-03-19 11:51:57 +0200 )edit@Oleg, well not so rusty that I could not read, but reading is not that fast as usual and the article was pretty long - but very very informative.
You know, I prefer cables at home - no dubious radiation. For a phone call 345Kbps is just fine. For good music quality I have two good boxes wired to a good amplifier. I gave up old bulb one cause it is hard and costy to maintain. Why would I listen to music that causes radiation? Anyway. Cheers!
deloptes ( 2019-05-14 23:29:41 +0200 )editThis thread is public, all members of Together.Jolla.Com can read this page.
Asked: 2019-03-18 23:31:31 +0200
Seen: 1,452 times
Last updated: Nov 03 '19
PBAP bluetooth profile support is requested [released]
[Feature-request] Automatic call answer when connected to (BT) handsfree/headset
Bug: Tones don't come through headset
Media player trough carkit (handsfree)not working
My Jolla does not recognise any micro sd card. What I can do? [answered]
Add skype integration to sailfish os
Add DBus interface to stock music player [released]
[How-To] WPA-802.1X (enterprise), eduroam +[Others] GUI wifi support needed + workaround [released]
Actually implementing LDAC support requires two things: 1) Bluez must have support for multiple BT audio codecs, and the ability to choose/switch the active codec. Bluez patches have been merged, so they're included in the upstream git tree, but they're not yet in any official released bluez version. 2) Pulseaudio BT support must be able to use the bluez multi audio codec support aswell, and obviously be able to use the LDAC library from AOSP. Those pulseaudio patches are still under development, and there has been multiple versions posted to pulseaudio mailing list by Pali, who's trying to get the patches working properly and upstreamed.
So currently (as of March 2019) to test LDAC support you need to compile latest version of bluez from git, and also apply the work-in-progress pulseaudio patches and build a custom version of pulseaudio aswell.
pasikarkkainen ( 2019-03-21 20:51:03 +0200 )edit