We have moved to a new Sailfish OS Forum. Please start new discussions there.

bluetooth apt-x

asked 2014-01-06 11:11:09 +0200

pat_o gravatar image

updated 2017-09-01 16:56:15 +0200

Will Jolla envisage to add apt-x to the bluetooth stack for the jolla phone? Probably something to license but would like to know if this can come and when.

Would be wonderful as it enhances greatly the sound experience!


Edit 1Sept2017: Sony paid the licence for Xperia X. Will it become possible to use it now under SailfishOS with that device?

edit retag flag offensive close delete



Yes! I agree with you! apt-x would be awesome function to Jolla in order to keep it as premium device (for high-end enthusiasts)

LaruX ( 2014-01-06 14:38:53 +0200 )edit

Why would you ask for propietary extensions on a phone that stands out as being one of the most open platforms?

WhyNotHugo ( 2014-07-08 18:15:18 +0200 )edit

5 Answers

Sort by » oldest newest most voted

answered 2019-11-03 14:32:43 +0200

pasikarkkainen gravatar image

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 bluez support for multiple A2DP codecs is currently at the 13th revision, and is still being reviewed/discussed on pulseaudio-discuss mailinglist.

edit flag offensive delete publish link more

answered 2014-01-06 15:01:13 +0200

rainisto gravatar image

You should make this feature request to Bluez developer list. As if support is not in Bluez then it most likely wont end up in Jolla Phones.

edit flag offensive delete publish link more



looks like Bluez has developped something in the android side: - libbt-aptx-4.0.3.so - libbt-codec-aptx.so http://forum.xda-developers.com/showthread.php?t=2531440

does it help?

pat_o ( 2014-01-06 16:15:34 +0200 )edit

Apt-x is a propietary codec for which very little is known. Forget about it. Adding support for AAC might be possible with some effort, OTOH.

javispedro ( 2014-01-07 23:48:01 +0200 )edit

I know that this cannot come from community or open source 'world'. But there are different things in Jolla which are proprietary. I wanted to collect votes to possibly get Jolla to pay for it...

pat_o ( 2014-01-08 15:02:47 +0200 )edit

Apt-X support would be indeed a great addition, then I could use the full potential of my CA Dacmagic plus Apt-X support with Jolla!

TimTTK ( 2014-01-18 22:46:06 +0200 )edit

answered 2014-07-07 17:03:23 +0200

pat_o gravatar image

i have just visited link text and searching for aptx shows that support of the codec aptx is added. So sailfishos can add it too but then probably some royalties to give at some point ....

edit flag offensive delete publish link more




As that commit requires you to obtain license for propriatary codec, I cant see this happening anytime soon. Of course people could try to compile support and get licenses themselves.

rainisto ( 2014-07-07 19:07:11 +0200 )edit

@rainisto Could you specify what you mean by "I cant see this happening anytime soon"? I understand that it is license based, but it is something that enhances the sound experience and very common in todays smartphones. At least Jolla should give a proper answer as if and when they will be considering this.

Neo ( 2014-10-04 23:37:22 +0200 )edit

@rainisto: Would it be possible to buy the apt-x license later in the Jolla store as an upgrade option?

axaq ( 2015-01-09 03:13:06 +0200 )edit

@axaq: introducing new bt profile requires new bluetooth certification round, which basicly means that it cannot be offered as ungrade option by us. And if only <100 people buys the upgrade it would cost over 100$ per device (even without calculating the cost of certification round) which would also make people not buy it. So in short, upgrade option is quite unlikely. If apt-x comes more popular and/or becomes license free part of bluez stack, then its more likely to come out in some possible future product.

rainisto ( 2015-01-09 08:50:35 +0200 )edit

@rainisto: isn't apt-x "just" a codec on top of the A2DP profile? So a new BT profile would not be necessary for implementing apt-x? I may be out on deep water here. Never the less, license is still required from the owner.

nick75 ( 2015-01-09 17:13:08 +0200 )edit

answered 2019-05-04 19:24:17 +0200

lpr gravatar image

now, gstreamer1.0-plugins-ugly 1.16.0 (available at openrepos) provides apt-x support:

 nemo@Sailfish ~]$  gst-inspect-1.0 | grep     aptx
libav:  avenc_aptx: libav aptX (Audio Processing Technology for Bluetooth) encoder
libav:  avenc_aptx_hd: libav aptX HD (Audio Processing Technology for Bluetooth) encoder
libav:  avdec_aptx: libav aptX (Audio Processing Technology for Bluetooth) decoder
libav:  avdec_aptx_hd: libav aptX HD (Audio Processing Technology for Bluetooth) decoder

so maybe it is possible to create an a2dp connection via libgstbluez somehow...

edit flag offensive delete publish link more


however, gstreamers a2dp element seems only capable of sbc or mpeg:

Factory Details:
  Rank                     none (0)
  Long-name                Bluetooth A2DP sink
  Klass                    Sink/Audio
  Description              Plays audio to an A2DP device
  Author                   Marcel Holtmann <marcel@holtmann.org>

    Plugin Details:
  Name                     bluez
  Description              Bluez-based bluetooth support
  Filename                 /usr/lib/gstreamer-1.0/libgstbluez.so
  Version                  1.4.5
  License                  LGPL
  Source module            gst-plugins-bad
  Source release date      2014-12-18
  Binary package           SailfishOS GStreamer Bad Plug-ins
  Origin URL               http://jolla.com

    Implemented Interfaces:

    Pad Templates:
  SINK template: 'sink'
    Availability: Always
                   rate: { (int)16000, (int)32000, (int)44100, (int)48000 }
               channels: [ 1, 2 ]
           channel-mode: { (string)mono, (string)dual, (string)stereo, (string)joint }
                 blocks: { (int)4, (int)8, (int)12, (int)16 }
               subbands: { (int)4, (int)8 }
        allocation-method: { (string)snr, (string)loudness }
                bitpool: [ 2, 64 ]

    Element has no clocking capabilities.
Element has no URI handling capabilities.

  SINK: 'sink'
    Element Properties:
  async-handling      : The bin will handle Asynchronous state changes
                        flags: readable, writable
                        Boolean. Default: false
  auto-connect        : Automatically attempt to connect to device
                        flags: readable, writable
                        Boolean. Default: true
  device              : Bluetooth remote device address
                        flags: readable, writable
                        String. Default: null
  message-forward     : Forwards all children messages
                        flags: readable, writable
                        Boolean. Default: false
  name                : The name of the object
                        flags: readable, writable
                        String. Default: "a2dpsink0"
  parent              : The parent of the object
                        flags: readable, writable
                        Object of type "GstObject"
  transport           : Use configured transport
                        flags: readable, writable
                        String. Default: null
    Children:      fakesink      filter
lpr ( 2019-05-06 18:43:48 +0200 )edit

answered 2019-05-11 15:45:53 +0200

pasikarkkainen gravatar image

So.. support for multiple bluetooth A2DP audio codecs (including AptX) 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

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools



Asked: 2014-01-06 11:11:09 +0200

Seen: 2,327 times

Last updated: Nov 03 '19