Lines Matching defs:pipe
503 struct skl_pipe_params *params = mconfig->pipe->p_params;
990 if (mconfig->pipe->state != SKL_PIPE_CREATED) {
992 mconfig->pipe->state, mconfig->pipe->ppl_id);
1005 msg.ppl_instance_id = mconfig->pipe->ppl_id;
1198 static int skl_set_pipe_state(struct skl_dev *skl, struct skl_pipe *pipe,
1203 return skl_ipc_set_pipeline_state(&skl->ipc, pipe->ppl_id, state);
1212 int skl_create_pipeline(struct skl_dev *skl, struct skl_pipe *pipe)
1216 dev_dbg(skl->dev, "%s: pipe_id = %d\n", __func__, pipe->ppl_id);
1218 ret = skl_ipc_create_pipeline(&skl->ipc, pipe->memory_pages,
1219 pipe->pipe_priority, pipe->ppl_id,
1220 pipe->lp_mode);
1226 pipe->state = SKL_PIPE_CREATED;
1237 int skl_delete_pipe(struct skl_dev *skl, struct skl_pipe *pipe)
1241 dev_dbg(skl->dev, "%s: pipe = %d\n", __func__, pipe->ppl_id);
1243 /* If pipe was not created in FW, do not try to delete it */
1244 if (pipe->state < SKL_PIPE_CREATED)
1247 /* If pipe is started, do stop the pipe in FW. */
1248 if (pipe->state >= SKL_PIPE_STARTED) {
1249 ret = skl_set_pipe_state(skl, pipe, PPL_PAUSED);
1255 pipe->state = SKL_PIPE_PAUSED;
1258 /* reset pipe state before deletion */
1259 ret = skl_set_pipe_state(skl, pipe, PPL_RESET);
1261 dev_err(skl->dev, "Failed to reset pipe ret=%d\n", ret);
1265 pipe->state = SKL_PIPE_RESET;
1267 ret = skl_ipc_delete_pipeline(&skl->ipc, pipe->ppl_id);
1273 pipe->state = SKL_PIPE_INVALID;
1280 * For processing data the pipe need to be run by sending IPC set pipe state
1283 int skl_run_pipe(struct skl_dev *skl, struct skl_pipe *pipe)
1287 dev_dbg(skl->dev, "%s: pipe = %d\n", __func__, pipe->ppl_id);
1289 /* If pipe was not created in FW, do not try to pause or delete */
1290 if (pipe->state < SKL_PIPE_CREATED)
1294 ret = skl_set_pipe_state(skl, pipe, PPL_PAUSED);
1296 dev_err(skl->dev, "Failed to pause pipe\n");
1300 pipe->state = SKL_PIPE_PAUSED;
1302 ret = skl_set_pipe_state(skl, pipe, PPL_RUNNING);
1304 dev_err(skl->dev, "Failed to start pipe\n");
1308 pipe->state = SKL_PIPE_STARTED;
1314 * Stop the pipeline by sending set pipe state IPC
1317 int skl_stop_pipe(struct skl_dev *skl, struct skl_pipe *pipe)
1321 dev_dbg(skl->dev, "In %s pipe=%d\n", __func__, pipe->ppl_id);
1323 /* If pipe was not created in FW, do not try to pause or delete */
1324 if (pipe->state < SKL_PIPE_PAUSED)
1327 ret = skl_set_pipe_state(skl, pipe, PPL_PAUSED);
1329 dev_dbg(skl->dev, "Failed to stop pipe\n");
1333 pipe->state = SKL_PIPE_PAUSED;
1339 * Reset the pipeline by sending set pipe state IPC this will reset the DMA
1342 int skl_reset_pipe(struct skl_dev *skl, struct skl_pipe *pipe)
1346 /* If pipe was not created in FW, do not try to pause or delete */
1347 if (pipe->state < SKL_PIPE_PAUSED)
1350 ret = skl_set_pipe_state(skl, pipe, PPL_RESET);
1352 dev_dbg(skl->dev, "Failed to reset pipe ret=%d\n", ret);
1356 pipe->state = SKL_PIPE_RESET;