ASoC: audio-graph-card: use asoc_simple_card_of_parse_tdm()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 14 Jun 2017 00:35:30 +0000 (00:35 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 14 Jun 2017 10:00:16 +0000 (11:00 +0100)
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 use 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>
sound/soc/generic/audio-graph-card.c

index b5bb791a6e61e3e0339c0ad5e964067ed92ddefb..885b405d7844484bb4130603af7069142afb51bc 100644 (file)
@@ -131,19 +131,11 @@ static int asoc_graph_card_dai_link_of(struct device_node *cpu_port,
        if (ret < 0)
                goto dai_link_of_err;
 
-       ret = snd_soc_of_parse_tdm_slot(cpu_ep,
-                                       &cpu_dai->tx_slot_mask,
-                                       &cpu_dai->rx_slot_mask,
-                                       &cpu_dai->slots,
-                                       &cpu_dai->slot_width);
+       ret = asoc_simple_card_of_parse_tdm(cpu_ep, cpu_dai);
        if (ret < 0)
                goto dai_link_of_err;
 
-       ret = snd_soc_of_parse_tdm_slot(codec_ep,
-                                       &codec_dai->tx_slot_mask,
-                                       &codec_dai->rx_slot_mask,
-                                       &codec_dai->slots,
-                                       &codec_dai->slot_width);
+       ret = asoc_simple_card_of_parse_tdm(codec_ep, codec_dai);
        if (ret < 0)
                goto dai_link_of_err;