Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f243c3db authored by Henri Chataing's avatar Henri Chataing
Browse files

stack/a2dp: Cleanup the definition of a2dp codec IDs

Bug: 331817295
Test: m com.android.btservices
Flag: EXEMPT, no logical change
Change-Id: I23a892189767e1bec4b0f9d3e6ff1e89d7ce362d
parent 36f11beb
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -185,8 +185,8 @@ bool supports_codec(btav_a2dp_codec_index_t codec_index) {
}

// Return the A2DP capabilities for the selected codec.
bool codec_info(btav_a2dp_codec_index_t codec_index, uint64_t* codec_id, uint8_t* codec_info,
                btav_a2dp_codec_config_t* codec_config) {
bool codec_info(btav_a2dp_codec_index_t codec_index, bluetooth::a2dp::CodecId* codec_id,
                uint8_t* codec_info, btav_a2dp_codec_config_t* codec_config) {
  return (HalVersionManager::GetHalTransport() == BluetoothAudioHalTransport::AIDL)
                 ? aidl::a2dp::provider::codec_info(codec_index, codec_id, codec_info, codec_config)
                 : false;
+2 −2
Original line number Diff line number Diff line
@@ -124,8 +124,8 @@ bool supports_codec(btav_a2dp_codec_index_t codec_index);
// Return the A2DP capabilities for the selected codec.
// `codec_info` returns the OTA codec capabilities, `codec_config`
// returns the supported capabilities in a generic format.
bool codec_info(btav_a2dp_codec_index_t codec_index, uint64_t* codec_id, uint8_t* codec_info,
                btav_a2dp_codec_config_t* codec_config);
bool codec_info(btav_a2dp_codec_index_t codec_index, bluetooth::a2dp::CodecId* codec_id,
                uint8_t* codec_info, btav_a2dp_codec_config_t* codec_config);

struct a2dp_configuration {
  int remote_seid;
+1 −1
Original line number Diff line number Diff line
@@ -328,7 +328,7 @@ std::optional<const char*> codec_index_str(btav_a2dp_codec_index_t /*codec_index
bool supports_codec(btav_a2dp_codec_index_t /*codec_index*/) { return false; }

// Return the A2DP capabilities for the selected codec.
bool codec_info(btav_a2dp_codec_index_t /*codec_index*/, uint64_t* /*codec_id*/,
bool codec_info(btav_a2dp_codec_index_t /*codec_index*/, bluetooth::a2dp::CodecId* /*codec_id*/,
                uint8_t* /*codec_info*/, btav_a2dp_codec_config_t* /*codec_config*/) {
  return false;
}
+1 −1
Original line number Diff line number Diff line
@@ -665,7 +665,7 @@ bool provider::supports_codec(btav_a2dp_codec_index_t codec_index) {
/***
 * Return the A2DP capabilities for the selected codec.
 ***/
bool provider::codec_info(btav_a2dp_codec_index_t codec_index, uint64_t* codec_id,
bool provider::codec_info(btav_a2dp_codec_index_t codec_index, bluetooth::a2dp::CodecId* codec_id,
                          uint8_t* codec_info, btav_a2dp_codec_config_t* codec_config) {
  return provider_info
                 ? provider_info->CodecCapabilities(codec_index, codec_id, codec_info, codec_config)
+3 −2
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@

#include <vector>

#include "a2dp_constants.h"
#include "a2dp_encoding.h"
#include "a2dp_sbc_constants.h"
#include "common/message_loop_thread.h"
@@ -119,8 +120,8 @@ bool supports_codec(btav_a2dp_codec_index_t codec_index);
/***
 * Return the A2DP capabilities for the selected codec.
 ***/
bool codec_info(btav_a2dp_codec_index_t codec_index, uint64_t* codec_id, uint8_t* codec_info,
                btav_a2dp_codec_config_t* codec_config);
bool codec_info(btav_a2dp_codec_index_t codec_index, bluetooth::a2dp::CodecId* codec_id,
                uint8_t* codec_info, btav_a2dp_codec_config_t* codec_config);

/***
 * Query the codec selection fromt the audio HAL.
Loading