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

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

Merge "audio: follow routine lock order to avoid deadlock"

parents dc477cd8 425180d0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4663,7 +4663,10 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs)
            if ((usecase->type == PCM_PLAYBACK) &&
                (usecase->devices & AUDIO_DEVICE_OUT_ALL_A2DP)){
                ALOGD("reconfigure a2dp... forcing device switch");

                pthread_mutex_unlock(&adev->lock);
                lock_output_stream(usecase->stream.out);
                pthread_mutex_lock(&adev->lock);
                audio_extn_a2dp_set_handoff_mode(true);
                //force device switch to re configure encoder
                select_devices(adev, usecase->id);