1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2015 Intel Corporation
5 #ifndef __INCLUDE_PIPELINE_H__
6 #define __INCLUDE_PIPELINE_H__
8 #include <cmdline_parse.h>
10 #include "pipeline_be.h"
13 * Pipeline type front-end operations
16 typedef void* (*pipeline_fe_op_init)(struct pipeline_params *params,
19 typedef int (*pipeline_fe_op_post_init)(void *pipeline);
21 typedef int (*pipeline_fe_op_free)(void *pipeline);
23 typedef int (*pipeline_fe_op_track)(struct pipeline_params *params,
27 struct pipeline_fe_ops {
28 pipeline_fe_op_init f_init;
29 pipeline_fe_op_post_init f_post_init;
30 pipeline_fe_op_free f_free;
31 pipeline_fe_op_track f_track;
32 cmdline_parse_ctx_t *cmds;
39 struct pipeline_type {
42 /* pipeline back-end */
43 struct pipeline_be_ops *be_ops;
45 /* pipeline front-end */
46 struct pipeline_fe_ops *fe_ops;
49 static inline uint32_t
50 pipeline_type_cmds_count(struct pipeline_type *ptype)
52 cmdline_parse_ctx_t *cmds;
55 if (ptype->fe_ops == NULL)
58 cmds = ptype->fe_ops->cmds;
62 for (n_cmds = 0; cmds[n_cmds]; n_cmds++);
68 parse_pipeline_core(uint32_t *socket,