From: Takashi Iwai Subject: Re: ASoC updates for 2.6.33 Date: Mon, 25 Jan 2010 16:43:44 +0100 Message-ID: References: <20100125144946.GA27616@rakim.wolfsonmicro.main> <20100125154100.GB30102@sirena.org.uk> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (cantor.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 612EF24629 for ; Mon, 25 Jan 2010 16:43:44 +0100 (CET) In-Reply-To: <20100125154100.GB30102@sirena.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: alsa-devel@alsa-project.org, Guennadi Liakhovetski , Liam Girdwood List-Id: alsa-devel@alsa-project.org 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