[alsa-devel] [PATCH 2/2] ASoC: TWL6040: Correct widget handling for drivers

Mark Brown broonie at opensource.wolfsonmicro.com
Fri May 21 01:18:33 CEST 2010


On Thu, 2010-05-20 at 17:53 -0500, Jorge Eduardo Candelaria wrote:

> Also, add a pop_time of 1 ms to leave time for DACs to settle before
> continuing power up/down sequence.

...

> @@ -1105,6 +1092,7 @@ static int __devinit twl6040_codec_probe(struct platform_device *pdev)
>  	priv->naudint = naudint;
>  
>  	codec = &priv->codec;
> +	codec->pop_time = 1;
>  	codec->dev = &pdev->dev;
>  	twl6040_dai.dev = &pdev->dev;

That's not something you should be doing in your CODEC driver. pop_time
is a debugging tool which can be enabled by users but should not be used
in production. Besides, it'll also apply to all power changes in the
CODEC, not just the ones that need it, and so make the general operation
of the device much slower than it needs to be.

If you need to insert a delay after power up of the DAC widgets use the
_E variant of the DAC widget and have a POST_PMU event handler which
does the sleep.



More information about the Alsa-devel mailing list