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

Commit 9901eb0e authored by Dorin Drimus's avatar Dorin Drimus
Browse files

Fix isDirectPlybackSupported to account only for currently used audio output devices

Bug: 196047314
Change-Id: Idc523e42a03f5a9cf3c8b12dd0d20184c76cbca3
Test: manual
parent dd31ee05
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3690,7 +3690,8 @@ bool AudioPolicyManager::isDirectOutputSupported(const audio_config_base_t& conf
                                                 const audio_attributes_t& attributes) {
    audio_output_flags_t output_flags = AUDIO_OUTPUT_FLAG_NONE;
    audio_flags_to_audio_output_flags(attributes.flags, &output_flags);
    sp<IOProfile> profile = getProfileForOutput(DeviceVector() /*ignore device */,
    DeviceVector outputDevices = mEngine->getOutputDevicesForAttributes(attributes);
    sp<IOProfile> profile = getProfileForOutput(outputDevices,
                                            config.sample_rate,
                                            config.format,
                                            config.channel_mask,