All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
To: broonie@opensource.wolfsonmicro.com
Cc: alsa-devel@alsa-project.org, tiwai@suse.de,
	patches@opensource.wolfsonmicro.com, lgirdwood@gmail.com,
	Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Subject: [PATCH] ASoC: arizona: Don't enable FLL on REFCLK configuration
Date: Fri, 22 Feb 2013 17:10:37 +0000	[thread overview]
Message-ID: <1361553037-423-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> (raw)

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

             reply	other threads:[~2013-02-22 17:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-22 17:10 Charles Keepax [this message]
2013-03-01 11:12 ` [PATCH] ASoC: arizona: Don't enable FLL on REFCLK configuration Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1361553037-423-1-git-send-email-ckeepax@opensource.wolfsonmicro.com \
    --to=ckeepax@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lgirdwood@gmail.com \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.