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

Commit 35ea0392 authored by Henri Chataing's avatar Henri Chataing Committed by Gerrit Code Review
Browse files

Merge "audio_hal_interface: Check support for a2dp hw offload v2" into main

parents c8d01f41 010029ad
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -27,13 +27,15 @@ namespace audio {
namespace a2dp {

bool update_codec_offloading_capabilities(
    const std::vector<btav_a2dp_codec_config_t>& framework_preference) {
    const std::vector<btav_a2dp_codec_config_t>& framework_preference,
    bool supports_a2dp_hw_offload_v2) {
  if (HalVersionManager::GetHalTransport() ==
      BluetoothAudioHalTransport::HIDL) {
    return hidl::a2dp::update_codec_offloading_capabilities(
        framework_preference);
  }
  return aidl::a2dp::update_codec_offloading_capabilities(framework_preference);
  return aidl::a2dp::update_codec_offloading_capabilities(
      framework_preference, supports_a2dp_hw_offload_v2);
}

// Check if new bluetooth_audio is enabled
+2 −1
Original line number Diff line number Diff line
@@ -30,7 +30,8 @@ namespace audio {
namespace a2dp {

bool update_codec_offloading_capabilities(
    const std::vector<btav_a2dp_codec_config_t>& framework_preference);
    const std::vector<btav_a2dp_codec_config_t>& framework_preference,
    bool supports_a2dp_hw_offload_v2);

// Check if new bluetooth_audio is enabled
bool is_hal_enabled();
+2 −1
Original line number Diff line number Diff line
@@ -202,7 +202,8 @@ void set_remote_delay(uint16_t delay_report) {

// Inform audio server about offloading codec; not used for now
bool update_codec_offloading_capabilities(
    const std::vector<btav_a2dp_codec_config_t>& framework_preference) {
    const std::vector<btav_a2dp_codec_config_t>& framework_preference,
    bool supports_a2dp_hw_offload_v2) {
  return false;
}

+4 −3
Original line number Diff line number Diff line
@@ -384,10 +384,11 @@ bool is_hal_force_disabled() {
}  // namespace

bool update_codec_offloading_capabilities(
    const std::vector<btav_a2dp_codec_config_t>& framework_preference) {
    const std::vector<btav_a2dp_codec_config_t>& framework_preference,
    bool supports_a2dp_hw_offload_v2) {
  /* Load the provider information if supported by the HAL. */
  provider_info =
      ::bluetooth::audio::aidl::a2dp::ProviderInfo::GetProviderInfo();
  provider_info = ::bluetooth::audio::aidl::a2dp::ProviderInfo::GetProviderInfo(
      supports_a2dp_hw_offload_v2);
  return ::bluetooth::audio::aidl::codec::UpdateOffloadingCapabilities(
      framework_preference);
}
+2 −1
Original line number Diff line number Diff line
@@ -36,7 +36,8 @@ namespace aidl {
namespace a2dp {

bool update_codec_offloading_capabilities(
    const std::vector<btav_a2dp_codec_config_t>& framework_preference);
    const std::vector<btav_a2dp_codec_config_t>& framework_preference,
    bool supports_a2dp_hw_offload_v2);

/***
 * Check if new bluetooth_audio is enabled
Loading