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

Commit db1df361 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

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

parents c8a0cae9 1df77b62
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -4373,6 +4373,11 @@ status_t AudioPolicyManager::getSupportedMixerAttributes(
        ALOGE("%s the requested device is currently unavailable", __func__);
        ALOGE("%s the requested device is currently unavailable", __func__);
        return BAD_VALUE;
        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& hwModule : mHwModules) {
        for (const auto& curProfile : hwModule->getOutputProfiles()) {
        for (const auto& curProfile : hwModule->getOutputProfiles()) {
            if (curProfile->supportsDevice(deviceDescriptor)) {
            if (curProfile->supportsDevice(deviceDescriptor)) {