summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/arizona.c
diff options
context:
space:
mode:
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>2013-02-22 17:10:37 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-04 11:01:01 +0800
commit1c5617fc230b399c1d84711b8a2e316199387eb9 (patch)
tree9449add694b546e70aca4287b2d71ba44f5836da /sound/soc/codecs/arizona.c
parentddbce97cd1798ba4661e33662c659b168e9f51ed (diff)
downloadlwn-1c5617fc230b399c1d84711b8a2e316199387eb9.tar.gz
lwn-1c5617fc230b399c1d84711b8a2e316199387eb9.zip
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>
Diffstat (limited to 'sound/soc/codecs/arizona.c')
-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,
if (source < 0)
return -EINVAL;
- if (fll->ref_src == source && fll->ref_freq == Fref &&
- fll->fout == Fout)
+ if (fll->ref_src == source && fll->ref_freq == Fref)
return 0;
- if (Fout) {
- ret = arizona_calc_fll(fll, &ref, Fref, Fout);
+ if (fll->fout) {
+ ret = arizona_calc_fll(fll, &ref, Fref, fll->fout);
if (ret != 0)
return ret;
if (fll->sync_src >= 0) {
- ret = arizona_calc_fll(fll, &sync, fll->sync_freq, Fout);
+ ret = arizona_calc_fll(fll, &sync, fll->sync_freq,
+ fll->fout);
if (ret != 0)
return ret;
}
@@ -1201,12 +1201,9 @@ int arizona_set_fll_refclk(struct arizona_fll *fll, int source,
fll->ref_src = source;
fll->ref_freq = Fref;
- fll->fout = Fout;
- if (Fout) {
+ if (fll->fout) {
arizona_enable_fll(fll, &ref, &sync);
- } else {
- arizona_disable_fll(fll);
}
return 0;