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

Commit 5409cd52 authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Android (Google) Code Review
Browse files

Merge "LE Audio: default channel count to 1, if not present" into tm-qpr-dev

parents 77927d3a d84fc0f2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2362,6 +2362,11 @@ uint8_t LeAudioDevice::GetLc3SupportedChannelCount(uint8_t direction) {
      auto supported_channel_count_ltv = pac.codec_spec_caps.Find(
          codec_spec_caps::kLeAudioCodecLC3TypeAudioChannelCounts);

      if (supported_channel_count_ltv == std::nullopt ||
          supported_channel_count_ltv->size() == 0L) {
        return 1;
      }

      return VEC_UINT8_TO_UINT8(supported_channel_count_ltv.value());
    };
  }