[alsa-devel] [PATCH v2 2/2] ASoC: fsl: imx-wm8962: Grant hw_params/free() permission to control FLL

Mark Brown broonie at kernel.org
Mon Dec 9 18:56:40 CET 2013


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.

> +		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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20131209/7e71b2f9/attachment.sig>


More information about the Alsa-devel mailing list