diff mbox series

[10/13] ASoC: tlv320aic32x4: Remove sysclk references

Message ID 20190319033756.20616-11-nh6z@nh6z.net (mailing list archive)
State New, archived
Headers show
Series ASoC: tlv320aic32x4: Rework Clock Setting | expand

Commit Message

Annaliese McDermond March 19, 2019, 3:37 a.m. UTC
Sysclk is not used by anything anymore.  Remove support for it.
All that information now comes from the clock tree.

Signed-off-by: Annaliese McDermond <nh6z@nh6z.net>
---
 sound/soc/codecs/tlv320aic32x4.c | 19 -------------------
 1 file changed, 19 deletions(-)

Comments

Mark Brown March 19, 2019, 3:37 p.m. UTC | #1
On Mon, Mar 18, 2019 at 08:37:53PM -0700, Annaliese McDermond wrote:

> Sysclk is not used by anything anymore.  Remove support for it.
> All that information now comes from the clock tree.

Have you checked for existing users here?  If the operation is removed
existing users will get errors, not all of them will be prepared for
that.
Annaliese McDermond March 19, 2019, 4:18 p.m. UTC | #2
> On Mar 19, 2019, at 8:37 AM, Mark Brown <broonie@kernel.org> wrote:
> 
> On Mon, Mar 18, 2019 at 08:37:53PM -0700, Annaliese McDermond wrote:
> 
>> Sysclk is not used by anything anymore.  Remove support for it.
>> All that information now comes from the clock tree.
> 
> Have you checked for existing users here?  If the operation is removed
> existing users will get errors, not all of them will be prepared for
> that.

I haven’t checked with existing users.  A better implementation may be
that we just use clk_set_rate on whatever the sysclk is to set the
upstream rate.  That way we can preserve compatibility.

> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

--
Annaliese McDermond
nh6z@nh6z.net
Mark Brown March 20, 2019, 4:27 p.m. UTC | #3
On Tue, Mar 19, 2019 at 09:18:01AM -0700, Annaliese McDermond wrote:

> > Have you checked for existing users here?  If the operation is removed
> > existing users will get errors, not all of them will be prepared for
> > that.

> I haven’t checked with existing users.  A better implementation may be
> that we just use clk_set_rate on whatever the sysclk is to set the
> upstream rate.  That way we can preserve compatibility.

Yes, that'd be the simplest thing.
diff mbox series

Patch

diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index 10f0e07889b7..27babe48d5bc 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -49,7 +49,6 @@ 
 
 struct aic32x4_priv {
 	struct regmap *regmap;
-	u32 sysclk;
 	u32 power_cfg;
 	u32 micpga_routing;
 	bool swapdacs;
@@ -563,23 +562,6 @@  const struct regmap_config aic32x4_regmap_config = {
 };
 EXPORT_SYMBOL(aic32x4_regmap_config);
 
-static int aic32x4_set_dai_sysclk(struct snd_soc_dai *codec_dai,
-				  int clk_id, unsigned int freq, int dir)
-{
-	struct snd_soc_component *component = codec_dai->component;
-	struct aic32x4_priv *aic32x4 = snd_soc_component_get_drvdata(component);
-
-	switch (freq) {
-	case 12000000:
-	case 24000000:
-	case 25000000:
-		aic32x4->sysclk = freq;
-		return 0;
-	}
-	printk(KERN_ERR "aic32x4: invalid frequency to set DAI system clock\n");
-	return -EINVAL;
-}
-
 static int aic32x4_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
 {
 	struct snd_soc_component *component = codec_dai->component;
@@ -855,7 +837,6 @@  static const struct snd_soc_dai_ops aic32x4_ops = {
 	.hw_params = aic32x4_hw_params,
 	.digital_mute = aic32x4_mute,
 	.set_fmt = aic32x4_set_dai_fmt,
-	.set_sysclk = aic32x4_set_dai_sysclk,
 };
 
 static struct snd_soc_dai_driver aic32x4_dai = {