summaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/fsl-asoc-card.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2021-06-14 09:57:51 +0900
committerMark Brown <broonie@kernel.org>2021-06-21 13:05:19 +0100
commit3bba9414512fc16c96c4cd25ee6447c8da4b4a76 (patch)
treee55d2dbca0395584e4bdaf69555eddfccb563690 /sound/soc/fsl/fsl-asoc-card.c
parent22108b9c2248f187d2b50af14e48807a0fb3db79 (diff)
downloadlinux-3bba9414512fc16c96c4cd25ee6447c8da4b4a76.tar.gz
linux-3bba9414512fc16c96c4cd25ee6447c8da4b4a76.tar.bz2
linux-3bba9414512fc16c96c4cd25ee6447c8da4b4a76.zip
ASoC: fsl: switch to use snd_soc_daifmt_parse_format/clock_provider()
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>
Diffstat (limited to 'sound/soc/fsl/fsl-asoc-card.c')
-rw-r--r--sound/soc/fsl/fsl-asoc-card.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index c62bfd1c3ac7..14d2956d0da3 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -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;