aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/pxa
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-01-23 11:49:45 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-01-23 11:49:45 +0000
commita435869cacbb581920df23411416bed533748bf1 (patch)
tree97eeefd54437b7aed67f135904d29faca973a1a5 /sound/soc/pxa
parentf6fca2e93c9ad3c704f02aaabe4359a8af16fbbb (diff)
ASoC: Configure SSP port PLL for Zylonite
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/pxa')
-rw-r--r--sound/soc/pxa/zylonite.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/soc/pxa/zylonite.c b/sound/soc/pxa/zylonite.c
index 8541b679f6e..ec2fb764b24 100644
--- a/sound/soc/pxa/zylonite.c
+++ b/sound/soc/pxa/zylonite.c
@@ -95,6 +95,7 @@ static int zylonite_voice_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
+ unsigned int pll_out = 0;
unsigned int acds = 0;
unsigned int wm9713_div = 0;
int ret = 0;
@@ -102,13 +103,16 @@ static int zylonite_voice_hw_params(struct snd_pcm_substream *substream,
switch (params_rate(params)) {
case 8000:
wm9713_div = 12;
+ pll_out = 2048000;
break;
case 16000:
wm9713_div = 6;
+ pll_out = 4096000;
break;
case 48000:
default:
wm9713_div = 2;
+ pll_out = 12288000;
acds = 1;
break;
}
@@ -129,6 +133,10 @@ static int zylonite_voice_hw_params(struct snd_pcm_substream *substream,
if (ret < 0)
return ret;
+ ret = snd_soc_dai_set_pll(cpu_dai, 0, 0, pll_out);
+ if (ret < 0)
+ return ret;
+
ret = snd_soc_dai_set_clkdiv(cpu_dai, PXA_SSP_AUDIO_DIV_ACDS, acds);
if (ret < 0)
return ret;