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

Commit 1ae7ca04 authored by Dharageswari R's avatar Dharageswari R Committed by Mark Brown
Browse files

ASoC: Intel: Skylake: Don't pause stopped pipeline while deleting



If pipeline is not STARTED, we do not need to pause pipeline while
deleting.

Signed-off-by: default avatarDharageswari R <dharageswari.r@intel.com>
Signed-off-by: default avatarJeeja KP <jeeja.kp@intel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 353f72aa
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -1046,7 +1046,7 @@ int skl_delete_pipe(struct skl_sst *ctx, struct skl_pipe *pipe)

	dev_dbg(ctx->dev, "%s: pipe = %d\n", __func__, pipe->ppl_id);

	/* If pipe is not started, do not try to stop the pipe in FW. */
	/* If pipe is started, do stop the pipe in FW. */
	if (pipe->state > SKL_PIPE_STARTED) {
		ret = skl_set_pipe_state(ctx, pipe, PPL_PAUSED);
		if (ret < 0) {
@@ -1055,17 +1055,19 @@ int skl_delete_pipe(struct skl_sst *ctx, struct skl_pipe *pipe)
		}

		pipe->state = SKL_PIPE_PAUSED;
	} else {
	}

	/* If pipe was not created in FW, do not try to delete it */
	if (pipe->state < SKL_PIPE_CREATED)
		return 0;

	ret = skl_ipc_delete_pipeline(&ctx->ipc, pipe->ppl_id);
		if (ret < 0)
	if (ret < 0) {
		dev_err(ctx->dev, "Failed to delete pipeline\n");
		return ret;
	}

	pipe->state = SKL_PIPE_INVALID;
	}

	return ret;
}