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

Commit 9f74cf31 authored by Eric Laurent's avatar Eric Laurent Committed by Ytai Ben-Tsvi
Browse files

Bluetooth audio HAL: fix buffer size for spatializer

Take new spatializer flag into account for minimum buffer
size adjustment logic in adev_open_output_stream()

Bug: 200183652
Test: spatial audio playback with a2dp offload disabled
Ignore-AOSP-First: Spatial audio feature
Change-Id: I8b31a1babddbb5e6a3f7039b9b0383c2656de648
parent c6ba8a70
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -766,7 +766,8 @@ int adev_open_output_stream(struct audio_hw_device* dev,
  }

  // Ensure minimum buffer duration for spatialized output
  if (flags == (AUDIO_OUTPUT_FLAG_FAST | AUDIO_OUTPUT_FLAG_DEEP_BUFFER) &&
  if ((flags == (AUDIO_OUTPUT_FLAG_FAST | AUDIO_OUTPUT_FLAG_DEEP_BUFFER) ||
       flags == AUDIO_OUTPUT_FLAG_SPATIALIZER) &&
      out->preferred_data_interval_us <
          kBluetoothSpatializerOutputBufferMs * 1000) {
    out->preferred_data_interval_us =