1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright(c) 2021 Intel Corporation. All rights reserved.
5 * Authors: Cezary Rojewski <cezary.rojewski@intel.com>
6 * Amadeusz Slawinski <amadeuszx.slawinski@linux.intel.com>
9 #ifndef __SOUND_SOC_INTEL_AVS_PATH_H
10 #define __SOUND_SOC_INTEL_AVS_PATH_H
12 #include <linux/list.h>
18 struct list_head ppl_list;
21 struct avs_tplg_path *template;
22 struct avs_dev *owner;
23 /* device path management */
24 struct list_head node;
27 struct avs_path_pipeline {
29 struct list_head mod_list;
30 struct list_head binding_list;
32 struct avs_tplg_pipeline *template;
33 struct avs_path *owner;
34 /* path pipelines management */
35 struct list_head node;
38 struct avs_path_module {
41 union avs_gtw_attributes gtw_attrs;
43 struct avs_tplg_module *template;
44 struct avs_path_pipeline *owner;
45 /* pipeline modules management */
46 struct list_head node;
49 struct avs_path_binding {
50 struct avs_path_module *source;
52 struct avs_path_module *sink;
55 struct avs_tplg_binding *template;
56 struct avs_path_pipeline *owner;
57 /* pipeline bindings management */
58 struct list_head node;
61 void avs_path_free(struct avs_path *path);
62 struct avs_path *avs_path_create(struct avs_dev *adev, u32 dma_id,
63 struct avs_tplg_path_template *template,
64 struct snd_pcm_hw_params *fe_params,
65 struct snd_pcm_hw_params *be_params);
66 int avs_path_bind(struct avs_path *path);
67 int avs_path_unbind(struct avs_path *path);
68 int avs_path_reset(struct avs_path *path);
69 int avs_path_pause(struct avs_path *path);
70 int avs_path_run(struct avs_path *path, int trigger);