[alsa-devel] [PATCHv4 2/7] ASoC: TWL6030: Add twl6030 codec driver
Mark Brown
broonie at opensource.wolfsonmicro.com
Wed Feb 24 14:38:36 CET 2010
On Tue, Feb 23, 2010 at 06:10:27PM -0600, Olaya, Margarita wrote:
> +static int twl6030_set_bias_level(struct snd_soc_codec *codec,
> + enum snd_soc_bias_level level)
> +{
> + struct twl6030_data *priv = codec->private_data;
> + int audpwron = priv->audpwron;
> +
> + switch (level) {
> + case SND_SOC_BIAS_ON:
> + case SND_SOC_BIAS_PREPARE:
> + case SND_SOC_BIAS_STANDBY:
> + if (priv->codec_powered)
> + break;
> +
It'd be better to restructure this code so that the powerup triggers on
the OFF->STANDBY transition rather than going in here on transitions
like PREPARE->ON or ON->PREPARE which should never occur and where the
expectation is strongly that the device will already be powered.
> +#ifdef CONFIG_PM
> +static int twl6030_codec_suspend(struct platform_device *pdev,
> + pm_message_t msg)
> +{
> + return snd_soc_suspend_device(&pdev->dev);
> +}
> +
> +static int twl6030_codec_resume(struct platform_device *pdev)
> +{
> + return snd_soc_resume_device(&pdev->dev);
> +}
> +#else
> +#define twl6030_codec_suspend NULL
> +#define twl6030_codec_resume NULL
> +#endif
This won't compile, those functions have been removed so these functions
can just be dropped. Please test against the branch you're submitting
against (or -next).
More information about the Alsa-devel
mailing list