From: Mark Brown Date: Thu, 7 Mar 2013 08:14:04 +0000 (+0800) Subject: ASoC: arizona: Suppress reference calculations when setting REFCLK to 0 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=86cd684fcb3220f4aa20cf9e32fd1059373a608a;p=linux-beck.git ASoC: arizona: Suppress reference calculations when setting REFCLK to 0 Allow users to keep on specifying their output frequency when disabling the reference clock. Reported-by: Kyung Kwee Ryu Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c index 53ddd529769c..ad21d8255341 100644 --- a/sound/soc/codecs/arizona.c +++ b/sound/soc/codecs/arizona.c @@ -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); }