summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2017-06-14 00:34:35 +0000
committerMark Brown <broonie@kernel.org>2017-06-14 11:00:07 +0100
commite68ba207444354ddf295de2e7fbcc97c06cccc8b (patch)
treec49e323b638870e33d721158ae7a4f763f4605ce /include/sound
parent63a5f59208bce7110596b09950f48bf07b8baeb9 (diff)
downloadblackbird-op-linux-e68ba207444354ddf295de2e7fbcc97c06cccc8b.tar.gz
blackbird-op-linux-e68ba207444354ddf295de2e7fbcc97c06cccc8b.zip
ASoC: simple-card-utils: add asoc_simple_card_of_parse_tdm()
Current simple card drivers are using asoc_simple_dai's tx_slot_mask, rx_slot_mask, slots, slot_width directly to parse TDM. Encapsulation is one of simple card util's purpose. Let's add asoc_simple_card_of_parse_tdm for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/simple_card_utils.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h
index 840d624148df..2679312228b3 100644
--- a/include/sound/simple_card_utils.h
+++ b/include/sound/simple_card_utils.h
@@ -75,6 +75,12 @@ int asoc_simple_card_parse_graph_dai(struct device_node *ep,
struct device_node **endpoint_np,
const char **dai_name);
+#define asoc_simple_card_of_parse_tdm(np, dai) \
+ snd_soc_of_parse_tdm_slot(np, &(dai)->tx_slot_mask, \
+ &(dai)->rx_slot_mask, \
+ &(dai)->slots, \
+ &(dai)->slot_width);
+
int asoc_simple_card_init_dai(struct snd_soc_dai *dai,
struct asoc_simple_dai *simple_dai);
OpenPOWER on IntegriCloud