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

Commit 25e8230d authored by Dorin Drimus's avatar Dorin Drimus Committed by Android (Google) Code Review
Browse files

Merge "Fix isDirectPlybackSupported to account only for currently used audio output devices"

parents d36f3ea2 9901eb0e
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -3690,7 +3690,8 @@ bool AudioPolicyManager::isDirectOutputSupported(const audio_config_base_t& conf
                                                 const audio_attributes_t& attributes) {
                                                 const audio_attributes_t& attributes) {
    audio_output_flags_t output_flags = AUDIO_OUTPUT_FLAG_NONE;
    audio_output_flags_t output_flags = AUDIO_OUTPUT_FLAG_NONE;
    audio_flags_to_audio_output_flags(attributes.flags, &output_flags);
    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.sample_rate,
                                            config.format,
                                            config.format,
                                            config.channel_mask,
                                            config.channel_mask,