alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Nicolin Chen <b42378@freescale.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>,
	alsa-devel@alsa-project.org, broonie@kernel.org,
	shawn.guo@linaro.org
Subject: Re: [PATCH] ASoC: wm8962: No need to call wm8962_configure_bclk() multiple times
Date: Fri, 19 Jul 2013 14:00:31 +0800	[thread overview]
Message-ID: <20130719060030.GA8334@MrMyself> (raw)
In-Reply-To: <1374213508-25617-1-git-send-email-festevam@gmail.com>

Hi Fabio,

On Fri, Jul 19, 2013 at 02:58:28AM -0300, Fabio Estevam wrote:
> -
> -		wm8962_configure_bclk(codec);
>  		break;
>  
>  	case SND_SOC_BIAS_STANDBY:
> @@ -2621,8 +2619,6 @@ static int wm8962_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
>  
>  	wm8962->sysclk_rate = freq;
>  
> -	wm8962_configure_bclk(codec);
> -

Although I know this modification should be okay on i.MX SabreSD,
yet I'm not sure if won't break other usage on other platforms.

And the problem here is because wm8962->bclk and wm8962->lrclk
are updated in hw_params() but be remained after playback's done.
So there might be a least risky way to fix it just by adding this:

+static int wm8962_hw_free(struct snd_pcm_substream *substream,
+		struct snd_soc_dai *dai)
+{
+	struct snd_soc_codec *codec = dai->codec;
+	struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
+
+	wm8962->lrclk = 0;
+	wm8962->bclk = 0;
+
+	return 0;
+}


Surely If Mark say okay to Fabio's patch, I'll be totally okay
with it too. I just want to this wm8962 driver can work perfectly
on all the platforms.

  reply	other threads:[~2013-07-19  6:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-19  5:58 [PATCH] ASoC: wm8962: No need to call wm8962_configure_bclk() multiple times Fabio Estevam
2013-07-19  6:00 ` Nicolin Chen [this message]
2013-07-19 10:07 ` 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=20130719060030.GA8334@MrMyself \
    --to=b42378@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=fabio.estevam@freescale.com \
    --cc=festevam@gmail.com \
    --cc=shawn.guo@linaro.org \
    /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 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).