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

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

Snap for 6866343 from 3fb3a6ee to sc-d1-release

Change-Id: I48c100efce0a6dc0fb92e830de16cca5764689b1
parents a9eef86c 3fb3a6ee
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -3002,16 +3002,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;
        }