BT: add LOW_LATENCY mode if low latency allowed am: 25b4819e08
am: 2194196c50
am: 5c265525ff
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2696655 Change-Id: Ie0626179a56334125cd48a048d162f09882888eb Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
61634ae561
1 changed files with 10 additions and 0 deletions
|
@ -441,6 +441,16 @@ void BluetoothAudioSession::ReportControlStatus(bool start_resp,
|
|||
void BluetoothAudioSession::ReportLowLatencyModeAllowedChanged(bool allowed) {
|
||||
std::lock_guard<std::recursive_mutex> guard(mutex_);
|
||||
low_latency_allowed_ = allowed;
|
||||
// TODO(b/294498919): Remove this after there is API to update latency mode
|
||||
// after audio session started. If low_latency_allowed_ is true, the session
|
||||
// can support LOW_LATENCY and FREE LatencyMode.
|
||||
if (low_latency_allowed_) {
|
||||
if (std::find(latency_modes_.begin(), latency_modes_.end(),
|
||||
LatencyMode::LOW_LATENCY) == latency_modes_.end()) {
|
||||
LOG(INFO) << __func__ << " - insert LOW_LATENCY LatencyMode";
|
||||
latency_modes_.push_back(LatencyMode::LOW_LATENCY);
|
||||
}
|
||||
}
|
||||
if (observers_.empty()) {
|
||||
LOG(WARNING) << __func__ << " - SessionType=" << toString(session_type_)
|
||||
<< " has NO port state observer";
|
||||
|
|
Loading…
Reference in a new issue