All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolin Chen <Guangyu.Chen@freescale.com>
To: Mark Brown <broonie@kernel.org>
Cc: Nicolin Chen <b42378@freescale.com>,
	lgirdwood@gmail.com, alsa-devel@alsa-project.org, tiwai@suse.de,
	perex@perex.cz, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] ASoC: fsl: imx-wm8962: Grant hw_params/free() permission to control FLL
Date: Tue, 10 Dec 2013 13:18:42 +0800	[thread overview]
Message-ID: <20131210051740.GA10655@MrMyself> (raw)
In-Reply-To: <20131209175640.GL29268@sirena.org.uk>

On Mon, Dec 09, 2013 at 05:56:40PM +0000, Mark Brown wrote:
> On Fri, Dec 06, 2013 at 11:38:29PM +0800, Nicolin Chen wrote:
> 
> > +static int imx_hifi_hw_free(struct snd_pcm_substream *substream)
> > +{
> > +	struct snd_soc_pcm_runtime *rtd = substream->private_data;
> > +	struct snd_soc_dai *codec_dai = rtd->codec_dai;
> > +
> > +	/* Don't diable FLL if still having multiple substreams running */
> > +	if (codec_dai->active != 1)
> > +		return 0;
> > +
> > +	return imx_wm8962_disable_fll(codec_dai);
> 
> This will still disable the FLL if there's an analogue bypass path
> active.  I'd suggest changing enable() and disable() to reference count.

I was expecting this would disable it for further reconfiguration. But it
seems I should also considerate the case using bypass path and normal PCM
playback simultaneously, which looks a bit complex.

> 
> > +		if (dapm->bias_level == SND_SOC_BIAS_STANDBY)
> > +			return imx_wm8962_enable_fll(codec_dai, 44100,
> > +						SNDRV_PCM_FORMAT_S16_LE);
> 
> It might be slightly nicer to keep the static variable for the frequency
> - that way if we start up due to set_bias_level() we'll keep the last
> rate played which might be more likely to avoid locking playbacks out.
> Very minor thing though, I wouldn't worry about it.

I'd like to follow this way.

Thank you,
Nicolin Chen

WARNING: multiple messages have this Message-ID (diff)
From: Nicolin Chen <Guangyu.Chen@freescale.com>
To: Mark Brown <broonie@kernel.org>
Cc: Nicolin Chen <b42378@freescale.com>, <lgirdwood@gmail.com>,
	<alsa-devel@alsa-project.org>, <tiwai@suse.de>, <perex@perex.cz>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] ASoC: fsl: imx-wm8962: Grant hw_params/free() permission to control FLL
Date: Tue, 10 Dec 2013 13:18:42 +0800	[thread overview]
Message-ID: <20131210051740.GA10655@MrMyself> (raw)
In-Reply-To: <20131209175640.GL29268@sirena.org.uk>

On Mon, Dec 09, 2013 at 05:56:40PM +0000, Mark Brown wrote:
> On Fri, Dec 06, 2013 at 11:38:29PM +0800, Nicolin Chen wrote:
> 
> > +static int imx_hifi_hw_free(struct snd_pcm_substream *substream)
> > +{
> > +	struct snd_soc_pcm_runtime *rtd = substream->private_data;
> > +	struct snd_soc_dai *codec_dai = rtd->codec_dai;
> > +
> > +	/* Don't diable FLL if still having multiple substreams running */
> > +	if (codec_dai->active != 1)
> > +		return 0;
> > +
> > +	return imx_wm8962_disable_fll(codec_dai);
> 
> This will still disable the FLL if there's an analogue bypass path
> active.  I'd suggest changing enable() and disable() to reference count.

I was expecting this would disable it for further reconfiguration. But it
seems I should also considerate the case using bypass path and normal PCM
playback simultaneously, which looks a bit complex.

> 
> > +		if (dapm->bias_level == SND_SOC_BIAS_STANDBY)
> > +			return imx_wm8962_enable_fll(codec_dai, 44100,
> > +						SNDRV_PCM_FORMAT_S16_LE);
> 
> It might be slightly nicer to keep the static variable for the frequency
> - that way if we start up due to set_bias_level() we'll keep the last
> rate played which might be more likely to avoid locking playbacks out.
> Very minor thing though, I wouldn't worry about it.

I'd like to follow this way.

Thank you,
Nicolin Chen


  reply	other threads:[~2013-12-10  5:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-06 15:38 [PATCH v2 0/2] Enhance imx-wm8962 machine driver Nicolin Chen
2013-12-06 15:38 ` Nicolin Chen
2013-12-06 15:38 ` [PATCH v2 1/2] ASoC: fsl: imx-wm8962: Don't update bias_level in " Nicolin Chen
2013-12-06 15:38   ` Nicolin Chen
2013-12-09 17:51   ` Mark Brown
2013-12-06 15:38 ` [PATCH v2 2/2] ASoC: fsl: imx-wm8962: Grant hw_params/free() permission to control FLL Nicolin Chen
2013-12-06 15:38   ` Nicolin Chen
2013-12-09 17:56   ` Mark Brown
2013-12-10  5:18     ` Nicolin Chen [this message]
2013-12-10  5:18       ` Nicolin Chen
2013-12-10 10:25       ` Nicolin Chen
2013-12-10 10:25         ` Nicolin Chen
2013-12-10 10:47         ` Mark Brown
2013-12-10 10:51           ` Nicolin Chen
2013-12-10 10:51             ` Nicolin Chen
2013-12-10 11:15             ` Mark Brown
2013-12-10 11:15               ` Mark Brown
2013-12-10 11:08               ` Nicolin Chen
2013-12-10 11:08                 ` Nicolin Chen

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=20131210051740.GA10655@MrMyself \
    --to=guangyu.chen@freescale.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=b42378@freescale.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --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.