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

Commit 10fda83a authored by shihchienc's avatar shihchienc Committed by Patrick Chang
Browse files

[LEA] Fix not select 32k in software path

1. Fix not select 32k in software path when property set to true
2. direction variable is boolean and this makes it never equal to kLeAudioDirectionBoth

Test: atest -c --host bluetooth_le_audio_test bluetooth_le_audio_client_test bluetooth_le_audio_codec_manager_test  --no-bazel-mode
Bug: 301358026
Change-Id: I175b531f59d794b8918b2c0047d9f27dda7b9dfa
parent 49c88fbd
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -128,8 +128,7 @@ struct codec_manager_impl {
  CodecLocation GetCodecLocation(void) const { return codec_location_; }

  bool IsOffloadDualBiDirSwbSupported(void) const {
    return codec_location_ == le_audio::types::CodecLocation::ADSP &&
           offload_dual_bidirection_swb_supported_;
    return offload_dual_bidirection_swb_supported_;
  }

  void UpdateActiveAudioConfig(
+3 −1
Original line number Diff line number Diff line
@@ -1424,7 +1424,9 @@ bool LeAudioDeviceGroup::IsAudioSetConfigurationSupported(
      AudioSetConfigurationProvider::Get()->CheckConfigurationIsBiDirSwb(
          *audio_set_conf)) {
    if (!dual_bidirection_swb_supported_ ||
        !CodecManager::GetInstance()->IsOffloadDualBiDirSwbSupported()) {
        (CodecManager::GetInstance()->GetCodecLocation() ==
             types::CodecLocation::ADSP &&
         !CodecManager::GetInstance()->IsOffloadDualBiDirSwbSupported())) {
      /* two conditions
       * 1) dual bidirection swb is not supported for both software/offload
       * 2) offload not supported
+2 −2
Original line number Diff line number Diff line
@@ -773,8 +773,8 @@ bool AudioSetConfigurationProvider::CheckConfigurationIsBiDirSwb(

bool AudioSetConfigurationProvider::CheckConfigurationIsDualBiDirSwb(
    const set_configurations::AudioSetConfiguration& set_configuration) const {
  bool single_dev_dual_bidir_swb = false;
  bool dual_dev_dual_bidir_swb = false;
  uint8_t single_dev_dual_bidir_swb = 0;
  uint8_t dual_dev_dual_bidir_swb = 0;

  for (const auto& conf : set_configuration.confs) {
    if (conf.codec.GetConfigSamplingFrequency() <