Skip to content

Commit

Permalink
ASoC: wm8994: Lower AIFnCLK divisor when dropping to 32kHz
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Nov 22, 2012
1 parent 6730049 commit cd22000
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sound/soc/codecs/wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -2258,6 +2258,18 @@ static int _wm8994_set_fll(struct snd_soc_codec *codec, int id, int src,

configure_clock(codec);

/*
* If SYSCLK will be less than 50kHz adjust AIFnCLK dividers
* for detection.
*/
if (max(wm8994->aifclk[0], wm8994->aifclk[1]) < 50000) {
dev_dbg(codec->dev, "Configuring AIFs for 128fs\n");
snd_soc_update_bits(codec, WM8994_AIF1_RATE,
WM8994_AIF1CLK_RATE_MASK, 0x1);
snd_soc_update_bits(codec, WM8994_AIF2_RATE,
WM8994_AIF2CLK_RATE_MASK, 0x1);
}

return 0;
}

Expand Down

0 comments on commit cd22000

Please sign in to comment.