AudioPolicyManager: fix offload playback for speaker and BT
Without this, deep buffer playback is used.
Fixes regression from commit 4e4647077f00c47650d6ecd66cd812073371bd10
Test: Play music with Speaker and BT
Bug: 123371431
Change-Id: Ic5d23c6863223f5456414c887c14fda90aa06f5f
diff --git a/services/audiopolicy/common/managerdefinitions/include/IOProfile.h b/services/audiopolicy/common/managerdefinitions/include/IOProfile.h
index dc409a7..e0b56d4 100644
--- a/services/audiopolicy/common/managerdefinitions/include/IOProfile.h
+++ b/services/audiopolicy/common/managerdefinitions/include/IOProfile.h
@@ -121,6 +121,9 @@
bool deviceSupportsEncodedFormats(audio_devices_t device) const
{
+ if (device == AUDIO_DEVICE_NONE) {
+ return true; // required for isOffloadSupported() check
+ }
DeviceVector deviceList =
mSupportedDevices.getDevicesFromTypeMask(device);
if (!deviceList.empty()) {