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

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

Merge "Only returns supported mixer attributes for USB output devices." into udc-dev

parents 5ea3a6d1 96daffce
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -4373,6 +4373,11 @@ status_t AudioPolicyManager::getSupportedMixerAttributes(
        ALOGE("%s the requested device is currently unavailable", __func__);
        return BAD_VALUE;
    }
    if (!audio_is_usb_out_device(deviceDescriptor->type())) {
        ALOGE("%s the requested device(type=%#x) is not usb device", __func__,
              deviceDescriptor->type());
        return BAD_VALUE;
    }
    for (const auto& hwModule : mHwModules) {
        for (const auto& curProfile : hwModule->getOutputProfiles()) {
            if (curProfile->supportsDevice(deviceDescriptor)) {