Check Your I/O Usage with Iotop for Android

Ever needed to check the I/O usage of apps? If so, you probably tried searching for an iotop … more

T-Mobile HTC One M8 Gets Selfie-Friendly Android 4.4.4 OTA

The T-Mobie variant of HTC One (M8) just now received an over-the-air update … more

Android L is for Lockdown

Root is, without a doubt, the (un)holy grail of the Android world. Those wonderful permissions that allow you as … more

XDA Xposed Tuesday: XHangouts Will Improve Your Hangouts

Ever since Google started supporting text messaging in Hangouts many people have … more
Post Reply

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

OP magickone

16th February 2013, 11:44 AM   |  #1  
OP Junior Member
Thanks Meter: 6
 
21 posts
Join Date:Joined: Jun 2010
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:
./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.
16th February 2013, 05:44 PM   |  #2  
Account currently disabled
Thanks Meter: 481
 
522 posts
Join Date:Joined: Sep 2012
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 .
Last edited by OS_Hacking; 16th February 2013 at 05:51 PM.
16th February 2013, 07:12 PM   |  #3  
OP Junior Member
Thanks Meter: 6
 
21 posts
Join Date:Joined: Jun 2010
Quote:
Originally Posted by OS_Hacking

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

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

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

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

I hope so.
Last edited by magickone; 16th February 2013 at 07:16 PM.
The Following 2 Users Say Thank You to magickone For This Useful Post: [ View ]
17th February 2013, 11:35 AM   |  #4  
Account currently disabled
Thanks Meter: 481
 
522 posts
Join Date:Joined: Sep 2012
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 .
Last edited by OS_Hacking; 17th February 2013 at 11:37 AM.
17th February 2013, 11:49 AM   |  #5  
Member
Fleet
Thanks Meter: 10
 
79 posts
Join Date:Joined: Feb 2011
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
17th February 2013, 02:25 PM   |  #6  
OP Junior Member
Thanks Meter: 6
 
21 posts
Join Date:Joined: Jun 2010
Quote:
Originally Posted by OS_Hacking

Thanks for those informations ,, relly useful .

You're welcome.

Quote:
Originally Posted by OS_Hacking

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

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.
Last edited by magickone; 17th February 2013 at 02:30 PM.
17th February 2013, 02:46 PM   |  #7  
OP Junior Member
Thanks Meter: 6
 
21 posts
Join Date:Joined: Jun 2010
Quote:
Originally Posted by pierg75

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.
17th February 2013, 03:13 PM   |  #8  
Account currently disabled
Thanks Meter: 481
 
522 posts
Join Date:Joined: Sep 2012
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: [ View ]
25th February 2013, 03:36 PM   |  #9  
Junior Member
Thanks Meter: 0
 
1 posts
Join Date:Joined: Feb 2013
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"
15th April 2013, 04:02 PM   |  #10  
Member
Thanks Meter: 0
 
30 posts
Join Date:Joined: 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...

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes