diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-10-24 05:56:30 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-10-24 05:58:01 -0400 |
commit | 6730049a4763e868d66caea622e8aef6b8afdb57 (patch) | |
tree | cd1b60631e4d533677cb1a9da1307c893a633c9b /sound/soc/codecs/wm8994.c | |
parent | 0ffecd7d869a156b710b7b6cb59153748c6de3ae (diff) |
ASoC: wm8994: Lower AIFnCLK divisor when dropping to 32kHz
When lowering SYSCLK to 50kHz for accessory detection also lower the
AIFnCLK divisor to normalise the clocking configuration within the
device. This will not disrupt audio as we cannot support active audio
with such a low SYSCLK.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8994.c')
-rw-r--r-- | sound/soc/codecs/wm8994.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 4d0ae9dcbc57..1d1b43fe1722 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -2346,6 +2346,18 @@ static int wm8994_set_dai_sysclk(struct snd_soc_dai *dai, | |||
2346 | 2346 | ||
2347 | configure_clock(codec); | 2347 | configure_clock(codec); |
2348 | 2348 | ||
2349 | /* | ||
2350 | * If SYSCLK will be less than 50kHz adjust AIFnCLK dividers | ||
2351 | * for detection. | ||
2352 | */ | ||
2353 | if (max(wm8994->aifclk[0], wm8994->aifclk[1]) < 50000) { | ||
2354 | dev_dbg(codec->dev, "Configuring AIFs for 128fs\n"); | ||
2355 | snd_soc_update_bits(codec, WM8994_AIF1_RATE, | ||
2356 | WM8994_AIF1CLK_RATE_MASK, 0x1); | ||
2357 | snd_soc_update_bits(codec, WM8994_AIF2_RATE, | ||
2358 | WM8994_AIF2CLK_RATE_MASK, 0x1); | ||
2359 | } | ||
2360 | |||
2349 | return 0; | 2361 | return 0; |
2350 | } | 2362 | } |
2351 | 2363 | ||