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

Commit d18ff637 authored by François Gaffie's avatar François Gaffie
Browse files

AudioPolicy: capengine: enable speaker selection by address



Bug: 377726811
Test: m

Change-Id: I84267c411e2cb0a9cbc9cc11036aca8b7ef75d24
Signed-off-by: default avatarFrançois Gaffie <francois.gaffie@ampere.cars>
parent 3ce9a160
Loading
Loading
Loading
Loading
+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