Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17112632 authored by Dorin Drimus's avatar Dorin Drimus
Browse files

Do not support direct audio tracks when the non-offload effect is enabled

When the non-offload effect is ON, no other direct tracks can be created, which means
that the API has to report that direct profiles are not available/supported by the device.

Bug: b/246759253
Test: CTS - android.media.audio.cts.DirectAudioProfilesForAttributesTest
Change-Id: Ifa83be883c81925a757fd121f51c5d476fb9cdf8
parent 9f011df1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4104,6 +4104,9 @@ audio_direct_mode_t AudioPolicyManager::getDirectPlaybackSupport(const audio_att

status_t AudioPolicyManager::getDirectProfilesForAttributes(const audio_attributes_t* attr,
                                                AudioProfileVector& audioProfilesVector) {
    if (mEffects.isNonOffloadableEffectEnabled()) {
        return OK;
    }
    DeviceVector devices;
    status_t status = getDevicesForAttributes(*attr, devices, false /* forVolume */);
    if (status != OK) {