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

Commit ca39936b authored by juyuchen's avatar juyuchen Committed by android-build-merger
Browse files

Merge "audio policy: choose bt-sco and speaker-safe path." into pi-dev

am: 1bba156f

Change-Id: I56ea91ec0bd6deb33beae782bf4544a37afa5c9b
parents be83a90b 1bba156f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -453,6 +453,12 @@ audio_devices_t Engine::getDeviceForStrategyInt(routing_strategy strategy,
            }
            // Use both Bluetooth SCO and phone default output when ringing in normal mode
            if (mForceUse[AUDIO_POLICY_FORCE_FOR_COMMUNICATION] == AUDIO_POLICY_FORCE_BT_SCO) {
                if ((strategy == STRATEGY_SONIFICATION) &&
                        (device & AUDIO_DEVICE_OUT_SPEAKER) &&
                        (availableOutputDevicesType & AUDIO_DEVICE_OUT_SPEAKER_SAFE)) {
                    device |= AUDIO_DEVICE_OUT_SPEAKER_SAFE;
                    device &= ~AUDIO_DEVICE_OUT_SPEAKER;
                }
                if (device2 != AUDIO_DEVICE_NONE) {
                    device |= device2;
                    break;