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

Commit ffc0f9ec authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6864616 from 9e85e402 to rvc-qpr1-release

Change-Id: Icd7aaf900d51795984d13c342220d869edce5e4b
parents 6bfe35f7 9e85e402
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -2994,16 +2994,8 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)

        lock_output_stream(out);

        // The usb driver needs to be closed after usb device disconnection
        // otherwise audio is no longer played on the new usb devices.
        // By forcing the stream in standby, the usb stack refcount drops to 0
        // and the driver is closed.
        if (val == AUDIO_DEVICE_NONE &&
                audio_is_usb_out_device(out->devices)) {
            if (out->usecase == USECASE_AUDIO_PLAYBACK_OFFLOAD) {
                ALOGD("%s() putting the usb device in standby after disconnection", __func__);
                out_standby_l(&out->stream.common);
            }
            val = AUDIO_DEVICE_OUT_SPEAKER;
            forced_speaker_fallback = true;
        }