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

Commit 4521cb17 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes Ifd411236,I23a89218 into main

* changes:
  stack/a2dp: Implement unit test for bluetooth::a2dp::ParseCodecId
  stack/a2dp: Cleanup the definition of a2dp codec IDs
parents c9bfb6b5 694885b2
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line 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.
// 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,
bool codec_info(btav_a2dp_codec_index_t codec_index, bluetooth::a2dp::CodecId* codec_id,
                btav_a2dp_codec_config_t* codec_config) {
                uint8_t* codec_info, btav_a2dp_codec_config_t* codec_config) {
  return (HalVersionManager::GetHalTransport() == BluetoothAudioHalTransport::AIDL)
  return (HalVersionManager::GetHalTransport() == BluetoothAudioHalTransport::AIDL)
                 ? aidl::a2dp::provider::codec_info(codec_index, codec_id, codec_info, codec_config)
                 ? aidl::a2dp::provider::codec_info(codec_index, codec_id, codec_info, codec_config)
                 : false;
                 : false;
+2 −2
Original line number Original line 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.
// Return the A2DP capabilities for the selected codec.
// `codec_info` returns the OTA codec capabilities, `codec_config`
// `codec_info` returns the OTA codec capabilities, `codec_config`
// returns the supported capabilities in a generic format.
// 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,
bool codec_info(btav_a2dp_codec_index_t codec_index, bluetooth::a2dp::CodecId* codec_id,
                btav_a2dp_codec_config_t* codec_config);
                uint8_t* codec_info, btav_a2dp_codec_config_t* codec_config);


struct a2dp_configuration {
struct a2dp_configuration {
  int remote_seid;
  int remote_seid;
+1 −1
Original line number Original line 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; }
bool supports_codec(btav_a2dp_codec_index_t /*codec_index*/) { return false; }


// Return the A2DP capabilities for the selected codec.
// 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*/) {
                uint8_t* /*codec_info*/, btav_a2dp_codec_config_t* /*codec_config*/) {
  return false;
  return false;
}
}
+1 −1
Original line number Original line 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.
 * 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) {
                          uint8_t* codec_info, btav_a2dp_codec_config_t* codec_config) {
  return provider_info
  return provider_info
                 ? provider_info->CodecCapabilities(codec_index, codec_id, codec_info, codec_config)
                 ? provider_info->CodecCapabilities(codec_index, codec_id, codec_info, codec_config)
+3 −2
Original line number Original line Diff line number Diff line
@@ -18,6 +18,7 @@


#include <vector>
#include <vector>


#include "a2dp_constants.h"
#include "a2dp_encoding.h"
#include "a2dp_encoding.h"
#include "a2dp_sbc_constants.h"
#include "a2dp_sbc_constants.h"
#include "common/message_loop_thread.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.
 * 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,
bool codec_info(btav_a2dp_codec_index_t codec_index, bluetooth::a2dp::CodecId* codec_id,
                btav_a2dp_codec_config_t* codec_config);
                uint8_t* codec_info, btav_a2dp_codec_config_t* codec_config);


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