diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-03-20 13:56:26 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-03-21 14:52:24 +0000 |
commit | 65a5056b21202eff7f54243e587183f4bb6ed352 (patch) | |
tree | 7e28f41ca4b7a8af17b743aaddb2652554e34420 /include | |
parent | 629f75440a68220a78aef9d8569831824890c47d (diff) |
ASoC: simple-card-utils: share asoc_simple_card_init_priv()
The difference between simple-card / audio-graph are just using
OF graph style, or not. In other words, other things should be same.
This means, simple-card/audio-graph common functions should be
implemented at simple-card-utils, and its own functions should be
implemented at each files.
Current simple-card / audio-graph are initializing each priv,
but it is same operation.
This patch adds new asoc_simple_card_init_priv() and initialize
priv by same operation.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/sound/simple_card_utils.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index 20d41bb14ea8..c0be02de6993 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -60,6 +60,13 @@ struct asoc_simple_priv { #define simple_priv_to_dev(priv) (simple_priv_to_card(priv)->dev) #define simple_priv_to_link(priv, i) (simple_priv_to_card(priv)->dai_link + (i)) +struct link_info { + int dais; /* number of dai */ + int link; /* number of link */ + int conf; /* number of codec_conf */ + int cpu; /* turn for CPU / Codec */ +}; + int asoc_simple_card_parse_daifmt(struct device *dev, struct device_node *node, struct device_node *codec, @@ -153,7 +160,8 @@ int asoc_simple_card_of_parse_widgets(struct snd_soc_card *card, int asoc_simple_card_init_jack(struct snd_soc_card *card, struct asoc_simple_jack *sjack, int is_hp, char *prefix); - +int asoc_simple_card_init_priv(struct asoc_simple_priv *priv, + struct link_info *li); #ifdef DEBUG inline void asoc_simple_debug_dai(struct asoc_simple_priv *priv, |