Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
OrganizationAdvent CalendarQiitadon (β)
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

Android の aptX aptX-HD LDAC AACサポートについて

More than 3 years have passed since last update.




2017-01になって、ソニーのLDAC encoderのソースコード(libldac) がAOSPに追加されました。なので、LDACが次のAndroidに標準搭載される可能性があるのかもしれません。特許はどうするるんだろ。


aptX and aptX-HD






configure A2DP source CODEC


Add a mechanism for configuring the A2DP Source codecs

* Codec config internal abstraction:
 - Add new classes A2dpCodecConfig and A2dpCodecs that (will)
   encapsulate all codec-related APIs
 - Add unit tests for the above two classes
 - Add method A2dpCodecConfig.buildCodecConfig(), and use it when
   creating the codec configuration instead of A2DP_InitSource2SinkCodec().
   The new method can build the codec config by taking into account
   optional user codec-related configuration preferences.
 - Use the A2DP codec config API from the hardware/libhardware bt_av.h API
 - Replace enum tA2DP_CODEC_SEP_INDEX with btav_a2dp_codec_index_t
   from the bt_av.h API
 - Move codec-specific functions from stack/include/a2dp_api.h
   and stack/a2dp/a2dp_api.cc to stack/include/a2dp_codec_api.h
   and stack/a2dp/a2dp_codec_config.cc
 - Create a new base class A2dpCodecConfig() to hold some of the
   codec-related state, and implement the corresponding A2dpCodecConfigSbc
   and A2dpCodecConfigSbcSink derived classes.
 - Move A2DP spec-related constants from stack/include/a2dp_api.h
   to stack/include/a2dp_constants.h
 - Move A2DP-related error codes from stack/include/a2dp_api.h
   to stack/include/a2dp_error_codes.h
 - Move A2DP SBC spec-related constants from stack/include/a2dp_sbc.h to

* Implement the backend mechanism for handling user (re)configuration of
  A2DP Source codecs as requested via the JNI API calls.
  Also, any codec changes are reported back via JNI API callbacks.
  The current audio parameter selection (sample rate, bits per
  sample, channel mode - mono/stereo) is as follows:
  - If the user selected parameters are acceptable (based on
    local codec capability and the remote Sink capability),
    those parameters are used.
  - Else if the Audio HAL's requested parameters are acceptable,
    those are used.
  - Else if the default settings are acceptable, those are used.
  - Else use the best match among the local and the remote device's

* Update the mechanism for handling OTA configuration requests from the
  remote Sink device.
  - The OTA prefered codec configuration is ignored if the current
  codec configuration contains explicit user configuration, or if the
  codec configuration for the same codec contains explicit user

* Refactor the Audio HAL <-> Bluetooth audio parameter negotiation
  The new mechanism gives some flexibility to the Media Framework to
  choose the appropriate audio format (sample rate, bits per sample,
  and channel mode - mono/stereo), and at the same time allows
  the Bluetooth stack to double-check / overwrite the choice.
 - out_get_parameters() on the Audio HAL side asks the Bluetooth stack
   for all currently supported formats (for the current codec),
   and returns them to the Media Framework: sample rate, bits per sample,
   and channel mode (mono/stereo).
 - The first time adev_open_output_stream() is called on the Audio HAL,
   it asks the Bluetooth stack about the audio format currently selected
   by the Bluetooth stack (based on codec negotiation with the Sink device,
   and User Configuration).
 - The second time adev_open_output_stream() is called on the Audio HAL,
   its "config" will eventually contain the audio format selected
   internally by the Media Framework. That audio format is sent to the
   Bluetooth stack.
   If that format is acceptable to the Bluetooth stack, the Bluetooth
   stack will reconfigure itself internally, and will respond back with
   those values. Otherwise, it will respond back with the values that
   should be used instead.

* Misc other fixes and refactoring:
 - Fix the BTA handling of A2DP codec reconfiguration
 - Fix a bug in the implementation of A2DP_BitsSet(), and add the
   approriate unit test. Also, fix the code that was using this function
 - The SBC encoder is compiled as a separate library
 - Replace leftover usage of "false" with "FALSE" for macros, and
   vice-versa for variable values.


  • libaptX_encoder.so
  • libaptXHD_encoder.so
  • libldacBT_enc.so
  • libFraunhoferAAC.so



AACも追加されたので記載した。 (2017-01-28)

Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away


No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
Help us understand the problem. What is going on with this article?