diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index a250c6b53996..5e5e0f78f26d 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -1206,7 +1206,9 @@ static int snd_compr_task_start_prepare(struct snd_compr_task_runtime *task, { if (task == NULL) return -EINVAL; - if (task->state >= SND_COMPRESS_TASK_STATE_FINISHED) + /* only an unqueued or already finished task may be (re)started */ + if (task->state != SND_COMPRESS_TASK_STATE_IDLE && + task->state != SND_COMPRESS_TASK_STATE_FINISHED) return -EBUSY; if (utask->input_size > task->input->size) return -EINVAL;