aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2013-02-22 12:10:37 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-03 22:01:01 -0500
commit1c5617fc230b399c1d84711b8a2e316199387eb9 (patch)
tree9449add694b546e70aca4287b2d71ba44f5836da
parentddbce97cd1798ba4661e33662c659b168e9f51ed (diff)
ASoC: arizona: Don't enable FLL on REFCLK configuration
Enabling the FLL when REFCLK is being configured is not what the user would expect and can cause issues if SYNCCLK has no specified frequency. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/codecs/arizona.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index debd184cc706..e456cb4b196e 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -1183,17 +1183,17 @@ int arizona_set_fll_refclk(struct arizona_fll *fll, int source,
1183 if (source < 0) 1183 if (source < 0)
1184 return -EINVAL; 1184 return -EINVAL;
1185 1185
1186 if (fll->ref_src == source && fll->ref_freq == Fref && 1186 if (fll->ref_src == source && fll->ref_freq == Fref)
1187 fll->fout == Fout)
1188 return 0; 1187 return 0;
1189 1188
1190 if (Fout) { 1189 if (fll->fout) {
1191 ret = arizona_calc_fll(fll, &ref, Fref, Fout); 1190 ret = arizona_calc_fll(fll, &ref, Fref, fll->fout);
1192 if (ret != 0) 1191 if (ret != 0)
1193 return ret; 1192 return ret;
1194 1193
1195 if (fll->sync_src >= 0) { 1194 if (fll->sync_src >= 0) {
1196 ret = arizona_calc_fll(fll, &sync, fll->sync_freq, Fout); 1195 ret = arizona_calc_fll(fll, &sync, fll->sync_freq,
1196 fll->fout);
1197 if (ret != 0) 1197 if (ret != 0)
1198 return ret; 1198 return ret;
1199 } 1199 }
@@ -1201,12 +1201,9 @@ int arizona_set_fll_refclk(struct arizona_fll *fll, int source,
1201 1201
1202 fll->ref_src = source; 1202 fll->ref_src = source;
1203 fll->ref_freq = Fref; 1203 fll->ref_freq = Fref;
1204 fll->fout = Fout;
1205 1204
1206 if (Fout) { 1205 if (fll->fout) {
1207 arizona_enable_fll(fll, &ref, &sync); 1206 arizona_enable_fll(fll, &ref, &sync);
1208 } else {
1209 arizona_disable_fll(fll);
1210 } 1207 }
1211 1208
1212 return 0; 1209 return 0;