[alsa-devel] [PATCH 3/3] ALSA: ASoC: cs4271: add optional soft reset workaround

Mark Brown broonie at opensource.wolfsonmicro.com
Sun Dec 2 05:02:01 CET 2012


On Fri, Nov 30, 2012 at 11:28:57AM +0100, Daniel Mack wrote:

> +	Note that this is not needed in case the clocks are stable
> +	throughout the entire runtime of the codec.

That's really quite rare for embeded systems, though - normally at least
the LRCLK is going to be enabled only when there's audio.  

> +static int cs4271_startup(struct snd_pcm_substream *subs,
> +			   struct snd_soc_dai *codec_dai)
> +{
> +	int ret;
> +	struct snd_soc_codec *codec = codec_dai->codec;
> +	struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec);
> +
> +	if (!cs4271->enable_soft_reset)
> +		return 0;
> +
> +	/*
> +	 * Put the codec in soft reset and back again in case it's not
> +	 * currently streaming data. This way of bringing the codec in
> +	 * sync to the current clocks is not explicitly documented in
> +	 * the data sheet, but it seems to work fine.
> +	 */

Since startup() is called before hw_params() you might well find even an
active LRCLK is going to change underneath the driver here...
-------------- 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/20121202/afa6b076/attachment.sig>


More information about the Alsa-devel mailing list