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

Commit bb1d6041 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use device for given attributes to query direct playback support."

parents 22530c3c c8f7dfcb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3782,9 +3782,10 @@ audio_direct_mode_t AudioPolicyManager::getDirectPlaybackSupport(const audio_att
    }
    flags = (audio_output_flags_t)((flags & relevantFlags) | AUDIO_OUTPUT_FLAG_DIRECT);

    DeviceVector outputDevices = mEngine->getOutputDevicesForAttributes(*attr);
    for (const auto& hwModule : mHwModules) {
        for (const auto& curProfile : hwModule->getOutputProfiles()) {
            if (!curProfile->isCompatibleProfile(DeviceVector(),
            if (!curProfile->isCompatibleProfile(outputDevices,
                    config->sample_rate, nullptr /*updatedSamplingRate*/,
                    config->format, nullptr /*updatedFormat*/,
                    config->channel_mask, nullptr /*updatedChannelMask*/,