[alsa-devel] [PATCHv2 1/2] ASoC: TWL4030: AIF/APLL fix in DAPM domain
Mark Brown
broonie at opensource.wolfsonmicro.com
Wed Apr 28 15:12:35 CEST 2010
On Wed, Apr 28, 2010 at 03:50:14PM +0300, Peter Ujfalusi wrote:
> + if (enable && twl4030->apll_enabled == 1)
> /* Enable PLL */
> status = twl4030_codec_enable_resource(TWL4030_CODEC_RES_APLL);
> - else
> + else if (!enable && twl4030->apll_enabled == 0)
This logic looks funny, especially the test for !enable in the second
case (which should always be true). I think the intention here is to
look for "apll_enabled has done an interesting transition (0->1 or
1->0)" - it'd probably be clearer to look for that directly.
> + /* AIF and APLL clocks for running DAIs (including loopback) */
> + SND_SOC_DAPM_OUTPUT("AIF DAC"),
> + SND_SOC_DAPM_INPUT("AIF ADC"),
> + SND_SOC_DAPM_OUTPUT("APLL"),
The use of INPUT and OUTPUT widgets here looks really odd - I'd at least
except the AIF widgets to be actual AIF widgets.
More information about the Alsa-devel
mailing list