diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-18 14:17:06 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-01-20 08:54:34 -0500 |
commit | fed22007113cb857e917913ce016d9b539dc3a80 (patch) | |
tree | 7e5960b2770e0a661ae1abce509a53e0f857294c /sound/soc/codecs/wm8996.c | |
parent | 495174a8ffbaa0d15153d855cf206cdc46d51cf4 (diff) |
ASoC: Disable register synchronisation for low frequency WM8996 SYSCLK
With a low frequency SYSCLK and a fast I2C clock register synchronisation
may occasionally take too long to take effect, causing I/O issues. Disable
synchronisation in order to avoid any issues.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
Diffstat (limited to 'sound/soc/codecs/wm8996.c')
-rw-r--r-- | sound/soc/codecs/wm8996.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index d8da10fe5b52..86f5b6bd7af2 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c | |||
@@ -2007,6 +2007,7 @@ static int wm8996_set_sysclk(struct snd_soc_dai *dai, | |||
2007 | struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec); | 2007 | struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec); |
2008 | int lfclk = 0; | 2008 | int lfclk = 0; |
2009 | int ratediv = 0; | 2009 | int ratediv = 0; |
2010 | int sync = WM8996_REG_SYNC; | ||
2010 | int src; | 2011 | int src; |
2011 | int old; | 2012 | int old; |
2012 | 2013 | ||
@@ -2051,6 +2052,7 @@ static int wm8996_set_sysclk(struct snd_soc_dai *dai, | |||
2051 | case 32000: | 2052 | case 32000: |
2052 | case 32768: | 2053 | case 32768: |
2053 | lfclk = WM8996_LFCLK_ENA; | 2054 | lfclk = WM8996_LFCLK_ENA; |
2055 | sync = 0; | ||
2054 | break; | 2056 | break; |
2055 | default: | 2057 | default: |
2056 | dev_warn(codec->dev, "Unsupported clock rate %dHz\n", | 2058 | dev_warn(codec->dev, "Unsupported clock rate %dHz\n", |
@@ -2064,6 +2066,8 @@ static int wm8996_set_sysclk(struct snd_soc_dai *dai, | |||
2064 | WM8996_SYSCLK_SRC_MASK | WM8996_SYSCLK_DIV_MASK, | 2066 | WM8996_SYSCLK_SRC_MASK | WM8996_SYSCLK_DIV_MASK, |
2065 | src << WM8996_SYSCLK_SRC_SHIFT | ratediv); | 2067 | src << WM8996_SYSCLK_SRC_SHIFT | ratediv); |
2066 | snd_soc_update_bits(codec, WM8996_CLOCKING_1, WM8996_LFCLK_ENA, lfclk); | 2068 | snd_soc_update_bits(codec, WM8996_CLOCKING_1, WM8996_LFCLK_ENA, lfclk); |
2069 | snd_soc_update_bits(codec, WM8996_CONTROL_INTERFACE_1, | ||
2070 | WM8996_REG_SYNC, sync); | ||
2067 | snd_soc_update_bits(codec, WM8996_AIF_CLOCKING_1, | 2071 | snd_soc_update_bits(codec, WM8996_AIF_CLOCKING_1, |
2068 | WM8996_SYSCLK_ENA, old); | 2072 | WM8996_SYSCLK_ENA, old); |
2069 | 2073 | ||