aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa/zylonite.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-01-23 06:49:45 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-01-23 06:49:45 -0500
commita435869cacbb581920df23411416bed533748bf1 (patch)
tree97eeefd54437b7aed67f135904d29faca973a1a5 /sound/soc/pxa/zylonite.c
parentf6fca2e93c9ad3c704f02aaabe4359a8af16fbbb (diff)
ASoC: Configure SSP port PLL for Zylonite
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/pxa/zylonite.c')
-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 8541b679f6eb..ec2fb764b241 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,
95 struct snd_soc_pcm_runtime *rtd = substream->private_data; 95 struct snd_soc_pcm_runtime *rtd = substream->private_data;
96 struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; 96 struct snd_soc_dai *codec_dai = rtd->dai->codec_dai;
97 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; 97 struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
98 unsigned int pll_out = 0;
98 unsigned int acds = 0; 99 unsigned int acds = 0;
99 unsigned int wm9713_div = 0; 100 unsigned int wm9713_div = 0;
100 int ret = 0; 101 int ret = 0;
@@ -102,13 +103,16 @@ static int zylonite_voice_hw_params(struct snd_pcm_substream *substream,
102 switch (params_rate(params)) { 103 switch (params_rate(params)) {
103 case 8000: 104 case 8000:
104 wm9713_div = 12; 105 wm9713_div = 12;
106 pll_out = 2048000;
105 break; 107 break;
106 case 16000: 108 case 16000:
107 wm9713_div = 6; 109 wm9713_div = 6;
110 pll_out = 4096000;
108 break; 111 break;
109 case 48000: 112 case 48000:
110 default: 113 default:
111 wm9713_div = 2; 114 wm9713_div = 2;
115 pll_out = 12288000;
112 acds = 1; 116 acds = 1;
113 break; 117 break;
114 } 118 }
@@ -129,6 +133,10 @@ static int zylonite_voice_hw_params(struct snd_pcm_substream *substream,
129 if (ret < 0) 133 if (ret < 0)
130 return ret; 134 return ret;
131 135
136 ret = snd_soc_dai_set_pll(cpu_dai, 0, 0, pll_out);
137 if (ret < 0)
138 return ret;
139
132 ret = snd_soc_dai_set_clkdiv(cpu_dai, PXA_SSP_AUDIO_DIV_ACDS, acds); 140 ret = snd_soc_dai_set_clkdiv(cpu_dai, PXA_SSP_AUDIO_DIV_ACDS, acds);
133 if (ret < 0) 141 if (ret < 0)
134 return ret; 142 return ret;