[alsa-devel] Help on writing an ALSA ASoC Driver for WM8985

Leung Chi Tat ctleung at cct.com.hk
Tue May 26 03:00:05 CEST 2009


I got it.  Once we set those volume update bits in wm8990_init(), those bits in the wm8985 register cache array, wm8985_reg[], will then  be set too.  So, whenever we write a new value to a volume register, wm8985_write() will then write the new value to the volume register and update the corresponding volume update bit also.  This is the trick.

A Great Idea!

Thank you so much!  


On Mon, May 25, 2009 at 08:47:31PM +0800, Leung Chi Tat wrote:

> I'm right now studying the driver code for wm8980 codec (from the main
> trunk of linux-2.6-asoc) as it seems to be more close to wm8985.  I
> can't find any code for triggering those volume update bits after
> modified those volume registers.   But, the wm8980 datasheet states
> that we have to do so to make those volume updates properly.  Is there
> some black magic in the code?

The normal approach for volume update bits is to set them when
initialising the CODEC at startup - this is what the wm8990 driver is
doing when it writes to the volume registers in wm8990_init().  This
means that any further register writes which only change the volume
field in the registers will also have the volume update bit set.

More information about the Alsa-devel mailing list