Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 371777
b: refs/heads/master
c: de1e6ee
h: refs/heads/master
i:
  371775: a5f5b51
v: v3
  • Loading branch information
Charles Keepax authored and Mark Brown committed Mar 4, 2013
1 parent a03463c commit d1fe78b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 357228153b4a158bdeb05f1c46ee13ef60a675a6
refs/heads/master: de1e6eedddeab2fa417c38c231d896198f903129
16 changes: 10 additions & 6 deletions trunk/sound/soc/codecs/arizona.c
Original file line number Diff line number Diff line change
Expand Up @@ -1145,10 +1145,12 @@ int arizona_set_fll(struct arizona_fll *fll, int source,
struct arizona_fll_cfg ref, sync;
int ret;

if (fll->fref == Fref && fll->fout == Fout)
return 0;

if (fll->ref_src < 0 || fll->ref_src == source) {
if (fll->sync_src == -1 &&
fll->ref_src == source && fll->ref_freq == Fref &&
fll->fout == Fout)
return 0;

if (Fout) {
ret = arizona_calc_fll(fll, &ref, Fref, Fout);
if (ret != 0)
Expand All @@ -1159,6 +1161,10 @@ int arizona_set_fll(struct arizona_fll *fll, int source,
fll->ref_src = source;
fll->ref_freq = Fref;
} else {
if (fll->sync_src == source &&
fll->sync_freq == Fref && fll->fout == Fout)
return 0;

if (Fout) {
ret = arizona_calc_fll(fll, &ref, fll->ref_freq, Fout);
if (ret != 0)
Expand All @@ -1172,16 +1178,14 @@ int arizona_set_fll(struct arizona_fll *fll, int source,
fll->sync_src = source;
fll->sync_freq = Fref;
}
fll->fout = Fout;

if (Fout) {
arizona_enable_fll(fll, &ref, &sync);
} else {
arizona_disable_fll(fll);
}

fll->fref = Fref;
fll->fout = Fout;

return 0;
}
EXPORT_SYMBOL_GPL(arizona_set_fll);
Expand Down
3 changes: 1 addition & 2 deletions trunk/sound/soc/codecs/arizona.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,8 @@ struct arizona_fll {
unsigned int base;
unsigned int vco_mult;
struct completion ok;
unsigned int fref;
unsigned int fout;

unsigned int fout;
int sync_src;
unsigned int sync_freq;
int ref_src;
Expand Down

0 comments on commit d1fe78b

Please sign in to comment.