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

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

Test for issue 2041105: CPU pegged after lost of bluetooth connection[WAR ROOM].

Merge change 7419 from master that may help eliminate the problem.
This change was for a different use case (when disabling A2DP to switch output to SCO) but without a repro case it is worth trying.
parent 8d923e75
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -202,8 +202,8 @@ void AudioFlinger::setA2dpEnabled_l(bool enable)
    SortedVector < sp<MixerThread::Track> > tracks;
    SortedVector < wp<MixerThread::Track> > activeTracks;
    
    LOGV_IF(enable, "set output to A2DP\n");
    LOGV_IF(!enable, "set output to hardware audio\n");
    LOGD_IF(enable, "set output to A2DP\n");
    LOGD_IF(!enable, "set output to hardware audio\n");

    // Transfer tracks playing on MUSIC stream from one mixer to the other
    if (enable) {
@@ -212,6 +212,7 @@ void AudioFlinger::setA2dpEnabled_l(bool enable)
    } else {
        mA2dpMixerThread->getTracks_l(tracks, activeTracks);
        mHardwareMixerThread->putTracks_l(tracks, activeTracks);
        mA2dpMixerThread->mOutput->standby();
    }
    mA2dpEnabled = enable;
    mNotifyA2dpChange = true;