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

Commit 35e73bbb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "leaudio: Fix choosing available configuration" into tm-qpr-dev

parents 155584b9 0fe1d07a
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1235,6 +1235,8 @@ bool LeAudioDeviceGroup::IsConfigurationSupported(
    return false;
  }

  auto required_snk_strategy = GetGroupStrategy();

  /* TODO For now: set ase if matching with first pac.
   * 1) We assume as well that devices will match requirements in order
   *    e.g. 1 Device - 1 Requirement, 2 Device - 2 Requirement etc.
@@ -1259,6 +1261,14 @@ bool LeAudioDeviceGroup::IsConfigurationSupported(
        +required_device_cnt, +ent.ase_cnt, +max_required_ase_per_dev,
        static_cast<int>(strategy));

    if (ent.direction == types::kLeAudioDirectionSink &&
        strategy != required_snk_strategy) {
      LOG_INFO(" Sink strategy mismatch (%d!=%d)",
               static_cast<int>(required_snk_strategy),
               static_cast<int>(strategy));
      return false;
    }

    for (auto* device = GetFirstDeviceWithActiveContext(context_type);
         device != nullptr && required_device_cnt > 0;
         device = GetNextDeviceWithActiveContext(device, context_type)) {
+234 −52

File changed.

Preview size limit exceeded, changes collapsed.

+143 −24

File changed.

Preview size limit exceeded, changes collapsed.