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

Commit 80f4a45a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "policy_hal: fix for FM playback without active music stream"

parents 856b5771 8abf4f4f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -280,12 +280,13 @@ status_t AudioPolicyManagerCustom::setDeviceConnectionStateInt(audio_devices_t d
#ifdef FM_POWER_OPT
        // handle FM device connection state to trigger FM AFE loopback
        if (device == AUDIO_DEVICE_OUT_FM && hasPrimaryOutput()) {
           audio_devices_t newDevice = getNewOutputDevice(mPrimaryOutput, false /*fromCache*/);
           audio_devices_t newDevice = AUDIO_DEVICE_NONE;
           if (state == AUDIO_POLICY_DEVICE_STATE_AVAILABLE) {
               mPrimaryOutput->changeRefCount(AUDIO_STREAM_MUSIC, 1);
               newDevice = newDevice | AUDIO_DEVICE_OUT_FM;
               newDevice = (audio_devices_t)(getNewOutputDevice(mPrimaryOutput, false)|AUDIO_DEVICE_OUT_FM);
               mFMIsActive = true;
           } else {
               newDevice = (audio_devices_t)(getNewOutputDevice(mPrimaryOutput, false));
               mFMIsActive = false;
               mPrimaryOutput->changeRefCount(AUDIO_STREAM_MUSIC, -1);
           }