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

Commit 667f5054 authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Automerger Merge Worker
Browse files

Merge changes I261e7e67,Iab383209 am: 0676e958

parents d8b29c5e 0676e958
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1041,7 +1041,9 @@ public class BluetoothProxy {

        BluetoothLeAudioContentMetadata.Builder contentBuilder =
                new BluetoothLeAudioContentMetadata.Builder();
        if (!programInfo.isEmpty()) {
            contentBuilder.setProgramInfo(programInfo);
        }
        mBluetoothLeBroadcast.startBroadcast(contentBuilder.build(), code);
        return true;
    }
+1 −1
Original line number Diff line number Diff line
@@ -352,7 +352,7 @@ std::unordered_map<int32_t, uint16_t> octets_per_frame_map{

std::unordered_map<AudioLocation, uint32_t> audio_location_map{
    {AudioLocation::UNKNOWN,
     ::le_audio::codec_spec_conf::kLeAudioLocationMonoUnspecified},
     ::le_audio::codec_spec_conf::kLeAudioLocationFrontCenter},
    {AudioLocation::FRONT_LEFT,
     ::le_audio::codec_spec_conf::kLeAudioLocationFrontLeft},
    {AudioLocation::FRONT_RIGHT,
+2 −4
Original line number Diff line number Diff line
@@ -500,8 +500,7 @@ TEST(LeAudioClientParserTest, testParsePacMultipleRecords) {
}

TEST(LeAudioClientParserTest, testParseAudioLocationsInvalidLength) {
  types::AudioLocations locations =
      codec_spec_conf::kLeAudioLocationMonoUnspecified;
  types::AudioLocations locations = codec_spec_conf::kLeAudioLocationNotAllowed;
  const uint8_t value1[] = {
      0x01,
      0x02,
@@ -516,8 +515,7 @@ TEST(LeAudioClientParserTest, testParseAudioLocationsInvalidLength) {
}

TEST(LeAudioClientParserTest, testParseAudioLocations) {
  types::AudioLocations locations =
      codec_spec_conf::kLeAudioLocationMonoUnspecified;
  types::AudioLocations locations = codec_spec_conf::kLeAudioLocationNotAllowed;
  const uint8_t value1[] = {0x01, 0x02, 0x03, 0x04};
  ParseAudioLocations(locations, sizeof(value1), value1);
  ASSERT_EQ(locations, 0x04030201u);
+2 −2
Original line number Diff line number Diff line
@@ -580,9 +580,9 @@ std::optional<AudioContexts> LeAudioDeviceGroup::UpdateActiveContextsMap(

bool LeAudioDeviceGroup::ReloadAudioLocations(void) {
  AudioLocations updated_snk_audio_locations_ =
      codec_spec_conf::kLeAudioLocationMonoUnspecified;
      codec_spec_conf::kLeAudioLocationNotAllowed;
  AudioLocations updated_src_audio_locations_ =
      codec_spec_conf::kLeAudioLocationMonoUnspecified;
      codec_spec_conf::kLeAudioLocationNotAllowed;

  for (const auto& device : leAudioDevices_) {
    if (device.expired()) continue;
+1 −3
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ constexpr uint8_t kLeAudioCodecLC3FrameDur7500us = 0x00;
constexpr uint8_t kLeAudioCodecLC3FrameDur10000us = 0x01;

/* Audio Allocations */
constexpr uint32_t kLeAudioLocationMonoUnspecified = 0x00000000;
constexpr uint32_t kLeAudioLocationNotAllowed = 0x00000000;
constexpr uint32_t kLeAudioLocationFrontLeft = 0x00000001;
constexpr uint32_t kLeAudioLocationFrontRight = 0x00000002;
constexpr uint32_t kLeAudioLocationFrontCenter = 0x00000004;
@@ -643,8 +643,6 @@ const types::LeAudioCodecId LeAudioCodecIdLc3 = {
    .vendor_company_id = types::kLeAudioVendorCompanyIdUndefined,
    .vendor_codec_id = types::kLeAudioVendorCodecIdUndefined};

static constexpr uint32_t kChannelAllocationMono =
    codec_spec_conf::kLeAudioLocationMonoUnspecified;
static constexpr uint32_t kChannelAllocationStereo =
    codec_spec_conf::kLeAudioLocationFrontLeft |
    codec_spec_conf::kLeAudioLocationFrontRight;