summaryrefslogtreecommitdiffstats
path: root/sound/pci/asihpi/hpios.c
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2011-08-02 19:42:19 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-08-03 10:21:42 +0900
commit151798f872d6b386d82cd1707ad703e981fef8f2 (patch)
tree22bdd1a3b0270ce8b9353011b686b45875d51d03 /sound/pci/asihpi/hpios.c
parentf9925d4400927fcf3e25cd371442e47d40b37536 (diff)
downloadblackbird-op-linux-151798f872d6b386d82cd1707ad703e981fef8f2.tar.gz
blackbird-op-linux-151798f872d6b386d82cd1707ad703e981fef8f2.zip
ASoC: sgtl5000: fix cache handling
Cache handling in this driver is broken. The chip has 16-bit registers, yet the register numbers also increase by 2 per register, i.e. there are only even-numbered registers. The cache in this driver, though, simply increments register numbers, so it does need some mapping as seen in sgtl5000_restore_regs(), note the '>> 1': snd_soc_write(codec, SGTL5000_CHIP_LINREG_CTRL, cache[SGTL5000_CHIP_LINREG_CTRL >> 1]); That, of course, won't work with snd_soc_update_bits(). (Thus, we won't even notice the missing register 0x1c in the default regs which shifted all follwing registers to wrong values.) Noticed on the MX28EVK where enabling the regulators simply locked up the chip. Refactor the routines and use a properly sized default_regs array which matches the register layout of the underlying chip, i.e. create a truly flat cache. This also saves some code which should make up for the bigger array a little. When soc-core will somewhen have another cache type which handles a step size, this conversion will also ease the transition. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Tested-by: Dong Aisheng <b29396@freescale.com> Tested-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
Diffstat (limited to 'sound/pci/asihpi/hpios.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud