blob: 4c8b94c77b8eb78fbc216f3241e34990b496fb23 [file] [log] [blame]
Sameer Pujare32b1002020-11-02 20:40:14 +05301/* SPDX-License-Identifier: GPL-2.0
2 *
3 * ASoC audio graph card support
4 *
5 */
6
7#ifndef __GRAPH_CARD_H
8#define __GRAPH_CARD_H
9
10#include <sound/simple_card_utils.h>
11
Kuninori Morimoto6e5f68f2021-10-12 13:54:46 +090012typedef int (*GRAPH2_CUSTOM)(struct asoc_simple_priv *priv,
13 struct device_node *lnk,
14 struct link_info *li);
15
16struct graph2_custom_hooks {
17 int (*hook_pre)(struct asoc_simple_priv *priv);
18 int (*hook_post)(struct asoc_simple_priv *priv);
19 GRAPH2_CUSTOM custom_normal;
Kuninori Morimotof03beb52021-10-12 13:55:12 +090020 GRAPH2_CUSTOM custom_dpcm;
Kuninori Morimotoc3a15c92021-10-12 13:55:33 +090021 GRAPH2_CUSTOM custom_c2c;
Kuninori Morimoto6e5f68f2021-10-12 13:54:46 +090022};
23
Sameer Pujar6e4ea8a2021-02-07 23:06:57 +053024int audio_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev);
Kuninori Morimoto6e5f68f2021-10-12 13:54:46 +090025int audio_graph2_parse_of(struct asoc_simple_priv *priv, struct device *dev,
26 struct graph2_custom_hooks *hooks);
27
28int audio_graph2_link_normal(struct asoc_simple_priv *priv,
29 struct device_node *lnk, struct link_info *li);
Kuninori Morimotof03beb52021-10-12 13:55:12 +090030int audio_graph2_link_dpcm(struct asoc_simple_priv *priv,
31 struct device_node *lnk, struct link_info *li);
Kuninori Morimotoc3a15c92021-10-12 13:55:33 +090032int audio_graph2_link_c2c(struct asoc_simple_priv *priv,
33 struct device_node *lnk, struct link_info *li);
Sameer Pujar6e4ea8a2021-02-07 23:06:57 +053034
Sameer Pujare32b1002020-11-02 20:40:14 +053035#endif /* __GRAPH_CARD_H */