1 From 5ec6ed3e423878cf975a955c8796c2cdb10b5ca7 Mon Sep 17 00:00:00 2001
2 From: Annaliese McDermond <nh6z@nh6z.net>
3 Date: Thu, 21 Mar 2019 17:58:52 -0700
4 Subject: [PATCH] ASoC: tlv320aic32x4: Restructure set_dai_sysclk
6 commit aa6a60f7be925210d5156f0e8025f3afe1f4f54d upstream.
8 The sysclk is now managed by the CCF. Change this function
9 to merely find the system clock and set it using
12 Signed-off-by: Annaliese McDermond <nh6z@nh6z.net>
13 Signed-off-by: Mark Brown <broonie@kernel.org>
15 sound/soc/codecs/tlv320aic32x4.c | 17 ++++++-----------
16 1 file changed, 6 insertions(+), 11 deletions(-)
18 --- a/sound/soc/codecs/tlv320aic32x4.c
19 +++ b/sound/soc/codecs/tlv320aic32x4.c
23 struct regmap *regmap;
28 @@ -569,17 +568,13 @@ static int aic32x4_set_dai_sysclk(struct
29 int clk_id, unsigned int freq, int dir)
31 struct snd_soc_component *component = codec_dai->component;
32 - struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component);
40 - aic32x4->sysclk = freq;
43 - printk(KERN_ERR "aic32x4: invalid frequency to set DAI system clock\n");
45 + pll = devm_clk_get(component->dev, "pll");
46 + mclk = clk_get_parent(pll);
48 + return clk_set_rate(mclk, freq);
51 static int aic32x4_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)