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

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

Merge "hal: Fix compressed offload SSR resume"

parents cf6ccc7c fd02a2fb
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -3563,6 +3563,7 @@ static int out_standby(struct audio_stream *stream)
static int out_on_error(struct audio_stream *stream)
{
    struct stream_out *out = (struct stream_out *)stream;
    int status = 0;

    lock_output_stream(out);
    // always send CMD_ERROR for offload streams, this
@@ -3570,11 +3571,18 @@ static int out_on_error(struct audio_stream *stream)
    // since the stream is active, offload_callback_thread is also active.
    if (out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) {
        stop_compressed_output_l(out);
    }
    pthread_mutex_unlock(&out->lock);

    status = out_standby(&out->stream.common);

    lock_output_stream(out);
    if (out->flags & AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD) {
        send_offload_cmd_l(out, OFFLOAD_CMD_ERROR);
    }
    pthread_mutex_unlock(&out->lock);

    return out_standby(&out->stream.common);
    return status;
}

/*