alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: arizona: Don't enable FLL on REFCLK configuration
@ 2013-02-22 17:10 Charles Keepax
  2013-03-01 11:12 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Charles Keepax @ 2013-02-22 17:10 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, tiwai, patches, lgirdwood, Charles Keepax

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>
---
 sound/soc/codecs/arizona.c |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 6837863..eb25ab9 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -1148,17 +1148,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;
 		}
@@ -1166,12 +1166,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;
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-01 11:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-22 17:10 [PATCH] ASoC: arizona: Don't enable FLL on REFCLK configuration Charles Keepax
2013-03-01 11:12 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).