
At Mon, 25 Jan 2010 15:41:00 +0000, Mark Brown wrote:
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
Ah, OK, so that part is in the automation. I missed that.
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 resume.
thanks,
Takashi