diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2021-06-14 09:57:19 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-21 13:05:18 +0100 |
commit | 22108b9c2248f187d2b50af14e48807a0fb3db79 (patch) | |
tree | e00ebe4ff896ab18f756d1fbc1004e87b43d333a /sound/soc | |
parent | 7766861d1f8d3afc35361ab599eee6851fcd4416 (diff) | |
download | linux-22108b9c2248f187d2b50af14e48807a0fb3db79.tar.bz2 |
ASoC: atmel: 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>
Reviewed-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Link: https://lore.kernel.org/r/875yyhw9e8.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/atmel/mikroe-proto.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sound/soc/atmel/mikroe-proto.c b/sound/soc/atmel/mikroe-proto.c index f9a85fd01b79..0be7b4221c14 100644 --- a/sound/soc/atmel/mikroe-proto.c +++ b/sound/soc/atmel/mikroe-proto.c @@ -120,19 +120,22 @@ static int snd_proto_probe(struct platform_device *pdev) dai->cpus->of_node = cpu_np; dai->platforms->of_node = cpu_np; - dai_fmt = snd_soc_of_parse_daifmt(np, NULL, - &bitclkmaster, &framemaster); + dai_fmt = snd_soc_daifmt_parse_format(np, NULL); + snd_soc_daifmt_parse_clock_provider_as_phandle(np, NULL, + &bitclkmaster, &framemaster); if (bitclkmaster != framemaster) { dev_err(&pdev->dev, "Must be the same bitclock and frame master\n"); return -EINVAL; } if (bitclkmaster) { - dai_fmt &= ~SND_SOC_DAIFMT_MASTER_MASK; if (codec_np == bitclkmaster) dai_fmt |= SND_SOC_DAIFMT_CBM_CFM; else dai_fmt |= SND_SOC_DAIFMT_CBS_CFS; + } else { + dai_fmt |= snd_soc_daifmt_parse_clock_provider_as_flag(np, NULL); } + of_node_put(bitclkmaster); of_node_put(framemaster); dai->dai_fmt = dai_fmt; |