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

Commit 82fd4478 authored by Jack He's avatar Jack He Committed by Gerrit Code Review
Browse files

Merge "leaudio: Fix possible race when confirming stream start"

parents 6844bbaf 91a8cc85
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -425,6 +425,7 @@ void LeAudioClientAudioSource::Release(const void* instance) {
}

void LeAudioClientAudioSource::ConfirmStreamingRequest() {
  std::lock_guard<std::mutex> guard(sinkInterfaceMutex_);
  LOG(INFO) << __func__;
  if ((sinkClientInterface_ == nullptr) ||
      (le_audio_sink_hal_state != HAL_STARTED)) {
@@ -451,6 +452,7 @@ void LeAudioClientAudioSource::SuspendedForReconfiguration() {
}

void LeAudioClientAudioSource::CancelStreamingRequest() {
  std::lock_guard<std::mutex> guard(sinkInterfaceMutex_);
  LOG(INFO) << __func__;
  if ((sinkClientInterface_ == nullptr) ||
      (le_audio_sink_hal_state != HAL_STARTED)) {