aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorDharageswari R <dharageswari.r@intel.com>2016-06-03 08:59:36 -0400
committerMark Brown <broonie@kernel.org>2016-06-07 09:19:11 -0400
commit1ae7ca041a460502b0f9877d84d0f0d9bed9cb72 (patch)
tree210fb5178074cad324de555360995719a6b793da /sound/soc
parent353f72aa77581926c0634fffe168f206435a8fc6 (diff)
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: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/intel/skylake/skl-messages.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index 07d2a73ff207..804091aa6e64 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -1046,7 +1046,7 @@ int skl_delete_pipe(struct skl_sst *ctx, struct skl_pipe *pipe)
1046 1046
1047 dev_dbg(ctx->dev, "%s: pipe = %d\n", __func__, pipe->ppl_id); 1047 dev_dbg(ctx->dev, "%s: pipe = %d\n", __func__, pipe->ppl_id);
1048 1048
1049 /* If pipe is not started, do not try to stop the pipe in FW. */ 1049 /* If pipe is started, do stop the pipe in FW. */
1050 if (pipe->state > SKL_PIPE_STARTED) { 1050 if (pipe->state > SKL_PIPE_STARTED) {
1051 ret = skl_set_pipe_state(ctx, pipe, PPL_PAUSED); 1051 ret = skl_set_pipe_state(ctx, pipe, PPL_PAUSED);
1052 if (ret < 0) { 1052 if (ret < 0) {
@@ -1055,18 +1055,20 @@ int skl_delete_pipe(struct skl_sst *ctx, struct skl_pipe *pipe)
1055 } 1055 }
1056 1056
1057 pipe->state = SKL_PIPE_PAUSED; 1057 pipe->state = SKL_PIPE_PAUSED;
1058 } else { 1058 }
1059 /* If pipe was not created in FW, do not try to delete it */
1060 if (pipe->state < SKL_PIPE_CREATED)
1061 return 0;
1062 1059
1063 ret = skl_ipc_delete_pipeline(&ctx->ipc, pipe->ppl_id); 1060 /* If pipe was not created in FW, do not try to delete it */
1064 if (ret < 0) 1061 if (pipe->state < SKL_PIPE_CREATED)
1065 dev_err(ctx->dev, "Failed to delete pipeline\n"); 1062 return 0;
1066 1063
1067 pipe->state = SKL_PIPE_INVALID; 1064 ret = skl_ipc_delete_pipeline(&ctx->ipc, pipe->ppl_id);
1065 if (ret < 0) {
1066 dev_err(ctx->dev, "Failed to delete pipeline\n");
1067 return ret;
1068 } 1068 }
1069 1069
1070 pipe->state = SKL_PIPE_INVALID;
1071
1070 return ret; 1072 return ret;
1071} 1073}
1072 1074