Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

Bluetooth's Audio Profile A2DP supports multiple codecs. All devices have to support SBC (subband codec), then they can support additional "optional codecs" like MP3 and AAC, or "non-A2DP" codecs like apt-X.

Of course these codecs can't actually be used if the receiver doesn't also support them, in which case both devices fall back to SBC.

  1. How do I find out which codecs my hardware/ROM support?
  2. How do I find out which codec is currently in use? (Maybe this depends on the track, too, if it passes MP3/AAC files directly without re-encoding, for instance)
share|improve this question

1 Answer 1

Looking at the source, there are at least 4 codecs: SBC (mandatory), MP3 (MPEG12), AAC (MPEG24) and Sony's ATRAC.

./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

The underlying software is linux' "bluez" stack. It supports SBC and has limited MP3 capabilities.

The changelog for v3.25 (2009?) reads: "Add limited support for MPEG12/MP3 codec".

./android/external/bluetooth/bluez/ChangeLog:
ver 3.25:
    Add limited support for Handsfree profile.
    Add limited support for MPEG12/MP3 codec.

See also the v3.25 announcement. MP3 support seems to depend on gstreamer which is not available on Android, so I just guess SBC is the only option for A2DP to boot.

PS: Most A2DP devices seem to lack support for MP3/AAC due to patents/licencing issues (including Linux).

share|improve this answer
1  
Those are 3 optional codecs, yes, or it can use other codecs like the Galaxy S III using apt-X. I thought encoding was provided by hardware, though? Android can play MP3s so I doubt there are any patent limitations. –  endolith Jul 24 '12 at 21:49
2  
I don't think SBC has a dedicated hardware encoder in Android devices. It's computationally modest so I guess it's done in software. At least the sources indicate that. PS: I'm looking at Cyanogenmod's source, not HTC's or Samsung's. PS2: I meant the audio sink devices on the other side with lack of mp3/aac (headsets, etc.) –  ce4 Jul 24 '12 at 22:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.