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

Commit d84fc0f2 authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

LE Audio: default channel count to 1, if not present

Bap spec 4.3.1 says channel count should default do 1 if not present.

Bug: none
Test: verified on UPF
Merged-In: I7fb47a48b75eb7934412b6732b7ead4f7a5931da
Change-Id: I7fb47a48b75eb7934412b6732b7ead4f7a5931da
parent 30ac6955
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());
    };
  }