summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-03-20 07:56:36 +0300
committerMark Brown <broonie@kernel.org>2019-03-21 17:52:37 +0300
commit8f7f298a333761a528e103cda3b42f3a416ad1ee (patch)
treee5b79636bc0a7e7aa859e6791512aa1103db5ba2 /include
parent65a5056b21202eff7f54243e587183f4bb6ed352 (diff)
downloadlinux-8f7f298a333761a528e103cda3b42f3a416ad1ee.tar.xz
ASoC: simple-card-utils: separate asoc_simple_card_parse_dai()
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 using asoc_simple_card_parse_dai() which is different implementation. But, these are implemanted at simple-card-utils. It should be implemanted at each files. This patch separate these into each files. 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.h39
1 files changed, 8 insertions, 31 deletions
diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h
index c0be02de6993..0c070c2bc119 100644
--- a/include/sound/simple_card_utils.h
+++ b/include/sound/simple_card_utils.h
@@ -99,40 +99,17 @@ int asoc_simple_dai_init(struct snd_soc_pcm_runtime *rtd);
int asoc_simple_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params);
-#define asoc_simple_card_parse_cpu(node, dai_link, \
- list_name, cells_name, is_single_link) \
- asoc_simple_card_parse_dai(node, NULL, \
- &dai_link->cpu_of_node, \
- &dai_link->cpu_dai_name, list_name, cells_name, is_single_link)
-#define asoc_simple_card_parse_codec(node, dai_link, list_name, cells_name) \
+#define asoc_simple_card_parse_cpu(node, dai_link, is_single_link) \
+ asoc_simple_card_parse_dai(node, NULL, \
+ &dai_link->cpu_of_node, \
+ &dai_link->cpu_dai_name, is_single_link)
+#define asoc_simple_card_parse_codec(node, dai_link) \
asoc_simple_card_parse_dai(node, dai_link->codecs, \
&dai_link->codec_of_node, \
- &dai_link->codec_dai_name, \
- list_name, cells_name, NULL)
-#define asoc_simple_card_parse_platform(node, dai_link, list_name, cells_name) \
+ &dai_link->codec_dai_name, NULL)
+#define asoc_simple_card_parse_platform(node, dai_link) \
asoc_simple_card_parse_dai(node, dai_link->platforms, \
- &dai_link->platform_of_node, \
- NULL, list_name, cells_name, NULL)
-int asoc_simple_card_parse_dai(struct device_node *node,
- struct snd_soc_dai_link_component *dlc,
- struct device_node **endpoint_np,
- const char **dai_name,
- const char *list_name,
- const char *cells_name,
- int *is_single_links);
-
-#define asoc_simple_card_parse_graph_cpu(ep, dai_link) \
- asoc_simple_card_parse_graph_dai(ep, NULL, \
- &dai_link->cpu_of_node, \
- &dai_link->cpu_dai_name)
-#define asoc_simple_card_parse_graph_codec(ep, dai_link) \
- asoc_simple_card_parse_graph_dai(ep, dai_link->codecs, \
- &dai_link->codec_of_node, \
- &dai_link->codec_dai_name)
-int asoc_simple_card_parse_graph_dai(struct device_node *ep,
- struct snd_soc_dai_link_component *dlc,
- struct device_node **endpoint_np,
- const char **dai_name);
+ &dai_link->platform_of_node, NULL, NULL)
#define asoc_simple_card_of_parse_tdm(np, dai) \
snd_soc_of_parse_tdm_slot(np, &(dai)->tx_slot_mask, \