Re: Help on writing an ALSA ASoC Driver for WM8985

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mark,

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!  

Chitat


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.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux