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

Commit 2c4f8cec authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "Audio policy: fix areAllDevicesSupported()" into rvc-dev

parents 55bfd11f 0e26e3f9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -320,7 +320,7 @@ sp<DeviceDescriptor> HwModuleCollection::getDeviceDescriptor(const audio_devices
{
    String8 devAddress = (address == nullptr || !matchAddress) ? String8("") : String8(address);
    // handle legacy remote submix case where the address was not always specified
    if (device_distinguishes_on_address(deviceType) && (devAddress.length() == 0)) {
    if (audio_is_remote_submix_device(deviceType) && (devAddress.length() == 0)) {
        devAddress = String8("0");
    }

+2 −2
Original line number Diff line number Diff line
@@ -3072,7 +3072,7 @@ bool AudioPolicyManager::areAllDevicesSupported(
    for (size_t i = 0; i < devices.size(); i++) {
        sp<DeviceDescriptor> devDesc = mHwModules.getDeviceDescriptor(
                devices[i].mType, devices[i].mAddress.c_str(), String8(),
                AUDIO_FORMAT_DEFAULT, false /*allowToCreate*/, false /*matchAddress*/);
                AUDIO_FORMAT_DEFAULT, false /*allowToCreate*/, true /*matchAddress*/);
        if (devDesc == nullptr || (predicate != nullptr && !predicate(devices[i].mType))) {
            ALOGE("%s: device type %#x address %s not supported or not an output device",
                    context, devices[i].mType, devices[i].mAddress.c_str());
@@ -4837,7 +4837,7 @@ status_t AudioPolicyManager::checkOutputsForDevice(const sp<DeviceDescriptor>& d

                if (output != AUDIO_IO_HANDLE_NONE) {
                    addOutput(output, desc);
                    if (device_distinguishes_on_address(deviceType) && address != "0") {
                    if (audio_is_remote_submix_device(deviceType) && address != "0") {
                        sp<AudioPolicyMix> policyMix;
                        if (mPolicyMixes.getAudioPolicyMix(deviceType, address, policyMix)
                                == NO_ERROR) {