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

Commit eb0d0c48 authored by Eric Laurent's avatar Eric Laurent
Browse files

Fix issue 3317627.

The fix consists in selecting the digital audio device (SPDIF/HDMI)
when available if the routing strategy is STRATEGY_PHONE.

Change-Id: Ie500ae92f5c01f2511988543852ba559c6e5994b
parent aee6c07b
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1587,6 +1587,10 @@ uint32_t AudioPolicyManagerBase::getDeviceForStrategy(routing_strategy strategy,
            if (device) break;
            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_WIRED_HEADSET;
            if (device) break;
            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_AUX_DIGITAL;
            if (device) break;
            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_DGTL_DOCK_HEADSET;
            if (device) break;
            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_ANLG_DOCK_HEADSET;
            if (device) break;
#ifdef WITH_A2DP
@@ -1605,6 +1609,10 @@ uint32_t AudioPolicyManagerBase::getDeviceForStrategy(routing_strategy strategy,
            break;

        case AudioSystem::FORCE_SPEAKER:
            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_AUX_DIGITAL;
            if (device) break;
            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_DGTL_DOCK_HEADSET;
            if (device) break;
            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_ANLG_DOCK_HEADSET;
            if (device) break;
#ifdef WITH_A2DP