]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: arizona: Suppress reference calculations when setting REFCLK to 0
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 7 Mar 2013 08:14:04 +0000 (16:14 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 8 Mar 2013 03:40:46 +0000 (11:40 +0800)
Allow users to keep on specifying their output frequency when disabling
the reference clock.

Reported-by: Kyung Kwee Ryu <Kyung-Kwee.Ryu@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/arizona.c

index 53ddd529769c863e40cc70bd3626d5b2f432821b..ad21d8255341085e23179aa3a6906c6501d62535 100644 (file)
@@ -1249,7 +1249,7 @@ int arizona_set_fll_refclk(struct arizona_fll *fll, int source,
        if (fll->ref_src == source && fll->ref_freq == Fref)
                return 0;
 
-       if (fll->fout) {
+       if (fll->fout && Fref > 0) {
                ret = arizona_calc_fll(fll, &ref, Fref, fll->fout);
                if (ret != 0)
                        return ret;
@@ -1265,7 +1265,7 @@ int arizona_set_fll_refclk(struct arizona_fll *fll, int source,
        fll->ref_src = source;
        fll->ref_freq = Fref;
 
-       if (fll->fout) {
+       if (fll->fout && Fref > 0) {
                arizona_enable_fll(fll, &ref, &sync);
        }