[ALSA] Fix CS4270 volume control and optimize I2C operations
authorTimur Tabi <timur@freescale.com>
Mon, 10 Sep 2007 22:45:50 +0000 (00:45 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 16 Oct 2007 14:49:30 +0000 (16:49 +0200)
commitbfc4e8616679226b1f113a46df491e233c8dc338
tree83bc8f06e320d4f003f30bf9223a7869b7048976
parent23d4635ed336c7dadb3590ee7d275ac612f06ebf
[ALSA] Fix CS4270 volume control and optimize I2C operations

The volume control for the CS4270 ASoC driver was inverted - raising the
volume level with alsamixer would decrease the actual volume.
This patch also improves the performance of the I2C code (used to change
register settings) by only performing an I2C write if the new value is
different from the value that's in the register cache.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/soc/codecs/cs4270.c