[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140721115353.GV17528@sirena.org.uk>
Date: Mon, 21 Jul 2014 12:53:53 +0100
From: Mark Brown <broonie@...nel.org>
To: Dan Murphy <dmurphy@...com>
Cc: linux-sound@...r.kernel.org, linux-kernel@...r.kernel.org,
alsa-devel@...a-project.org
Subject: Re: [PATCH 2/2] ASoC: tas2552: Add DAPM calls for amp and PLL
On Fri, Jul 18, 2014 at 12:31:08PM -0500, Dan Murphy wrote:
> +static int tas2552_class_d_en(struct snd_soc_dapm_widget *w,
> + struct snd_kcontrol *kcontrol, int event)
> +{
> + switch (event) {
> + case SND_SOC_DAPM_PRE_PMU:
> + snd_soc_update_bits(w->codec, TAS2552_CFG_2,
> + TAS2552_CLASSD_EN_MASK, TAS2552_CLASSD_EN_MASK);
> + break;
> + case SND_SOC_DAPM_POST_PMD:
> + snd_soc_update_bits(w->codec, TAS2552_CFG_2,
> + TAS2552_CLASSD_EN_MASK, 0);
> + break;
> + }
> +
> + return 0;
> +}
> +
> +static const struct snd_soc_dapm_widget tas2552_dapm_widgets[] =
> +{
> +SND_SOC_DAPM_PRE("Class D Enable", tas2552_class_d_en),
> +SND_SOC_DAPM_POST("Class D Disable", tas2552_class_d_en),
> +SND_SOC_DAPM_POST("PLL Disable", tas2552_pll_disable),
> +};
This seems broken, having to use _PRE or _POST widgets for simple
register writes (or almost anything really) should never be required and
error prone - what is this actually trying to do? I'd expect the class
D to be a PGA or OUTPUT widget and the PLL to be a SUPPLY widget.
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists