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

Commit c7d66559 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski Committed by Gerrit Code Review
Browse files

Merge "leaudio: Fix setting target PHY"

parents 809fc200 93344f85
Loading
Loading
Loading
Loading
+11 −1
Original line number Original line Diff line number Diff line
@@ -642,7 +642,17 @@ uint8_t LeAudioDeviceGroup::GetPhyBitmask(uint8_t direction) {
        phy_bitfield &= leAudioDevice->GetPhyBitmask();
        phy_bitfield &= leAudioDevice->GetPhyBitmask();


        // A value of 0x00 denotes no preference
        // A value of 0x00 denotes no preference
        if (ase->preferred_phy) phy_bitfield &= ase->preferred_phy;
        if (ase->preferred_phy && (phy_bitfield & ase->preferred_phy)) {
          phy_bitfield &= ase->preferred_phy;
          LOG_DEBUG("Using ASE preferred phy 0x%02x",
                    static_cast<int>(phy_bitfield));
        } else {
          LOG_WARN(
              "ASE preferred 0x%02x has nothing common with phy_bitfield "
              "0x%02x ",
              static_cast<int>(ase->preferred_phy),
              static_cast<int>(phy_bitfield));
        }
      }
      }
    } while ((ase = leAudioDevice->GetNextActiveAseWithSameDirection(ase)));
    } while ((ase = leAudioDevice->GetNextActiveAseWithSameDirection(ase)));
  } while ((leAudioDevice = GetNextActiveDevice(leAudioDevice)));
  } while ((leAudioDevice = GetNextActiveDevice(leAudioDevice)));