Loading system/audio_hal_interface/a2dp_encoding.cc +1 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,7 @@ bool set_audio_low_latency_mode_allowed(bool allowed){ hidl::a2dp::set_low_latency_mode_allowed(allowed); return true; } aidl::a2dp::set_low_latency_mode_allowed(allowed); return false; } Loading system/audio_hal_interface/aidl/a2dp_encoding.cc +9 −0 Original line number Diff line number Diff line Loading @@ -552,6 +552,15 @@ void set_remote_delay(uint16_t delay_report) { ->SetRemoteDelay(delay_report); } // Set low latency buffer mode allowed or disallowed void set_low_latency_mode_allowed(bool allowed) { if (!is_hal_enabled()) { LOG(ERROR) << __func__ << ": BluetoothAudio HAL is not enabled"; return; } active_hal_interface->SetLowLatencyModeAllowed(allowed); } } // namespace a2dp } // namespace aidl } // namespace audio Loading system/audio_hal_interface/aidl/a2dp_encoding.h +4 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,10 @@ size_t read(uint8_t* p_buf, uint32_t len); ***/ void set_remote_delay(uint16_t delay_report); /*** * Set low latency buffer mode allowed or disallowed ***/ void set_low_latency_mode_allowed(bool allowed); } // namespace a2dp } // namespace aidl } // namespace audio Loading system/audio_hal_interface/aidl/client_interface.cc +17 −0 Original line number Diff line number Diff line Loading @@ -232,6 +232,23 @@ bool BluetoothAudioClientInterface::UpdateAudioConfig( return true; } bool BluetoothAudioClientInterface::SetLowLatencyModeAllowed(bool allowed) { if (provider_ == nullptr) { LOG(INFO) << __func__ << ": BluetoothAudioHal nullptr"; return false; } auto aidl_retval = provider_->setLowLatencyModeAllowed(allowed); if (!aidl_retval.isOk()) { LOG(ERROR) << __func__ << ": BluetoothAudioHal failure: " << aidl_retval.getDescription(); return false; } return true; } int BluetoothAudioClientInterface::StartSession() { std::lock_guard<std::mutex> guard(internal_mutex_); if (provider_ == nullptr) { Loading system/audio_hal_interface/aidl/client_interface.h +2 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,8 @@ class BluetoothAudioClientInterface { bool UpdateAudioConfig(const AudioConfiguration& audioConfig); bool SetLowLatencyModeAllowed(bool allowed); void FlushAudioData(); static constexpr PcmConfiguration kInvalidPcmConfiguration = {}; Loading Loading
system/audio_hal_interface/a2dp_encoding.cc +1 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,7 @@ bool set_audio_low_latency_mode_allowed(bool allowed){ hidl::a2dp::set_low_latency_mode_allowed(allowed); return true; } aidl::a2dp::set_low_latency_mode_allowed(allowed); return false; } Loading
system/audio_hal_interface/aidl/a2dp_encoding.cc +9 −0 Original line number Diff line number Diff line Loading @@ -552,6 +552,15 @@ void set_remote_delay(uint16_t delay_report) { ->SetRemoteDelay(delay_report); } // Set low latency buffer mode allowed or disallowed void set_low_latency_mode_allowed(bool allowed) { if (!is_hal_enabled()) { LOG(ERROR) << __func__ << ": BluetoothAudio HAL is not enabled"; return; } active_hal_interface->SetLowLatencyModeAllowed(allowed); } } // namespace a2dp } // namespace aidl } // namespace audio Loading
system/audio_hal_interface/aidl/a2dp_encoding.h +4 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,10 @@ size_t read(uint8_t* p_buf, uint32_t len); ***/ void set_remote_delay(uint16_t delay_report); /*** * Set low latency buffer mode allowed or disallowed ***/ void set_low_latency_mode_allowed(bool allowed); } // namespace a2dp } // namespace aidl } // namespace audio Loading
system/audio_hal_interface/aidl/client_interface.cc +17 −0 Original line number Diff line number Diff line Loading @@ -232,6 +232,23 @@ bool BluetoothAudioClientInterface::UpdateAudioConfig( return true; } bool BluetoothAudioClientInterface::SetLowLatencyModeAllowed(bool allowed) { if (provider_ == nullptr) { LOG(INFO) << __func__ << ": BluetoothAudioHal nullptr"; return false; } auto aidl_retval = provider_->setLowLatencyModeAllowed(allowed); if (!aidl_retval.isOk()) { LOG(ERROR) << __func__ << ": BluetoothAudioHal failure: " << aidl_retval.getDescription(); return false; } return true; } int BluetoothAudioClientInterface::StartSession() { std::lock_guard<std::mutex> guard(internal_mutex_); if (provider_ == nullptr) { Loading
system/audio_hal_interface/aidl/client_interface.h +2 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,8 @@ class BluetoothAudioClientInterface { bool UpdateAudioConfig(const AudioConfiguration& audioConfig); bool SetLowLatencyModeAllowed(bool allowed); void FlushAudioData(); static constexpr PcmConfiguration kInvalidPcmConfiguration = {}; Loading