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

Commit aaeca6af authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Gerrit Code Review
Browse files

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

parents c276d273 27766ba7
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());
    };
  }