summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/sgtl5000.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-08-22 15:28:49 +0200
committerMark Brown <broonie@linaro.org>2013-08-22 15:28:49 +0200
commitd6abe0d5e7e966a7ab82e5cb5cb3d2dabba68427 (patch)
treeec398bbb5f703941faf41c511a2ad960124b41cf /sound/soc/codecs/sgtl5000.c
parentMerge remote-tracking branch 'asoc/topic/samsung' into asoc-next (diff)
parentASoC: sgtl5000: fix codec clock source transition to avoid clockless moment (diff)
downloadlinux-d6abe0d5e7e966a7ab82e5cb5cb3d2dabba68427.tar.xz
linux-d6abe0d5e7e966a7ab82e5cb5cb3d2dabba68427.zip
Merge remote-tracking branch 'asoc/topic/sgtl5000' into asoc-next
Diffstat (limited to 'sound/soc/codecs/sgtl5000.c')
-rw-r--r--sound/soc/codecs/sgtl5000.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 760e8bfeacaa..1f4093f3f3a1 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -654,16 +654,19 @@ static int sgtl5000_set_clock(struct snd_soc_codec *codec, int frame_rate)
snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER,
SGTL5000_PLL_POWERUP | SGTL5000_VCOAMP_POWERUP,
SGTL5000_PLL_POWERUP | SGTL5000_VCOAMP_POWERUP);
+
+ /* if using pll, clk_ctrl must be set after pll power up */
+ snd_soc_write(codec, SGTL5000_CHIP_CLK_CTRL, clk_ctl);
} else {
+ /* otherwise, clk_ctrl must be set before pll power down */
+ snd_soc_write(codec, SGTL5000_CHIP_CLK_CTRL, clk_ctl);
+
/* power down pll */
snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER,
SGTL5000_PLL_POWERUP | SGTL5000_VCOAMP_POWERUP,
0);
}
- /* if using pll, clk_ctrl must be set after pll power up */
- snd_soc_write(codec, SGTL5000_CHIP_CLK_CTRL, clk_ctl);
-
return 0;
}
@@ -1480,6 +1483,7 @@ static struct snd_soc_codec_driver sgtl5000_driver = {
static const struct regmap_config sgtl5000_regmap = {
.reg_bits = 16,
.val_bits = 16,
+ .reg_stride = 2,
.max_register = SGTL5000_MAX_REG_OFFSET,
.volatile_reg = sgtl5000_volatile,