Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,741,857 Members 44,658 Now Online
XDA Developers Android and Mobile Development Forum

[Q] apt-X and other vendor-specific A2DP codecs

Tip us?
 
magickone
Old
#1  
Junior Member - OP
Thanks Meter 6
Posts: 21
Join Date: Jun 2010
Audio [Q] apt-X and other vendor-specific A2DP codecs

Considering P880's mediocre analog audio output, I'm wondering would it be possible to stream high-quality apt-X or AAC encoded music over A2DP to a stereo bluetooth headphones/headset? Samsung Galaxy S III and HTC One X have apt-X support but it seems that P880 doesn't.

I'm not particularly familiar with Android, but I'm a Linux power user (admin). I've seen this piece of code and it seems to me that Android uses Linux 'BlueZ' bluetooth stack.

Code:
Select Code
./android/external/bluetooth/bluez/audio/a2dp.h:  
#define A2DP_CODEC_SBC          0x00
#define A2DP_CODEC_MPEG12       0x01
#define A2DP_CODEC_MPEG24       0x02
#define A2DP_CODEC_ATRAC        0x03
Considering that audio codecs for A2DP bluetooth profile on Android are implemented in software, we could (easily?) add support for AAC, MP3 or any other codec supported by targeting receiver, besides SBC which is mandatory. The only problem with apt-X is IP and licensing issues so free distribution of such hack would be out of question, but I still wonder... If some end user is willing to pay for the license, is there any way to add support for apt-X by installing some software package on this phone? Licesing issues aside (just for educational purposes), would it be possible to copy "Vendor-Specific A2DP codec" from lets say Samsung Galaxy SIII and paste it into another vendor's Android smartphone (BlueZ stack)?

Harman Kardon has a BT headphones which support AAC streaming through A2DP, so at least there's a chance for OSS improvement over SBC.
 
OS_Hacking
Old
(Last edited by OS_Hacking; 16th February 2013 at 05:51 PM.)
#2  
Account currently disabled
Thanks Meter 479
Posts: 522
Join Date: Sep 2012
Default Re: [Q] apt-X and other vendor-specific A2DP codecs

Welcome to our forum , I hope you will find what you need .
Personally ... I didn't understand any thing . OSS ,A2DP,SBC,AAC (it's like a DNA code )

But generally the problem with kernel or modules (/system/lib/modules/*.ko) .
You can call modules as an "extra" things complied by developers . For example Bluetooth mouse or keyboard . As I understand it's a headphone ??

Good to see a good linux user ,, maybe you can made kernels (it's mostly based on linux) .



Sent From My LG-P880 (O4X) .
By Pressing "THANKS" You Will Help Me .
 
magickone
Old
(Last edited by magickone; 16th February 2013 at 07:16 PM.)
#3  
Junior Member - OP
Thanks Meter 6
Posts: 21
Join Date: Jun 2010
Quote:
Originally Posted by OS_Hacking View Post
Welcome to our forum , I hope you will find what you need .
Thank you for your reply and warm welcome.

Quote:
Originally Posted by OS_Hacking View Post
Personally ... I didn't understand any thing . OSS ,A2DP,SBC,AAC (it's like a DNA code )
OSS - Open Source Software
A2DP - Advanced Audio Distribution Profile is a Bluetooth standard which defines how high quality audio is streamed wirelessly
SBC - Subband Coding is a default audio codec in A2DP (and it's not very good one but it's free for Bluetooth applications)
AAC - Advanced Audio Coding is an audio codec which could be considered successor to MP3 (good for higher bitrates - not so much for low bitrates)
apt-X is a proprietary audio codec which achieves good compression rates with low computational overhead and short coding latency without sacrificing subjective audio quality (in short awesome )

A2DP uses SBC by default (and sounds terrible) but it can also use AAC (much better) and any other "vendor-specific codec" such as apt-X (preferably) or even Opus (very good open source audio codec for low bitrate voice and audio applications).

Quote:
Originally Posted by OS_Hacking View Post
But generally the problem with kernel or modules (/system/lib/modules/*.ko) .
You can call modules as an "extra" things complied by developers . For example Bluetooth mouse or keyboard . As I understand it's a headphone ??
Kernel modules are loadable parts of kernel which are in essence drivers for hardware or complex subsystems.

I don't need driver for my Bluetooth controller, I just need software (apt-X) codec so my P880 can stream better quality audio.

Quote:
Originally Posted by OS_Hacking View Post
Good to see a good linux user ,, maybe you can made kernels (it's mostly based on linux) .
I hope so.
The Following 2 Users Say Thank You to magickone For This Useful Post: [ Click to Expand ]
 
OS_Hacking
Old
(Last edited by OS_Hacking; 17th February 2013 at 11:37 AM.)
#4  
Account currently disabled
Thanks Meter 479
Posts: 522
Join Date: Sep 2012
Default Re: [Q] apt-X and other vendor-specific A2DP codecs

Thanks for those informations ,, relly useful .
About modules I thought you meant a new hardware (special headphone or something like that) .
If it's a software , it can be ported (but I don't know how ) .
There is beats audio and xLoud MODs in xda and it should work on any android .



Sent From My LG-P880 (O4X) .
By Pressing "THANKS" You Will Help Me .
 
pierg75
Old
#5  
Member
Thanks Meter 10
Posts: 77
Join Date: Feb 2011
Location: Fleet
Default Re: [Q] apt-X and other vendor-specific A2DP codecs

I was thinking to use the 4X as source media (thanks to the SD card slot and all flac files) too, but ATM I'm just waiting for the unlocked boot loader and then cm10.1 to use an external USB DAC to completely bypass the internal one (very mediocre).


Sent from my Nexus 7 using Tapatalk 2
 
magickone
Old
(Last edited by magickone; 17th February 2013 at 02:30 PM.)
#6  
Junior Member - OP
Thanks Meter 6
Posts: 21
Join Date: Jun 2010
Quote:
Originally Posted by OS_Hacking View Post
Thanks for those informations ,, relly useful .
You're welcome.

Quote:
Originally Posted by OS_Hacking View Post
About modules I thought you meant a new hardware (special headphone or something like that).
Bluetooth headphones and headsets don't need any drivers because they comply with the standard and negotiate connection parameters with a host device. But, if one of them doesn't support proposed codec then connection will default to mandatory one (SBC in case of A2DP).

Optimus 4X HD supports A2DP but it seems that it lacks apt-X codec so it will fallback to SBC even with most advanced and most expensive headphones. I'm trying to solve that.

Quote:
Originally Posted by OS_Hacking View Post
If it's a software , it can be ported (but I don't know how ) .
There is beats audio and xLoud MODs in xda and it should work on any android .
Theoretically it could be solved but there's an IP (intellectual property) issue. I'm afraid that CSR's (company which supplies it to HTC and Samsung) apt-X codec is distributed as a binary library or compiled by phone manufacturers for their respective smartphone models and Android versions, and possibly even encrypted or obfuscated in order to protect licensed IP.

Our best shot would be to "steal" apt-X codec from HTC One X, or any other Tegra 3 device which supports it and runs Ice Cream Sandwich. That way there is a good chance it will load and run even if we had simply copied precompiled library.
 
magickone
Old
#7  
Junior Member - OP
Thanks Meter 6
Posts: 21
Join Date: Jun 2010
Quote:
Originally Posted by pierg75 View Post
I was thinking to use the 4X as source media (thanks to the SD card slot and all flac files) too, but ATM I'm just waiting for the unlocked boot loader and then cm10.1 to use an external USB DAC to completely bypass the internal one (very mediocre).
If you are willing to go with wires (USB) couldn't you simply use MTP for audio reproduction?

Of course, for home or office music listening we always have DLNA (Wi-Fi) option.

I'm trying enable this phone (P880) to transmit high-quality audio (voice/music) "on the go", with low-power wireless interconnection (Bluetooth A2DP with apt-X codec). In car I could use USB charger and stream music to my stereo over DLNA or simply through mass storage mode (need rooting), but while I'm walking... there is no much options.
 
OS_Hacking
Old
#8  
Account currently disabled
Thanks Meter 479
Posts: 522
Join Date: Sep 2012
Default Re: [Q] apt-X and other vendor-specific A2DP codecs

For LG-P880 forum you are a developer .
I don't think you will get help ,, most of xda developers don't hear music .
Try contact "team acid" it is a team on xda their work is on music and they have their own music MOD (like beats , xloud ...) maybe they can help . Or maybe they are already did that .
Good Luck .


Sent From My LG-P880 (O4X) .
By Pressing "THANKS" You Will Help Me .
The Following User Says Thank You to OS_Hacking For This Useful Post: [ Click to Expand ]
 
AAlchemy
Old
#9  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: Feb 2013
Default Re: [Q] apt-X and other vendor-specific A2DP codecs

I'm pretty sure the library that handles aptX is called libbt-aptx-4.1.1.so (probably with a different version number).
I got a few hits on a google searching for "libbt-aptx-*.so"
 
dmk0
Old
#10  
Member
Thanks Meter 0
Posts: 30
Join Date: Jun 2011
I don't own any LG phones. But figured it is suited to this topic since I cannot find a good enough thread in other forums.
Many new Samsung and HTC phone has apt-x but when installing a custom rom is this function no longer valid? This is the number one bummer for a tinkerer who wants to install a custom rom on their device if this is true .

It would be great if true if someone could give a way to transfer that license to a new custom rom, after all it is the same phone you purchased with the license. However I can see this being abused, use on unlicensed phones.

But maybe where lucky and I don't know what I'm talking about, maybe the software isn't in the rom and is in the kernal or on the bluetooth chip in the phone and you only need a driver for the custom rom software.

Wishful thinking, I guess...

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Enjoy Wallpaper Overload with PhotoPhase

We don’t usually feature live wallpapers on the XDA Portal unless they are somewhat innovative … more

Monitor What Your Phone’s Camera Sees with Android Wear

Having a smart device strapped to your wrist certainly has its merits. A … more

Mod Lets You Have Stereo Speakers on Your Sony Xperia Z1 (Sort Of)

The stereo speakers onthe Sony Xperia Z2areprobably a relatively large … more

Give Your Screen Some Color with HexaTime Live Wallpaper

We don’t often cover very many live wallpapers here on the XDA Portal. You may … more