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

Commit 601149e2 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "le_audio/client_audio: Fix deadlock on Stop()" am: b72c48d9 am: 4471fe52 am: 55b35e5f

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/1945472

Change-Id: I911ccb560512ecbe3b3c668d18f15c01f532d468
parents 8ca4db78 55b35e5f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -315,12 +315,13 @@ void LeAudioClientAudioSource::Stop() {

  sinkClientInterface->StopSession();
  le_audio_sink_hal_state = HAL_STOPPED;
  std::lock_guard<std::mutex> guard(sinkInterfaceMutex);
  localAudioSinkReceiver = nullptr;

  if (CodecManager::GetInstance()->GetCodecLocation() == CodecLocation::HOST) {
    stop_audio_ticks();
  }

  std::lock_guard<std::mutex> guard(sinkInterfaceMutex);
  localAudioSinkReceiver = nullptr;
}

const void* LeAudioClientAudioSource::Acquire() {