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

Commit 103f9d58 authored by Mikhail Naganov's avatar Mikhail Naganov Committed by Gerrit Code Review
Browse files

Merge changes I84267c41,I3fb3b78f into main

* changes:
  AudioPolicy: capengine: enable speaker selection by address
  AudioPolicy: fix 64bit criterion type computation
parents 9d15fe69 d18ff637
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -534,7 +534,7 @@ ConversionResult<CapCriterion> aidl2legacy_AudioHalCapCriterionV2_Criterion(
            }
            std::string deviceLiteral = VALUE_OR_RETURN_STATUS(truncatePrefix(legacyTypeLiteral,
                    isOut ? gLegacyOutputDevicePrefix : gLegacyInputDevicePrefix));
            uint64_t pfwCriterionValue = 1 << shift++;
            uint64_t pfwCriterionValue = 1ULL << (shift++);
            criterionType.valuePairs.push_back(
                    {pfwCriterionValue, static_cast<int32_t>(legacyDeviceType), deviceLiteral});
            ALOGV("%s: adding %" PRIu64 " %d %s %s", __func__, pfwCriterionValue, legacyDeviceType,
+3 −2
Original line number Diff line number Diff line
@@ -405,8 +405,9 @@ DeviceVector Engine::getDevicesForProductStrategy(product_strategy_t ps) const
        auto defaultDevice = getApmObserver()->getDefaultOutputDevice();
        ALOG_ASSERT(defaultDevice != nullptr, "no valid default device defined");
        selectedDevices = DeviceVector(defaultDevice);
    } else if (/*device_distinguishes_on_address(*deviceTypes.begin())*/ isSingleDeviceType(
            deviceTypes, AUDIO_DEVICE_OUT_BUS)) {
    } else if (/*device_distinguishes_on_address(*deviceTypes.begin())*/
            isSingleDeviceType(deviceTypes, AUDIO_DEVICE_OUT_BUS) ||
            isSingleDeviceType(deviceTypes, AUDIO_DEVICE_OUT_SPEAKER)) {
        // We do expect only one device for these types of devices
        // Criterion device address garantee this one is available
        // If this criterion is not wished, need to ensure this device is available