[alsa-devel] ASoC updates for 2.6.33

Mark Brown broonie at opensource.wolfsonmicro.com
Mon Jan 25 16:41:00 CET 2010

On Mon, Jan 25, 2010 at 04:36:02PM +0100, Takashi Iwai wrote:

> So, basically you restore the value changed between the beginning of
> the resume and after the call of wm8903_set_bias_levels().  What if
> the value was changed before the resume call?  Shouldn't it be like

> 			if (tmp_cache[i] != reg_cache[i] ||
> 			    tmp_cache[i] != wm8903_reg_defaults[i])
> 				snd_soc_write(codec, i, tmp_cache[i]);

> ??  Or maybe I misread the code?

It's fine as-is - the resume will reset the register cache to the
current state of the chip as part of the bringup so the effect of the
existing code will be to write back anything in tmp_cache which is not
present on the chip at the moment that the loop runs.  This will include
the effect of any changes prior to resume which weren't overwritten by

More information about the Alsa-devel mailing list