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

Commit 976674fe authored by Antoine SOULIER's avatar Antoine SOULIER
Browse files

Remove leaudio_hal_client_asrc flag

Bug: 312273987
Test: m com.android.btservices
Change-Id: Id5ad7c3a807e39d659c609e309d940213b4ec818
parent 1a9a7e27
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -31,13 +31,6 @@ flag {
    bug: "309665975"
}

flag {
    name: "leaudio_hal_client_asrc"
    namespace: "bluetooth"
    description: "Sync audio stream with the bluetooth link clock"
    bug: "312273987"
}

flag {
    name: "metadata_api_inactive_audio_device_upon_connection"
    is_exported: true
+8 −17
Original line number Diff line number Diff line
@@ -227,7 +227,6 @@ void SourceImpl::SendAudioData() {
    sStats.media_read_last_underflow_us = bluetooth::common::time_get_os_boottime_us();
  }

  if (com::android::bluetooth::flags::leaudio_hal_client_asrc()) {
  auto asrc_buffers = asrc_->Run(data);

  std::lock_guard<std::mutex> guard(audioSourceCallbacksMutex_);
@@ -236,12 +235,6 @@ void SourceImpl::SendAudioData() {
      audioSourceCallbacks_->OnAudioDataReady(*buffer);
    }
  }
  } else {
    std::lock_guard<std::mutex> guard(audioSourceCallbacksMutex_);
    if (audioSourceCallbacks_ != nullptr) {
      audioSourceCallbacks_->OnAudioDataReady(data);
    }
  }
}

bool SourceImpl::InitAudioSinkThread() {
@@ -267,11 +260,9 @@ bool SourceImpl::InitAudioSinkThread() {

void SourceImpl::StartAudioTicks() {
  wakelock_acquire();
  if (com::android::bluetooth::flags::leaudio_hal_client_asrc()) {
  asrc_ = std::make_unique<bluetooth::audio::asrc::SourceAudioHalAsrc>(
          worker_thread_, source_codec_config_.num_channels, source_codec_config_.sample_rate,
          source_codec_config_.bits_per_sample, source_codec_config_.data_interval_us);
  }
  audio_timer_.SchedulePeriodic(
          worker_thread_->GetWeakPtr(), FROM_HERE,
          base::BindRepeating(&SourceImpl::SendAudioData, weak_factory_.GetWeakPtr()),