Merge "Spatial Audio: Add audio HAL interface for allowing or disallowing low latency audio" am: dc9bfdd2de am: 5ccb3146c7 am: 0af9666861

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1965513

Change-Id: Icbba8fce782251f1d02fc0a1e2c8359d59a3ed76
This commit is contained in:
Chen Chen 2022-02-04 01:33:08 +00:00 committed by Automerger Merge Worker
commit 39a91ddc70
3 changed files with 22 additions and 0 deletions

View file

@ -69,4 +69,12 @@ interface IBluetoothAudioProvider extends @2.1::IBluetoothAudioProvider {
* encoding.
*/
updateAudioConfiguration(AudioConfiguration audioConfig);
/**
* Called when the supported latency mode is updated.
*
* @param allowed If the peripheral devices can't keep up with low latency
* mode, the API will be called with supported is false.
*/
setLowLatencyModeAllowed(bool allowed);
};

View file

@ -209,6 +209,18 @@ Return<void> BluetoothAudioProvider::updateAudioConfiguration(
return Void();
}
Return<void> BluetoothAudioProvider::setLowLatencyModeAllowed(bool allowed) {
LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_);
if (stack_iface_ == nullptr) {
LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_)
<< " has NO session";
return Void();
}
LOG(INFO) << __func__ << " allowed: " << allowed;
return Void();
}
} // namespace implementation
} // namespace V2_2
} // namespace audio

View file

@ -56,6 +56,8 @@ class BluetoothAudioProvider : public IBluetoothAudioProvider {
Return<void> updateAudioConfiguration(
const AudioConfiguration& audioConfig) override;
Return<void> setLowLatencyModeAllowed(bool allowed) override;
protected:
sp<BluetoothAudioDeathRecipient> death_recipient_;