[alsa-devel] [PATCH] ASoC: sta32x: add workaround for ESD reset issue

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Nov 10 16:11:37 CET 2011


On Thu, Nov 10, 2011 at 03:27:08PM +0100, Johannes Stezenbach wrote:
> On Wed, Nov 09, 2011 at 11:32:57PM +0000, Mark Brown wrote:

> > Yeah, but if it suddenly stops in the middle of playback then that'll
> > tend to register with users and if you keep it powered off at all other
> > times.

> Hm, the goal is to fix the issue without user interaction.
> The app will keep the device open and will play back
> without noticing the problem.

Well, the user is going to hear a horrific glitch anyway...

> > Right, but the bias level management is disabling the regulators for the
> > device so power loss may happen then and _STANDBY is also used to resume
> > the device after suspend when power loss may also occur.

> Ah, you're right, if the system cuts power to the sta32x during
> standby we need to restore the coef RAM after resume.  How I
> see where my code is buggy.  I also see what you mean about
> using idle_bias_off to restore the settings, namely

> 	level = codec->dapm.bias_level;
> 	BUG_ON(level == SND_SOC_BIAS_OFF);
> 	sta32x_set_bias_level(codec, SND_SOC_BIAS_OFF);
> 	sta32x_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
> 	if (level > SND_SOC_BIAS_STANDBY);
> 		sta32x_set_bias_level(codec, SND_SOC_BIAS_PREPARE);
> 	if (level > SND_SOC_BIAS_PREPARE);
> 		sta32x_set_bias_level(codec, SND_SOC_BIAS_ON);

> Right?

Not really what I meant - I meant just let the framework power the
device down when it goes idle so you don't have to worry about it
resetting - though you will need to go through the
OFF->STANDBY->PREPARE->ON transition to bring the device up nicely if
you do restart while active.


More information about the Alsa-devel mailing list