]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: fsl: switch to use snd_soc_daifmt_parse_format/clock_provider()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 14 Jun 2021 00:57:51 +0000 (09:57 +0900)
committerMark Brown <broonie@kernel.org>
Mon, 21 Jun 2021 12:05:19 +0000 (13:05 +0100)
This patch switch to use snd_soc_daifmt_parse_format/clock_provider() from
snd_soc_of_parse_daifmt().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874ke1w9dc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl-asoc-card.c

index c62bfd1c3ac7ca415fa314ff6c8ae43cf4e839dd..14d2956d0da3e74c7f32c27fba0335f81c949404 100644 (file)
@@ -540,7 +540,6 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
        struct device *codec_dev = NULL;
        const char *codec_dai_name;
        const char *codec_dev_name;
-       unsigned int daifmt;
        u32 width;
        int ret;
 
@@ -684,10 +683,10 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
        }
 
        /* Format info from DT is optional. */
-       daifmt = snd_soc_of_parse_daifmt(np, NULL,
-                                        &bitclkmaster, &framemaster);
-       daifmt &= ~SND_SOC_DAIFMT_MASTER_MASK;
+       snd_soc_daifmt_parse_clock_provider_as_phandle(np, NULL, &bitclkmaster, &framemaster);
        if (bitclkmaster || framemaster) {
+               unsigned int daifmt = snd_soc_daifmt_parse_format(np, NULL);
+
                if (codec_np == bitclkmaster)
                        daifmt |= (codec_np == framemaster) ?
                                SND_SOC_DAIFMT_CBM_CFM : SND_SOC_DAIFMT_CBM_CFS;