4 Apr 2011 17:13
[patch 1/1] sgtl5000: Fix suspend/resume
Arnaud Patard <arnaud.patard <at> rtp-net.org>
2011-04-04 15:13:00 GMT
2011-04-04 15:13:00 GMT
sgtl5000 codec driver is assuming a wrong cache layout, leading to a broken
suspend/resume support. This patch declares properly the default cache buffer
and fix the function used to restore the regs from the cache. I've also moved
it were it belongs, in the set_bias_level function.
Signed-off-by: Arnaud Patard <arnaud.patard <at> rtp-net.org>
Index: imx-test/sound/soc/codecs/sgtl5000.c
===================================================================
--- imx-test.orig/sound/soc/codecs/sgtl5000.c
+++ imx-test/sound/soc/codecs/sgtl5000.c
<at> <at> -34,37 +34,67 <at> <at>
#define SGTL5000_MAX_REG_OFFSET 0x013A
/* default value of sgtl5000 registers except DAP */
-static const u16 sgtl5000_regs[SGTL5000_MAX_REG_OFFSET >> 1] = {
+static const u16 sgtl5000_regs[SGTL5000_MAX_REG_OFFSET] = {
0xa011, /* 0x0000, CHIP_ID. 11 stand for revison 17 */
+ 0,
0x0000, /* 0x0002, CHIP_DIG_POWER. */
+ 0,
0x0008, /* 0x0004, CHIP_CKL_CTRL */
+ 0,
0x0010, /* 0x0006, CHIP_I2S_CTRL */
+ 0,
0x0000, /* 0x0008, reserved */
+ 0,
0x0008, /* 0x000A, CHIP_SSS_CTRL */
+ 0,
0x0000, /* 0x000C, reserved */
+ 0,
(Continue reading)
RSS Feed