Spatial Audio: Add setLatencyMode and setCodecType API with empty
implementation
Bug: 216832331
Test: build
Tag: #feature
Change-Id: I0ccfee39d1f86da81b50f0757de87b6645baacf8
diff --git a/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp b/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp
index f626db8..96cd9ef 100644
--- a/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp
+++ b/bluetooth/audio/utils/aidl_session/BluetoothAudioSession.cpp
@@ -508,6 +508,36 @@
}
}
+void BluetoothAudioSession::SetLatencyMode(LatencyMode latency_mode) {
+ std::lock_guard<std::recursive_mutex> guard(mutex_);
+ if (!IsSessionReady()) {
+ LOG(DEBUG) << __func__ << " - SessionType=" << toString(session_type_)
+ << " has NO session";
+ return;
+ }
+
+ auto hal_retval = stack_iface_->setLatencyMode(latency_mode);
+ if (!hal_retval.isOk()) {
+ LOG(WARNING) << __func__ << " - IBluetoothAudioPort SessionType="
+ << toString(session_type_) << " failed";
+ }
+}
+
+void BluetoothAudioSession::SetCodecType(CodecType codec_type) {
+ std::lock_guard<std::recursive_mutex> guard(mutex_);
+ if (!IsSessionReady()) {
+ LOG(DEBUG) << __func__ << " - SessionType=" << toString(session_type_)
+ << " has NO session";
+ return;
+ }
+
+ auto hal_retval = stack_iface_->setCodecType(codec_type);
+ if (!hal_retval.isOk()) {
+ LOG(WARNING) << __func__ << " - IBluetoothAudioPort SessionType="
+ << toString(session_type_) << " failed";
+ }
+}
+
bool BluetoothAudioSession::IsAidlAvailable() {
if (is_aidl_checked) return is_aidl_available;
is_aidl_available =