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

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

Fix speakerphone routing to analog dock

The audio routing policy when speakerphone is on and a dock with built-in
speakers is connected should be to output audio to teh dock speakers

Also removed route to SCO car kit if forced usage is not SCO as the SCO
socket might not be established.

Change-Id: I1aa2954092e28de935304b90f7a7a64d661934c7
parent c89d59ce
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -1605,10 +1605,8 @@ uint32_t AudioPolicyManagerBase::getDeviceForStrategy(routing_strategy strategy,
            break;

        case AudioSystem::FORCE_SPEAKER:
            if (!isInCall() || strategy != STRATEGY_DTMF) {
                device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_BLUETOOTH_SCO_CARKIT;
            device = mAvailableOutputDevices & AudioSystem::DEVICE_OUT_ANLG_DOCK_HEADSET;
            if (device) break;
            }
#ifdef WITH_A2DP
            // when not in a phone call, phone strategy should route STREAM_VOICE_CALL to
            // A2DP speaker when forcing to speaker output