diff mbox

[01/10] ASoC: Intel: Skylake: Fix to delete DSP pipe after stopping pipe

Message ID 1488910446-26415-2-git-send-email-jeeja.kp@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jeeja KP March 7, 2017, 6:13 p.m. UTC
From: Jeeja KP <jeeja.kp@intel.com>

DSP pipe needs to stopped before deleting the pipe. Currently check is
is for pipe state > STARTED, which is incorrect. So changed to include
pipe state STARTED to stop the pipe if it started.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
---
 sound/soc/intel/skylake/skl-messages.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vinod Koul March 9, 2017, 6:17 a.m. UTC | #1
On Tue, Mar 07, 2017 at 11:43:57PM +0530, jeeja.kp@intel.com wrote:
> From: Jeeja KP <jeeja.kp@intel.com>
> 
> DSP pipe needs to stopped before deleting the pipe. Currently check is
 needs to be ...

> is for pipe state > STARTED, which is incorrect. So changed to include

double is, please fix. Otherwise looks good to me.
diff mbox

Patch

diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index e668704..ed57696 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -1098,7 +1098,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 started, do stop the pipe in FW. */
-	if (pipe->state > SKL_PIPE_STARTED) {
+	if (pipe->state >= SKL_PIPE_STARTED) {
 		ret = skl_set_pipe_state(ctx, pipe, PPL_PAUSED);
 		if (ret < 0) {
 			dev_err(ctx->dev, "Failed to stop pipeline\n");