[alsa-devel] [PATCH 1/4] ASoC: add a WM8978 codec driver
broonie at opensource.wolfsonmicro.com
Fri Jan 22 11:35:04 CET 2010
On Fri, Jan 22, 2010 at 09:35:44AM +0100, Guennadi Liakhovetski wrote:
> On Wed, 20 Jan 2010, Mark Brown wrote:
> > That seems wrong - if they're being managed in the bias level
> > configuration they ought to be being turned off at some point. If they
> > should be set all the time then set them during chip init.
> Right, a couple of lines below:
> + case SND_SOC_BIAS_OFF:
> + snd_soc_write(codec, WM8978_POWER_MANAGEMENT_1, 0);
Yeah, I saw that. This is one of those cases where numeric bitmask
based updates make things much harder to follow - without referring to
the datasheet and thinking about it it's not clear what's going on and
if it's intentional.
I'd suggest changing all this code to use snd_soc_update_bits() and
symbolic names for the bits that are getting twiddled - it really is a
lot easier to follow.
More information about the Alsa-devel